The NetBSD Project

CVS log for src/distrib/utils/sysinst/Attic/mbr.c

[BACK] Up to [cvs.NetBSD.org] / src / distrib / utils / sysinst

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.93, Sat Jul 26 19:30:39 2014 UTC (3 days, 16 hours ago) by dholland
Branch: MAIN
CVS Tags: HEAD
Changes since 1.92: +1 -1 lines
FILE REMOVED

Move sysinst sources to usr.sbin.

This commit only physically moves the sources - there are no other
changes, to maximize the probability that this will be treated as a
rename if we ever do manage to migrate away from CVS.

Moving sysinst has been discussed on and off for years and has two
goals: making it easier to work on sysinst, and also making sysinst
available on running systems for use installing chroots and VM images
and other such things. None of the latter is possible yet, but as they
say, one thing at a time.

Doing this now was approved in an impromptu fashion by mrg, riz,
riastradh, me, and groo.

Revision 1.88.2.3 / (download) - annotate - [select for diffs], Thu May 22 12:01:35 2014 UTC (2 months, 1 week ago) by yamt
Branch: yamt-pagecache
Changes since 1.88.2.2: +3 -2 lines
Diff to previous 1.88.2.2 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.89.2.2.4.1 / (download) - annotate - [select for diffs], Sun Oct 20 13:43:26 2013 UTC (9 months, 1 week ago) by bouyer
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE
Changes since 1.89.2.2: +2 -1 lines
Diff to previous 1.89.2.2 (colored) next main 1.89.2.3 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #972):
	distrib/utils/sysinst/mbr.c: revision 1.92
Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129
The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.
Should be pulled up to all netbsd-6* branches.

Revision 1.89.2.2.6.1 / (download) - annotate - [select for diffs], Sun Oct 20 13:43:23 2013 UTC (9 months, 1 week ago) by bouyer
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE
Changes since 1.89.2.2: +2 -1 lines
Diff to previous 1.89.2.2 (colored) next main 1.89.2.3 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #972):
	distrib/utils/sysinst/mbr.c: revision 1.92
Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129
The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.
Should be pulled up to all netbsd-6* branches.

Revision 1.89.2.3 / (download) - annotate - [select for diffs], Sun Oct 20 13:43:17 2013 UTC (9 months, 1 week ago) by bouyer
Branch: netbsd-6
Changes since 1.89.2.2: +2 -1 lines
Diff to previous 1.89.2.2 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #972):
	distrib/utils/sysinst/mbr.c: revision 1.92
Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129
The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.
Should be pulled up to all netbsd-6* branches.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Oct 13 15:32:14 2013 UTC (9 months, 2 weeks ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored)

Fix another botch of my dumb patch in PR/45990; add missing braces.

The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129

The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.

Should be pulled up to all netbsd-6* branches.

