Subject: Re: CVS commit: src
To: None <>
From: Wolfgang Solfrank <>
List: tech-install
Date: 10/01/1998 22:54:01

> > Or your disk doesn't have a valid mbr, i.e. the last 2 bytes don't have
> > a valid magic number.  Then the new fdisk (after my changes) will
> > automagically initialize the boot code, an empty partition table and
> > the magic number during the first time it writes the mbr to disk.
> This is the detail I missed and am concerned about.  If the disk has
> no valid mbr, it is either because there is no valid mbr or the user
> has screwed up big time (say pointing you at the wrong disk).  I am
> reluctant to do the logical 'fdisk -i' for him.  If you give him the
> option to abort, because there is no mbr, then yes your scheme is ok.

But that's not really different from what we have already.  The old fdisk
code would do mostly the same (yes, even if _not_ called with the -i option).
The only difference is that the old code does initialize the partition entry
3 as a partition covering the whole disk except the first track, while the
new code initializes all four partitions to zero.

In addition, you still seem to have missed the part where I wrote "...
during the first time it writes the mbr to disk".  Or maybe, I haven't made
that clear enough?  What I meant is, the boot code and partition table are
initialized on disk, if you instruct fdisk to write the mbr anyway.  I.e.,
if you call fdisk with any of the options -i, -u or -a.

Does this make it clearer?

> > Actually it will initialize its incore data structures even if it
> > doesn't write to disk, so it will tell sysinst that the partition table
> > is empty.  With sysinst, you then add a NetBSD partition, and when
> > sysinst calls fdisk again to write this partition (using the fdisk -u...
> > below the fdisk -i you removed), fdisk will initialize the mbr on disk.
> It is an extension that I had not appreciated earlier, that fdisk would
> install boot code (i.e. fdisk -i), when it was installing mbr
> partition records, if the mbr was invalid.

You mean, in this case it does (and always did), what fdisk -i pin the old
code did (again ignoring partition entry 3).

ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800