Revision 1.88.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 18:48:52 2012 UTC (20 months, 4 weeks ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.88.2.1: +3 -2 lines
Diff to previous 1.88.2.1 (colored) to branchpoint 1.88 (colored)

sync with head

Revision 1.89.2.2 / (download) - annotate - [select for diffs], Tue Jun 12 19:19:20 2012 UTC (2 years, 1 month ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Changes since 1.89.2.1: +3 -2 lines
Diff to previous 1.89.2.1 (colored) to branchpoint 1.89 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #317):
	distrib/utils/sysinst/mbr.c: revision 1.91
Fix regression by my dumb patch in PR/45990.
sysinst fails with "floating exception" after
changing MBR partition size in MBR editor menu
if the target disk doesn't have valid MBR partition
or has a valid partition 0 whose offset is not 1MB aligned
(like 63 sectors).
read_mbr() (which calls get_ptn_alignment()) is called
before set_bios_geom(), so bhead is not initialized there
and ptn_alignment could be zero.
To workaround, explicitly call get_ptn_alignment() again
in edit_mbr() to update ptn_alignemnt per BIOS geom values.

Revision 1.91 / (download) - annotate - [select for diffs], Sat May 26 05:09:59 2012 UTC (2 years, 2 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base, tls-maxphys, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Changes since 1.90: +3 -2 lines
Diff to previous 1.90 (colored)

Fix regression by my dumb patch in PR/45990.

sysinst fails with "floating exception" after
changing MBR partition size in MBR editor menu
if the target disk doesn't have valid MBR partition
or has a valid partition 0 whose offset is not 1MB aligned
(like 63 sectors).

read_mbr() (which calls get_ptn_alignment()) is called
before set_bios_geom(), so bhead is not initialized there
and ptn_alignment could be zero.

To workaround, explicitly call get_ptn_alignment() again
in edit_mbr() to update ptn_alignemnt per BIOS geom values.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Thu May 17 18:57:08 2012 UTC (2 years, 2 months ago) by sborrill
Branch: netbsd-6
Changes since 1.89: +58 -14 lines
Diff to previous 1.89 (colored)

Pull up the following revisions(s) (requested by riz in ticket #247):
	distrib/utils/sysinst/Makefile.inc: revision 1.59 via patch
	distrib/utils/sysinst/checkrc.c: revision 1.1-1.2 via patch
	distrib/utils/sysinst/configmenu.c: revision 1.1-1.5 via patch
	distrib/utils/sysinst/defs.h: revision 1.162 via patch
	distrib/utils/sysinst/install.c: revision 1.46 via patch
	distrib/utils/sysinst/main.c: revision 1.64 via patch
	distrib/utils/sysinst/mbr.c: revision 1.90 via patch
	distrib/utils/sysinst/menus.mi: revision 1.45-1.46 via patch
	distrib/utils/sysinst/msg.mbr.de: revision 1.12 via patch
	distrib/utils/sysinst/msg.mbr.en: revision 1.16-1.17 via patch
	distrib/utils/sysinst/msg.mbr.es: revision 1.7 via patch
	distrib/utils/sysinst/msg.mbr.fr: revision 1.18-1.19 via patch
	distrib/utils/sysinst/msg.mbr.pl: revision 1.15-1.16 via patch
	distrib/utils/sysinst/msg.mi.de: revision 1.62-1.67 via patch
	distrib/utils/sysinst/msg.mi.en: revision 1.170-1.172 via patch
	distrib/utils/sysinst/msg.mi.es: revision 1.40-1.43 via patch
	distrib/utils/sysinst/msg.mi.fr: revision 1.120-1.126 via patch
	distrib/utils/sysinst/msg.mi.pl: revision 1.79-1.83 via patch
	distrib/utils/sysinst/net.c: revision 1.131-1.132 via patch
	distrib/utils/sysinst/run.c: revision 1.70 via patch
	distrib/utils/sysinst/target.c: revision 1.55 via patch
	distrib/utils/sysinst/util.c: revision 1.174-1.178 via patch
	distrib/utils/sysinst/arch/evbarm/msg.md.de: revision 1.10-1.11 via patch
	distrib/utils/sysinst/arch/evbmips/md.c: revision 1.10 via patch
	distrib/utils/sysinst/arch/hp300/msg.md.de: revision 1.6-1.7 via patch
	distrib/utils/sysinst/arch/hp300/msg.md.en: revision 1.9 via patch
	distrib/utils/sysinst/arch/hp300/msg.md.es: revision 1.5 via patch
	distrib/utils/sysinst/arch/hp300/msg.md.fr: revision 1.8 via patch
	distrib/utils/sysinst/arch/hp300/msg.md.pl: revision 1.8 via patch
	distrib/utils/sysinst/arch/i386/msg.md.en: revision 1.62-1.63 via patch
	distrib/utils/sysinst/arch/i386/msg.md.es: revision 1.14 via patch
	distrib/utils/sysinst/arch/i386/msg.md.de: revision 1.23

Sync sysinst with -current as of 2011-05-17
Add new post-install configuration menu for sysinst, and apply numerous
bug fixes.

Revision 1.88.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:02:49 2012 UTC (2 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.88: +59 -15 lines
Diff to previous 1.88 (colored)

sync with head

Revision 1.90 / (download) - annotate - [select for diffs], Sat Apr 7 03:08:33 2012 UTC (2 years, 3 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.89: +58 -14 lines
Diff to previous 1.89 (colored)

Use 1MB alignment rather than the default 63 sectors for
fdisk partition boundary for >128GB disks, as fdisk(8) does.
No particular comments for my PR install/45990.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jan 5 21:29:24 2012 UTC (2 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

eliminate useless booleans and use the file pointers as conditionals.

Revision 1.88 / (download) - annotate - [select for diffs], Mon Oct 17 16:35:22 2011 UTC (2 years, 9 months ago) by mbalmer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

There is no doubt whether whether should have a 'h' after the 'w'.

Revision 1.87 / (download) - annotate - [select for diffs], Mon May 30 14:20:48 2011 UTC (3 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.86: +5 -5 lines
Diff to previous 1.86 (colored)

Use proper format strings.

Revision 1.79.20.2 / (download) - annotate - [select for diffs], Fri May 20 08:11:15 2011 UTC (3 years, 2 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.79.20.1: +52 -14 lines
Diff to previous 1.79.20.1 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.86 / (download) - annotate - [select for diffs], Mon Apr 4 08:30:12 2011 UTC (3 years, 3 months ago) by mbalmer
Branch: MAIN
Changes since 1.85: +9 -13 lines
Diff to previous 1.85 (colored)

Remove the advertisement clause from files copyrighted by Piermont Information
Systems, with the consent of the copyright owner, Perry E. Metzger.

Revision 1.79.14.3 / (download) - annotate - [select for diffs], Thu May 20 05:36:35 2010 UTC (4 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.79.14.2: +7 -7 lines
Diff to previous 1.79.14.2 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

Pull up following revision(s) (requested by martin in ticket #1396):
	distrib/utils/sysinst/mbr.c: revision 1.84
	distrib/utils/sysinst/msg.mbr.de: revision 1.10
	distrib/utils/sysinst/msg.mbr.en: revision 1.14
	distrib/utils/sysinst/msg.mbr.es: revision 1.5
	distrib/utils/sysinst/msg.mbr.fr: revision 1.16
	distrib/utils/sysinst/msg.mbr.pl: revision 1.12
Fix a varargs argument type mismatch on 32bit archs - change format to
explicitly use %lu and cast the passed value accordingly.

Revision 1.79.18.2 / (download) - annotate - [select for diffs], Thu May 20 05:34:34 2010 UTC (4 years, 2 months ago) by snj
Branch: netbsd-5-0
Changes since 1.79.18.1: +7 -7 lines
Diff to previous 1.79.18.1 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

Bah, wrong branch.  Revert previous.

Revision 1.79.18.1 / (download) - annotate - [select for diffs], Thu May 20 05:32:45 2010 UTC (4 years, 2 months ago) by snj
Branch: netbsd-5-0
Changes since 1.79: +7 -7 lines
Diff to previous 1.79 (colored)

Pull up following revision(s) (requested by martin in ticket #1396):
	distrib/utils/sysinst/mbr.c: revision 1.84
	distrib/utils/sysinst/msg.mbr.de: revision 1.10
	distrib/utils/sysinst/msg.mbr.en: revision 1.14
	distrib/utils/sysinst/msg.mbr.es: revision 1.5
	distrib/utils/sysinst/msg.mbr.fr: revision 1.16
	distrib/utils/sysinst/msg.mbr.pl: revision 1.12
Fix a varargs argument type mismatch on 32bit archs - change format to
explicitly use %lu and cast the passed value accordingly.

Revision 1.79.14.2 / (download) - annotate - [select for diffs], Thu May 20 05:09:40 2010 UTC (4 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.79.14.1: +46 -8 lines
Diff to previous 1.79.14.1 (colored) to branchpoint 1.79 (colored)

Pull up following revision(s) (requested by martin in ticket #1375):
	distrib/utils/sysinst/mbr.c: revision 1.83
The 16bit "bootmenu valid" magic is slightly week, collisions have been
seen in the wild. So, before accepting arbitrary strings from there,
validate at least slightly and ignore if the entries are not properly
0 terminated or contain controll characters.

Revision 1.79.20.1 / (download) - annotate - [select for diffs], Wed Apr 21 05:20:43 2010 UTC (4 years, 3 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

sync to netbsd-5

Revision 1.85 / (download) - annotate - [select for diffs], Mon Apr 19 21:12:51 2010 UTC (4 years, 3 months ago) by martin
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.84: +5 -5 lines
Diff to previous 1.84 (colored)

Oops - last change could lead to crashes - when not asking for a geometry,
use the default one.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Apr 19 19:22:41 2010 UTC (4 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.83: +7 -7 lines
Diff to previous 1.83 (colored)

Fix a varargs argument type mismatch on 32bit archs - change format to
explicitly use %lu and cast the passed value accordingly.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Apr 15 22:55:15 2010 UTC (4 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.82: +46 -8 lines
Diff to previous 1.82 (colored)

The 16bit "bootmenu valid" magic is slightly week, collisions have been
seen in the wild. So, before accepting arbitrary strings from there,
validate at least slightly and ignore if the entries are not properly
0 terminated or contain controll characters.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jan 2 21:16:46 2010 UTC (4 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.81: +21 -21 lines
Diff to previous 1.81 (colored)

Change most of the variables that hold disk sector number to be (at least)
uint32_t. Might make sysinst work on disks between 1TB and 2TB.
Not actually tested because I don't have a big disk.
Hopefully I haven't broken the small disk case!
Set WARNS= 4 so that comparisons of signed and unsigned block numbers
are trapped.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Sep 19 14:57:27 2009 UTC (4 years, 10 months ago) by abs
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.80: +18 -1 lines
Diff to previous 1.80 (colored)

defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
  externs in various md .c files

mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
  the non x86 ports rather than copying the same code into arc,
  bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
  prep, sandpoint, and zaurus md.c

install.c:
- Remove now unnecessary call to md_copy_filesystem()

upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
  wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
  move them here

arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
  about this, and while here add a note to i386/md.c that it
  is included by amd64

arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
  and they could not even agree on the order in which to list the
  md hooks, let alone formatting. Sort the md hooks to match the
  (now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
  copying the booted ramdisk to the target disk, the primary result
  of which was just to slow things down and ensure the target system
  lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
  Take a cure from i386/amd64 and a few other more active ports,
  and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"

More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...

sysinst built for all ports but only runtime tested on amd64 & i386

Revision 1.79.14.1 / (download) - annotate - [select for diffs], Mon May 18 19:35:13 2009 UTC (5 years, 2 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-1-RC1
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

Pull up following revision(s) (requested by sborrill in ticket #758):
	distrib/utils/sysinst/mbr.c: revision 1.80
	distrib/utils/sysinst/msg.mi.en: revision 1.155
	distrib/utils/sysinst/disks.c: revision 1.105
	distrib/utils/sysinst/arch/i386/md.c: revision 1.122
	distrib/utils/sysinst/savenewlabel.c: revision 1.6
	distrib/utils/sysinst/mbr.h: revision 1.23
	distrib/utils/sysinst/defs.h: revision 1.143
	distrib/utils/sysinst/msg.mi.pl: revision 1.65
	distrib/utils/sysinst/bsddisklabel.c: revision 1.52
	distrib/utils/sysinst/msg.mi.es: revision 1.26
	distrib/utils/sysinst/msg.mi.de: revision 1.49
	distrib/utils/sysinst/msg.mi.fr: revision 1.106
Support drives over 1TB in size (i.e. stop errors like drive is -654343MB in
size).
Error if drive is over 2TB in size (and thus over the disklabel limit).

Revision 1.80 / (download) - annotate - [select for diffs], Thu May 14 16:23:38 2009 UTC (5 years, 2 months ago) by sborrill
Branch: MAIN
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

Support drives over 1TB in size (i.e. stop errors like drive is -654343MB in
size).
Error if drive is over 2TB in size (and thus over the disklabel limit).

Revision 1.79.6.1, Sun Oct 5 20:11:09 2008 UTC (5 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.79: +1 -1 lines
FILE REMOVED

Sync with HEAD.

Revision 1.77.8.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:28:27 2008 UTC (6 years, 6 months ago) by matt
Branch: matt-armv6
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored) next main 1.78 (colored)

sync with HEAD

Revision 1.79.2.2 / (download) - annotate - [select for diffs], Fri Dec 28 00:48:44 2007 UTC (6 years, 7 months ago) by dholland
Branch: mjf-devfs
Changes since 1.79.2.1: +1800 -0 lines
Diff to previous 1.79.2.1 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

Extend size of entry buffer for partition type ids from 4 to 5, to allow
room for hex values. Fixes (my own) PR 34791, now that I've had a chance
to test it.
Reviewed-by: martin

Revision 1.79.2.1, Fri Dec 28 00:48:43 2007 UTC (6 years, 7 months ago) by dholland
Branch: mjf-devfs
Changes since 1.79: +0 -1800 lines
FILE REMOVED

file mbr.c was added on branch mjf-devfs on 2007-12-28 00:48:44 +0000

Revision 1.79 / (download) - annotate - [select for diffs], Fri Dec 28 00:48:43 2007 UTC (6 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, pc532-eol-2008, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, mjf-devfs2-base, mjf-devfs-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: netbsd-5-0, netbsd-5, mjf-devfs2, mjf-devfs, matt-nb5-mips64
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Extend size of entry buffer for partition type ids from 4 to 5, to allow
room for hex values. Fixes (my own) PR 34791, now that I've had a chance
to test it.
Reviewed-by: martin

Revision 1.78 / (download) - annotate - [select for diffs], Thu Nov 29 23:20:47 2007 UTC (6 years, 8 months ago) by dsl
Branch: MAIN
CVS Tags: cube-autoconf-base, cube-autoconf
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Remove now unnecessary casts to of 'mbrbs_nametab' to 'char *'.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Nov 24 22:54:47 2006 UTC (7 years, 8 months ago) by wiz
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

s/apparant/apparent/, from Zafer.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Oct 4 21:27:28 2006 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

remove home-brewd rounding macros.

Revision 1.68.2.3.2.1 / (download) - annotate - [select for diffs], Sat Aug 12 19:20:41 2006 UTC (7 years, 11 months ago) by riz
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE
Changes since 1.68.2.3: +1 -1 lines
Diff to previous 1.68.2.3 (colored) next main 1.68.2.4 (colored)

Pull up following revision(s) (requested by dsl in ticket #1463):
	distrib/utils/sysinst/mbr.c: revision 1.75
	distrib/utils/sysinst/label.c: revision 1.49
	distrib/utils/sysinst/defs.h: revision 1.130
When we read 'last mounted' from an FFSv2 superblock set the flag to
default the partition to FFSv2 (instead of FFSv1).
This makes update installs add the correct bootstrap code.
Fixes PR/33682 and PR/32636 (and 33228 which has alrady been closed
as a duplicate of 32636).

Revision 1.68.2.4 / (download) - annotate - [select for diffs], Sat Aug 12 19:20:36 2006 UTC (7 years, 11 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.68.2.3: +1 -1 lines
Diff to previous 1.68.2.3 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored)

Pull up following revision(s) (requested by dsl in ticket #1463):
	distrib/utils/sysinst/mbr.c: revision 1.75
	distrib/utils/sysinst/label.c: revision 1.49
	distrib/utils/sysinst/defs.h: revision 1.130
When we read 'last mounted' from an FFSv2 superblock set the flag to
default the partition to FFSv2 (instead of FFSv1).
This makes update installs add the correct bootstrap code.
Fixes PR/33682 and PR/32636 (and 33228 which has alrady been closed
as a duplicate of 32636).

Revision 1.75 / (download) - annotate - [select for diffs], Sat Jun 10 14:48:46 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

When we read 'last mounted' from an FFSv2 superblock set the flag to
default the partition to FFSv2 (instead of FFSv1).
This makes update installs add the correct bootstrap code.
Fixes PR/33682 and PR/32636 (and 33228 which has alrady been closed
as a duplicate of 32636).

Revision 1.74 / (download) - annotate - [select for diffs], Tue May 16 00:16:59 2006 UTC (8 years, 2 months ago) by dogcow
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

pointer signedness comparison fixes

Revision 1.73 / (download) - annotate - [select for diffs], Fri May 12 21:22:34 2006 UTC (8 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.72: +3 -2 lines
Diff to previous 1.72 (colored)

Fix use of uninitialised variable.
I think the code it correct - but since it is only relevant when setting
the default boot partition (for mbr_bootsel) to an extended partition
it probably doesn't matter too often!

Revision 1.72 / (download) - annotate - [select for diffs], Wed Apr 5 16:55:01 2006 UTC (8 years, 3 months ago) by garbled
Branch: MAIN
Changes since 1.71: +39 -19 lines
Diff to previous 1.71 (colored)

Rather big update to sysinst, in order to get it working on the prep port.

1) Add an md_post_extract() function.  This function is called after
extracting the sets, and allows the arch to do something at that time.
In the case of prep, it is much easier to install the bootcode after all
the sets are extracted, so we do it in md_post_extract().  Added empty
md_post_extract() functions to all other arches so they compile.

2) Add md_mbr_use_wholedisk() and md_check_mbr().  In edit_mbr() I have
split off the code that uses the whole disk for NetBSD, into the
mbr_use_wholedisk() function.  On most ports that use mbr.c, I made
md_mbr_use_wholedisk() just call that and return.  On prep we create the
magical prep boot partition here.  The md_check_mbr() function allows the
arch to add additional checks after the user had manually edited the MBR
to make sure the choices he made allow NetBSD to function.  Added a dummy
routine to all mbr.c using arches.

3) Added code to bsdlabel.c to create a partition of type boot if
PART_BOOT is defined, but BOOT_SIZE is not defined.  Also added two more
globals "bootsize" and "bootstart" which must be seeded in order to do
so.  This is done on prep in md_check_mbr().

4) Added MBR_PTYPE_PREP to the list of MBR partitions.

5) Made the prep port actually install sanely.  It now creates a prep
boot partition, labels it correctly, installs all the sets, and then runs
mkbootimage and dd's the bootimage into the prep partition.  The result
is a prep installer that creates a bootable NetBSD installation
automatically.

6) Edited the prep menus and messages files to add new labels.  In the
case of the translated files, I just added the words in english for
someone to translate later.

I tried to xcompile a few arches to make sure I didn't break anything,
but I could have missed something.  Please let me know if I have broken
your arch in any way.  I'll watch the autobuilds for the next few days
too. For all ports other than prep there should be no functional changes
at all.

Revision 1.68.2.3 / (download) - annotate - [select for diffs], Mon Nov 21 20:42:02 2005 UTC (8 years, 8 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-0
Changes since 1.68.2.2: +23 -18 lines
Diff to previous 1.68.2.2 (colored) to branchpoint 1.68 (colored)

Pull up following revision(s) (requested by dsl in ticket #976):
	distrib/utils/sysinst/mbr.c: revision 1.71
Rework the checking of the typed size against the limit so we don't error
if the size is too large after we've rounded up to a cylinder boundary.
Stops silly errors (4170 > 4172) when partitions end at the end of the disk.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 5 09:58:32 2005 UTC (8 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.70: +24 -19 lines
Diff to previous 1.70 (colored)

Rework the checking of the typed size against the limit so we don't error
if the size is too large after we've rounded up to a cylinder boundary.
Stops silly errors (4170 > 4172) when partitions end at the end of the disk.

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Fri Sep 30 22:44:54 2005 UTC (8 years, 10 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RC1
Changes since 1.68.2.1: +1 -1 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored)

Pull up following revision(s) (requested by chs in ticket #830):
	distrib/utils/sysinst/mbr.c: revision 1.70
avoid another divide-by-zero while computing geometry.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Sep 22 15:41:14 2005 UTC (8 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

avoid another divide-by-zero while computing geometry.

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Mon Sep 19 21:14:40 2005 UTC (8 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Pull up following revision(s) (requested by dsl in ticket #807):
	distrib/utils/sysinst/mbr.c: revision 1.69
Increase width of menu to allow for longer spanish message for selecting units.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Aug 28 19:57:25 2005 UTC (8 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Increase width of menu to allow for longer spanish message for selecting units.

Revision 1.61.2.1.2.1 / (download) - annotate - [select for diffs], Sun Jul 24 02:25:24 2005 UTC (9 years ago) by snj
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.61.2.1: +18 -12 lines
Diff to previous 1.61.2.1 (colored) next main 1.62 (colored)

Apply patch (requested by riz in ticket #5523):
Sync sysinst with HEAD of 2005-07-23.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Feb 26 17:40:49 2005 UTC (9 years, 5 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.67: +3 -1 lines
Diff to previous 1.67 (colored)

Put 'Delete ?' (not "yes or no") in box when we ask whether the user
want to keep or delete the dist files.
Stop the "type enter to continue" if the rmdir fails - may not be empty.
Report an error if the chroot() (for RUN_CHROOT) fails.
fflush log and script files before writing to them from a child.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Nov 10 02:41:00 2004 UTC (9 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored)

Add Solaris mbr id 0xbf. From Larry Lee <lclee at west.sun.com>

Revision 1.66 / (download) - annotate - [select for diffs], Wed Oct 20 19:36:23 2004 UTC (9 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Fix equivalent of PR/26917 - this code was stolen from fdisk.
(similtaneus eqns to determine bios geometry from mbr entries could divide
by zero)

Revision 1.65 / (download) - annotate - [select for diffs], Sat Oct 16 13:20:11 2004 UTC (9 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.64: +5 -2 lines
Diff to previous 1.64 (colored)

Make compile with WARNS=3

Revision 1.64 / (download) - annotate - [select for diffs], Sat Aug 14 16:06:36 2004 UTC (9 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.63: +6 -8 lines
Diff to previous 1.63 (colored)

Default to input in MB for all architectures (MB are cylinder aligned).
Move info about cylinders to the 'ask for units' menu.
  (translations need checking, done by cutting sentences)
Stop i386 always asking for units.
Use BIOS cylinders for MBR and disk cylinders for the disklabel.
  (code intended to do this, but got it wrong...)
Mark some menus as 'sub menu' or MC_SUBMENU so that the screen underneath
  is saved.
Add GENERIC.MPACPI to i386 menu.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jul 17 19:36:59 2004 UTC (10 years ago) by dsl
Branch: MAIN
Changes since 1.62: +8 -6 lines
Diff to previous 1.62 (colored)

Kill two more global variables, bsize (bios disk size) was never used
and bcylsize (bios cylinder size) can be calculated in the one place
it is needed.
The ask_sizemult() call will go once I decide what to to with the
(slightly useful) explanatory text about cylinder alignment.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Wed Apr 28 05:59:12 2004 UTC (10 years, 3 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.61: +56 -43 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

Pullup rev 1.62 (requested by dsl in ticket #199)

Fix mbr bootcode handling to ensure that the bootselect table is always
written into the correct place - even if the user decides not to update
the mbr code and has the old (pre layout change) code installed.
Tell the user that the mbr code needs updating if the new install uses
'all the disk' and the old version had the bootselect code (otherwise you
get an empty menu). PR#25146

Revision 1.62 / (download) - annotate - [select for diffs], Sun Apr 25 21:55:18 2004 UTC (10 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.61: +56 -43 lines
Diff to previous 1.61 (colored)

Fix mbr bootcode handling to ensure that the bootselect table is always
written into the correct place - even if the user decides not to update
the mbr code and has the old (pre layout change) code installed.
Tell the user that the mbr code needs updating if the new install uses
'all the disk' and teh old version had the bootselect code (otherwise you
get an empty menu).
Probably fixes PR install/25146

Revision 1.61 / (download) - annotate - [select for diffs], Sat Mar 27 20:47:33 2004 UTC (10 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.60: +14 -9 lines
Diff to previous 1.60 (colored)

Collect the bootsel info from 'old' - since luke moved the bootsel date
to allow for a M$ disk number.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Mar 26 17:38:44 2004 UTC (10 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.59: +39 -1 lines
Diff to previous 1.59 (colored)

Generate correct internal data when reading an extended mbr partition
that has holes.
This needs the 'bios sectors per track' before it has been setup - so we
default it to the 'hardware' value.  Since both numbers are 63, and this only
affects the size of the headers on extended partitions it should be safe.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 22 07:11:00 2004 UTC (10 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.58: +5 -5 lines
Diff to previous 1.58 (colored)

Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to
leave 4 bytes for the Windows NT Drive Serial Number (DSN) at 440-443
(as mbr_sector.mbr_dsn).

Ensure that all the MBR & PBR code reserves space for mbr_sector.mbr_dsn.

Leave the bootsel magic number at 444-445 as mbr_sector.mbr_bootsel_magic
(instead of mbr_sector.mbr_bootsel.mbrbs_magic), but use 0xb5e1 (MBR_BS_MAGIC)
instead of 0xaa55 (MBR_MAGIC) to indicate that this change has occurred.

Rework MBR_BS_NEWMBR to mean "mbr_bootsel has moved to 400".

Modify fdisk(8) to automatically relocate the mbr_bootsel from 404 to 400
if mbr_bootsel_magic is the old value (0xaa55), and unset MBR_BS_NEWMBR
to flag that new mbr_bootsel code must be used if updating the MBR.


These changes fixes a problem where Windows 2000 or Windows XP would corrupt
the last 3 bytes + NUL of MBR partition 3's bootsel name if the bootsel name
was 5 characters long, replacing bytes 6-9 with the DSN.
Also, by explicitly reserving the space for the DSN we prevent problems in the
future if non bootsel MBR or PBR code had other information at bytes 440-443.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jan 18 16:27:25 2004 UTC (10 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Copy over the correct entry when writing out an extended partition list
that has holes in it.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jan 18 12:23:36 2004 UTC (10 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.56: +117 -41 lines
Diff to previous 1.56 (colored)

Fix sector numbers written in extended partition chin.
Don't write out dummy extended partitions for unused ares in the extended
partition.
Add some more comments - I write this and I couldn't remember how it worked.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Nov 27 21:43:22 2003 UTC (10 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.55: +5 -2 lines
Diff to previous 1.55 (colored)

When rounding a partition to end on a cylinder boundary, round the start
down to a cylinder boundary before adding in the requested size.
Stops the partition being one cylinder larger than requested when the
partition doesn't start at the beginning of a cylinder (eg for partitions
starting in sector 63).
Fixes part of PR install/23548

Revision 1.55 / (download) - annotate - [select for diffs], Sun Oct 19 20:17:31 2003 UTC (10 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.54: +32 -9 lines
Diff to previous 1.54 (colored)

Checkpoint a load of changes - seems to work ok still.
- rework run_prog() so that the program name (etc) is usually displayed if
  the program generates any output, or terminates with an error.
  Allow arguments to included in single quotes.
  Try to collect console output so it doesn't interfere with curses.
- Add a '*' to the cylinder count if non-integral number of cylinders
  (on disklabel editor)
- Only show partition type for unused partitions.
- Show size including unused space on '+' partition, remove a..z since
  the don't relate to partition IDs (netbsd partition sizes)
- Fix deleting of 'user' partitions - killed size of next ptn.
- Don't default a swap partition is the disk already has one.
- Fix deleting of extended MBR partitions - changed size of ptn 2.
- Show error message if user tries something illegal in mbr editor.
- Default to old diskname (actually disk type - dunno why!)
- Use MI enable_rc_conf() to set RC_CONFIGURED=YES, use a single sed
  command instead of a raft of code playing with files etc.
- Float some menus to just below header text, saves counting and lets
  language variants have different height headers (use y=-1)
- Track whether anything is mounted on /mnt2 better.
- Put more texts into message file.
- Change english prose texts to be more correct.
- Stop french and polish versions core dumping if ptn start/size changed.
- Fix processing logic for saving /etc (action is still borked)
- Do tail-end setup if any sets (eg X) can't be found (but not if you give
  in (yet)).

Revision 1.54 / (download) - annotate - [select for diffs], Wed Oct 8 04:25:43 2003 UTC (10 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.53: +113 -113 lines
Diff to previous 1.53 (colored)

Overhaul MBR handling (part 1):

<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).

Revision 1.53 / (download) - annotate - [select for diffs], Sat Sep 27 10:39:35 2003 UTC (10 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

Make partition menu sit just below header (regardless of header size).
Change flag for bootmenu default from 'b' to 'd'.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Sep 21 02:30:18 2003 UTC (10 years, 10 months ago) by takemura
Branch: MAIN
Changes since 1.51: +5 -4 lines
Diff to previous 1.51 (colored)

Fixed alignment of call by reference arguments. This change solves unalignement
access and segmentation fault problem on MIPS architecture.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Aug 10 14:51:49 2003 UTC (10 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.50: +9 -11 lines
Diff to previous 1.50 (colored)

Let noexec, nodev and nosuid be written to /ets fstab entries
Always use 1023 cylinders in mbr for large disks

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jul 27 07:45:08 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.49: +13 -12 lines
Diff to previous 1.49 (colored)

Remove 'menu_ent' parameter from action routines.
Add menu for all disklabel partition types.
Default 'partition type' and 'sizechoice' menus to current value.
Change 'standard/use existing' to 'set sizes/use existing'.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jul 25 08:26:22 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.48: +32 -32 lines
Diff to previous 1.48 (colored)

Sprinkle a load of consts, and change a few variable names.
Now compiles with WARNS=3.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jul 14 09:59:00 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.47: +31 -17 lines
Diff to previous 1.47 (colored)

Fix code that guesses bios geometry from mbr info.
When asking for bios geometry, ask for sectors per track and heads
then calculate cylinders from volume size.
Write MBR_MAGIC into correct place when writing extened partitions.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jul 11 15:28:58 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.46: +5 -3 lines
Diff to previous 1.46 (colored)

Use a menu when asking for the install disk (fixes PR install/20121).
Make disk_desc[], disk and numdisks local to get_disks (instead of globals).
Fix a little fallout from the above.
A bit of mbr.c was missing #ifdef BOOTSEL...

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jul 8 17:38:56 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.45: +7 -2 lines
Diff to previous 1.45 (colored)

Sort out (and remember) the disk partition we will install into.
This should stop the i386 code splatting all over the start of the disk
during upgrade.
Upgrade will still use partition 'a' (unless you loop through the install
far enough first!)

Revision 1.45 / (download) - annotate - [select for diffs], Tue Jul 8 11:58:57 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.44: +16 -12 lines
Diff to previous 1.44 (colored)

Stop timezone submenu exploding (strcmp of MSG_xxxx).
Allow mbr partition type to be changed without losing disklabel info
for same area of disk (allows type to be changed from 165 to 169).

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 7 21:26:32 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Remove some messages that are not used and are unliklely to be needed.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 7 12:55:48 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.42: +7 -3 lines
Diff to previous 1.42 (colored)

Fix non-i386 builds

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 7 12:30:20 2003 UTC (11 years ago) by dsl
Branch: MAIN
Changes since 1.41: +1182 -402 lines
Diff to previous 1.41 (colored)

Another pass of the rototiller. Mainly:
1) New MBR editor
2) Hierarchic timezone menu

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jun 14 12:58:45 2003 UTC (11 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.40: +28 -31 lines
Diff to previous 1.40 (colored)

Implement a limit on the size of / so that its guaranteed readable by the boot code.
Remove pointless 'len' parameter from read_mbr and write_mbr.
Make read_mbr initialise mbr if it can't be read (delete MD code).
Make i386 always ask at least once about the bootcode.
Move LIB_MOVE and LIB_COUNT from md.h to aout2elf.c

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 13 22:27:03 2003 UTC (11 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.39: +62 -40 lines
Diff to previous 1.39 (colored)

Fix code that determines BIOS CHS from MBR - used to get confused by big disks.
Make same function return useful defaults if it can't find an answer.
Make all ports default to the useful defaults if bios geometry is unknown.
Move some messages to mbr set from mi set.
Fix i386 code that selects which bios disk, simplify interface to menus.
Remove now unnecessary global data from many ports.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jun 13 11:57:29 2003 UTC (11 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.38: +1 -4 lines
Diff to previous 1.38 (colored)

Remove all references to minfsdmb and STDNEEDMB - neither are used any more.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jun 12 16:48:43 2003 UTC (11 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.37: +23 -58 lines
Diff to previous 1.37 (colored)

KNF

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jun 3 11:54:48 2003 UTC (11 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.36: +10 -10 lines
Diff to previous 1.36 (colored)

Add NULL to all process_menu() calls - value is passed through to the
action routine.
Make the french and polish versions compile.
NB needs a new version of menuc - so need 'build.sh tools'

Revision 1.36 / (download) - annotate - [select for diffs], Fri May 30 22:17:00 2003 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.35: +8 -1 lines
Diff to previous 1.35 (colored)

Make all architectures (except amiga and mac68k) use the MI make_bsd_partitions.
This does change the default size of /, but I'm going to rewrite
make_bsd_partitions next to make it less user-hostile.
(I'm not sure adding in 2 * ram is actually useful! Especially size it left
/usr with a -ve size on all my test installs with 256MB ram and 1GB disk)
Make bootsel code delete menu names if the partition is unused.
Use raw device for cdrom access (I've a kernel that doesn't report an invalid
label so /dev/cd0a dosn't work).

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 21 10:05:21 2003 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.34: +8 -16 lines
Diff to previous 1.34 (colored)

Reduce the number of global variables slightly, use the ones that are
left consistently.
Make the i386 install let you partition a disk beyond the CHS limit if the
system bios doesn't support LBA reads (the checks aren't ideal yet).
Make the bsddislabel.c code usable onan i386 system - but don't use it yet.

Revision 1.34 / (download) - annotate - [select for diffs], Fri May 16 19:44:23 2003 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.33: +63 -6 lines
Diff to previous 1.33 (colored)

Report number for unknown MBR partition types.
Correct bootseect default for new mbr code.
Add bootsel config code (from arch/i386/md.c)

Revision 1.33 / (download) - annotate - [select for diffs], Wed May 7 19:02:52 2003 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.32: +126 -6 lines
Diff to previous 1.32 (colored)

Pull some code fragments from machine and language dependant files into mbr.c
Resynchronise amd64 with i386

Revision 1.32 / (download) - annotate - [select for diffs], Wed May 7 10:20:18 2003 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.31: +21 -22 lines
Diff to previous 1.31 (colored)

Use C structure mbr_sector_t instead of char[] for 'mbr'.
(I hope the edits for the ports I can't build are right!)
i386/amd64 pick up a minor change to the md_read_bootcode which
might preseve the bootselect config.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Feb 8 09:53:08 2003 UTC (11 years, 5 months ago) by shin
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

fix typo.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 10 20:00:28 2003 UTC (11 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.29: +25 -22 lines
Diff to previous 1.29 (colored)

pass lint[pass1]

Revision 1.29 / (download) - annotate - [select for diffs], Thu Dec 5 01:17:16 2002 UTC (11 years, 7 months ago) by fvdl
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

FILE *log -> FILE *logfp, to avoid warnings about gcc-current's
builtin log() function.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 13 03:58:56 2002 UTC (11 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.27: +7 -2 lines
Diff to previous 1.27 (colored)

if the type of either partition is 0 ("unused"), then these partitions
do not overlap.  from Tyler Retzlaff <rtr@wasabisystems.com> and fixes
PR#12386.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Aug 12 02:22:52 2002 UTC (11 years, 11 months ago) by grant
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

make mbr and disklabel editor consistently use Start, End, Size in
that order.

"offset" -> "start" where applicable.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Fri Aug 2 10:44:39 2002 UTC (12 years ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.25: +5 -1 lines
Diff to previous 1.25 (colored) next main 1.26 (colored)

Pull up revision 1.26 (requested by grant in ticket #610):
fix PR#11945 Tyler Retzlaff <rtr@wasabisystems.com>:
The reason this occurs is because of left over scum in unused partition
table slots for host system parts.  This should clean it up.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Aug 2 05:38:18 2002 UTC (12 years ago) by mrg
Branch: MAIN
Changes since 1.25: +5 -1 lines
Diff to previous 1.25 (colored)

fix PR#11945 Tyler Retzlaff <rtr@wasabisystems.com>:
>The reason this occurs is because of left over scum in unused partition
>table slots for host system parts.  This should clean it up.

Revision 1.22.2.2 / (download) - annotate - [select for diffs], Tue Dec 26 02:08:26 2000 UTC (13 years, 7 months ago) by jhawk
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.22.2.1: +2 -2 lines
Diff to previous 1.22.2.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored)

Pull up revision 1.24 (requested by hubertf):
  Correct an error in the calculation of the end of a partition. Fixes PR#7556.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Dec 22 10:12:13 2000 UTC (13 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored)

de-__P()-ify

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 18 04:52:52 2000 UTC (13 years, 7 months ago) by hubertf
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Fix typo in calculation of partition's end (s/mbrp_size/mbrp_start/).
Fix reported in PR 7556 by Arne Juul <arnej@math.ntnu.no>

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Wed Oct 18 17:51:14 2000 UTC (13 years, 9 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.22: +5 -3 lines
Diff to previous 1.22 (colored)

Pullup (sync with HEAD not including xmisc set changes) [fvdl]:
==
Don't call test(1) to determine the existence/type of files, that's
rather over the top. Not doing this also means that test(1) can
be omitted from the ramdisks (for scripts it's not needed, because it
is built in to sh(1)).
==
On the i386, enable swapspace as soon as the disklabel has been written,
to play nice with low-memory systems.

Add a md_pre_update() hook, to do MD things before an upgrade operation.
On the i386, use it to enable swap.
==
Remove outdated comment.
==
Add a definition for md_init(), an MD function to initialize whatever
needs to be initialized before sysinst starts processing menus.
Call it from main().
==
[i386 only]
* In md_init, determine what kind of bootfloppy we are (either
  by checking uname, or the BOOTMODEL environment var), and set
  the kernel setname accordingly for some bootmodels (tiny and laptop),
  to install GENERIC_TINY and GENERIC_LAPTOP respectively. There's
  no sense in installing plain GENERIC, especially on "tiny" systems;
  it may not even make it far enough to add swapspace on 4M machines.
* Make sure to always install bootcode into the MBR (unless the user
  explicitly tells us not to). Should fix PR#8887, PR#9093, PR#9999
==
[non-i386 md.c files]
Add empty stubs for md_init().
==
[i386]
Fix compare logic error in check for installation of seperate kernel
sets.

Add code to deal with moving a.out libraries to /emul/aout for
upgrading.
==
[i386]
Add 2 defines for a.out library move code.
==
Externalize concat_paths, it is used by arch/i386/md.c now. Add
target_realpath prototype.
==
Add message for a.out library move failure case.
==
Add target_realpath(), a function that expands a pathname on the
"target" filesystem, i.e. a filesystem that will probably be
mounted on /mnt during install/upgrade, but will be / when
the system is booted. Needed to deal with absolute symbolic links.
This function is (unfortunately) a verbatim copy of realpath() from libc,
with prefix handling added.
==
Don't abort when trying to remove a directory marked as obsolete that does
not exist.
==
Create the disktab file directly, no need to waste precious inodes/space
in ramdisks with disktab.preinstall.
==
* Change the interface of run_prog: use a flags argument instead of
  seperate booleans. Add flags to run as a plain 'system()' command,
  fullscreen (but on a pty), and chrooted, and implement their
  functionality. Add a bit of TIOCPKT handling code to handle
  programs messing with term settings better.
* Ask to set the root password at the end of an install.
* Remove a few unneeded comments.
* Sprinkle some touchwin() calls here and there to make the output
cleaner.
  They shouldn't really be needed, but even normal usage (no syslog
  messages) even left the screen messy sometimes.
* Change some messages around that were apparently swapped by accident and
  thus caused confusion.
==
Improve labelling a bit, by allowing some shortcuts to start partitions
where another one ends, and ending partitions where another one start,
or at the start of the disk / until the end of the disk.
==
Stress that if a match is found between a disk device and a BIOS disk,
you really should not be changing the geometry values, unless they
look totally ridiculous due to some BIOS bug.

Disable manual entering of initial partition label values when doing
a custom label. The step was redundant. Just go to the label edit
directly, leaving everything but the c and d partitions empty.
==
Adapt for format change in mbr editing header; it now always displays
the whole partition, and the total disksize.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 17 19:44:28 2000 UTC (13 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.22: +5 -3 lines
Diff to previous 1.22 (colored)

Improve labelling a bit, by allowing some shortcuts to start partitions
where another one ends, and ending partitions where another one start,
or at the start of the disk / until the end of the disk.

Revision 1.11.2.6 / (download) - annotate - [select for diffs], Thu Jun 1 17:35:20 2000 UTC (14 years, 2 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.11.2.5: +5 -6 lines
Diff to previous 1.11.2.5 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Pull up revision 1.22 (requested by fvdl):
  Fix a booting problem when int13 extensions are used (> 8GB),
  and CHS values in MBRs were written from sysinst or fdisk that
  some BIOSes (Adaptec SCSI BIOS 2.20 in particular) didn't like.

Revision 1.22 / (download) - annotate - [select for diffs], Sat May 27 18:41:36 2000 UTC (14 years, 2 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.21: +5 -6 lines
Diff to previous 1.21 (colored)

When converting from relsecs to chs, if the value exceeds the maxmimum
that can be specified with CHS, truncate it to the maximum values that
the BIOS provided, not 1023*255*63. Some BIOSs get awfully cranky when
you do that.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Mar 14 22:42:48 2000 UTC (14 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Convert ask_sizemult to take an argument, so that MBR using ports can
actually call it with the right sectors per cylinder size during
MBR partitioning.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Sep 4 19:49:23 1999 UTC (14 years, 10 months ago) by soren
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.19: +10 -5 lines
Diff to previous 1.19 (colored)

Synchronize partition types with <sys/disklabel_mbr.h>.
Closes PR install/8301 by Jonathan Cline.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jul 30 20:46:10 1999 UTC (15 years ago) by fvdl
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

When converting the end of a partition to CHS, use start + size - 1, not
start + size.

Revision 1.11.2.5 / (download) - annotate - [select for diffs], Mon Jul 12 19:29:37 1999 UTC (15 years ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.11.2.4: +11 -8 lines
Diff to previous 1.11.2.4 (colored) to branchpoint 1.11 (colored)

pullup 1.17->1.18 (fvdl): fix upgrade core dump

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jul 10 23:07:15 1999 UTC (15 years ago) by fvdl
Branch: MAIN
Changes since 1.17: +11 -8 lines
Diff to previous 1.17 (colored)

Don't try to convert the CHS values if not needed. Add extra flag
to write_mbr to for this.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jul 4 08:01:39 1999 UTC (15 years ago) by cgd
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

convert tables to use the new table formatting functons.  i386 tested,
mac68k and bebox bits compiled to the extent possible.  (bebox seems
broken, with duplicated menu names, but it doesn't look like that's my
fault.)

Revision 1.11.2.4 / (download) - annotate - [select for diffs], Thu Jun 24 23:04:10 1999 UTC (15 years, 1 month ago) by cgd
Branch: netbsd-1-4
Changes since 1.11.2.3: +2 -4 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored)

pull up rev(s) 1.16 from trunk. (cgd)

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Wed Jun 23 18:04:26 1999 UTC (15 years, 1 month ago) by cgd
Branch: dynamic-messages
Changes since 1.16: +15 -6 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

commit (on a branch) some steps toward making message layout (word
placement) dynamic.  needs more work, and _much_ testing.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 20 06:08:14 1999 UTC (15 years, 1 month ago) by cgd
Branch: MAIN
CVS Tags: dynamic-messages-base
Branch point for: dynamic-messages
Changes since 1.15: +2 -4 lines
Diff to previous 1.15 (colored)

copyright notice typo fixups, as noticed in PR#7248.  This software
was developed, not develooped.

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Sun May 2 21:43:45 1999 UTC (15 years, 3 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE
Changes since 1.11.2.2: +30 -7 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

pullup 1.14->1.15 (fvdl)

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 2 13:07:15 1999 UTC (15 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.14: +30 -7 lines
Diff to previous 1.14 (colored)

Change partition type if we're installing into an old 386bsd partition.
Check if there's no active partition after MBR editing.
Ask for own MBR to be installed if we're booting from out of CHS range.
Ask for bootselector to be installed if > 1 OS, and configure it.

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Mon Apr 19 15:19:27 1999 UTC (15 years, 3 months ago) by perry
Branch: netbsd-1-4
Changes since 1.11.2.1: +21 -11 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

sync with head. yes, this is an unorthodox pullup.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Apr 14 16:00:42 1999 UTC (15 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.13: +18 -7 lines
Diff to previous 1.13 (colored)

Correct some bugs in mbr handling, which could lead to invalid partition
tables being written on disk:
- when counting non-BSD partitions, use part[i], not part[0]
- when using full disk for NetBSD, initialise all the fileds of the
  mbr entries (especially flags)
- When converting to on-disk format, if start and size = 0, initialise
  c/h/s to 0 for both start and end. convert_mbr_chs() would make an entry
  0/0/0, 0/0/1 which is not bogus, but not what we really want either.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Apr 11 22:40:20 1999 UTC (15 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.12: +4 -5 lines
Diff to previous 1.12 (colored)

- Add 2 functions in label.c, getpartoff()/getpartsize() used to let the user
  enter partitions offet and size. The user can chose unit independantly of
  the unit used for display ('M'/'c'/'s'). These functions do the proper
  bound checks and alignement/roudups. Used in the edfspart menu and
  i386 md_make_bsd_partitions() (other ports should do the change as
  well).
- now that getpartsize() does the rigth thing, kill the swapadj hack (which was
  buggy anyway).
- in i386 md_make_bsd_partitions(), don't propose defaults that don't fit on
  the disk. If the disk is too small, fallback to custom instead.
- fix a bug in mbr.c, where the partition flags would not have always been
  reset. sysinst created me a MBR with 2 active partition. The boot code
  doesn't like it :)
- added a message for eventual mount failures.
- killed donewfs and extracting messages, as we run  the commands in a
  subwindow these messages just flashed on the screen.
- Changes a few exit(1) to return(1), to give the user a second chance.
- added msg_clear() or wclear(stdscr) in a place or two, to make
  display a bit nicer.
- in run_cmd(), if the command succeeded, don't wait for the user to
  press enter.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sun Apr 4 00:25:40 1999 UTC (15 years, 3 months ago) by fvdl
Branch: netbsd-1-4
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

From trunk:
Make sure to get the magic MBR number right (i.e. use u_int16_t).

Revision 1.12 / (download) - annotate - [select for diffs], Sat Apr 3 22:56:22 1999 UTC (15 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Make sure to get the magic MBR number right (i.e. use u_int16_t).

Revision 1.11 / (download) - annotate - [select for diffs], Thu Apr 1 11:33:02 1999 UTC (15 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.10: +4 -1 lines
Diff to previous 1.10 (colored)

Adapt setting of active partition to newer MBR handling.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Mar 31 00:44:48 1999 UTC (15 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.9: +327 -82 lines
Diff to previous 1.9 (colored)

Rework the MBR code, and some of the labelling code.

	* Use structures, not 2-dimensional arrays..
	* Use the DIOCGDEFLABEL ioctl to get the disk information,
	  to avoid confusion with (older) labels.
	* Don't ever call fdisk for partitioning. This was the
	  source of much confusion.
	* For the i386, use the BIOS geometry information passed by
	  the bootblocks.

Lots of things left to do, but it's a start.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jan 21 08:02:18 1999 UTC (15 years, 6 months ago) by garbled
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

This change includes the following:
Scripting and logging functionality for sysinst.
Child programs are run in a "display window" so you can actually see what
	they did before the screen flashes back and you loose it all.
Lots of curses fixups.  Removed nasty endwins that mangled the tty upon
	rentry.
Change the yes/no box to accept Y or N, and not require cursor motion to
	decide one or the other.
Perform curses redraws when doing things that could cause the kernel to
	spew printfs onto your screen.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 21 14:53:36 1998 UTC (16 years ago) by rvb
Branch: MAIN
Changes since 1.7: +9 -5 lines
Diff to previous 1.7 (colored)

Fix BIOS GEOMETRY menu

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jun 20 13:05:49 1998 UTC (16 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.6: +54 -41 lines
Diff to previous 1.6 (colored)

KNF.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Feb 24 05:36:03 1998 UTC (16 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.5: +220 -96 lines
Diff to previous 1.5 (colored)

Move DOS BIOS-geometry and MBR-handling code to MI code for powerpc, arc:
  * Split bios geometry and MBR partition editing code formerly in
    arch/i386/{md,fdisk}.c to mbr.c in mi  directory.
  * Leave /sbin/fdisk parsing/handling code in separate file,
    we may want to change it later. move to mi directory.
  * Create mbr.h with declarations for MBR/BIOS-geomotry code.
    #include "mbr.h" in  i386 md.h.
  * Use symbolic names for 386bsd and new NetBSD partition IDs.

Handle MBRs with both 386bsd and NetBSD partitions less stupidly.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Feb 24 04:32:22 1998 UTC (16 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.4: +5 -2 lines
Diff to previous 1.4 (colored)

Add symbolic names for new  NetBSD MBR partition ID and for Linux.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sat Nov 29 21:56:55 1997 UTC (16 years, 8 months ago) by fvdl
Changes since 1.2.2.1: +27 -16 lines
Diff to previous 1.2.2.1 (colored) next main 1.3 (colored)

Pull these up from the trunk.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Nov 29 21:49:13 1997 UTC (16 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.3: +27 -16 lines
Diff to previous 1.3 (colored)

* Check for an existing MBR not by looking at the geometry, but by looking
  at used partitions. fdisk may report the number of cylinders > 1024
  correctly if no translation is used.
* Print out the end of the partition as well as the size when editing things.
* Enable the user to specify the BIOS geometry if he/she wishes.
* Fix 1023 / 1024 mixup. The reason BIOSs will return 1023 is an old IBM
  convention to use the last cylinder as diagnostic cylinder. The user
  can still skip the last ('real') cylinder if specified.
* Make some messages more verbose.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Tue Nov 25 20:37:36 1997 UTC (16 years, 8 months ago) by phil
Changes since 1.2: +21 -5 lines
Diff to previous 1.2 (colored)

Sync with HEAD.  (fixes PR 4520, 4534, 4536)

Revision 1.3 / (download) - annotate - [select for diffs], Tue Nov 25 20:35:05 1997 UTC (16 years, 8 months ago) by phil
Branch: MAIN
Changes since 1.2: +21 -5 lines
Diff to previous 1.2 (colored)

Reworked partitioning issues for i386, closes PRs 4520, 4534, 4536.
Other tweeks to make install better.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Oct 17 21:10:56 1997 UTC (16 years, 9 months ago) by phil
Branch: MAIN
Changes since 1.1: +9 -11 lines
Diff to previous 1.1 (colored)

Tweeks to make install nicer.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Fri Sep 26 23:02:55 1997 UTC (16 years, 10 months ago) by phil
Branch: GWR
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import of sysinst.  Not quite ready, but other ports want access for
parallel development.  i386 version about 90% complete.  pc532 version
just started, other architectures later in coordination with portmasters.

This is a curses based, menu driven installation program.

Better error checking is needed.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 26 23:02:55 1997 UTC (16 years, 10 months ago) by phil
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>