Subject: Re: CVS commit: src
To: Wolfgang Solfrank <>
From: Robert V. Baron <>
List: tech-install
Date: 10/01/1998 16:30:36 (Wolfgang Solfrank) writes:

> Ok, so far.  But if we agree on this, why would you say below:
We really do agree.  See my below.

> 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.

> 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.

> No need for the user to run fdisk himself.

> > Clearly, the old code was broken and in a number of other ways, too.  Let's
> > just fix it.
> Agreed.  But I can't see, how the new code is broken (apart from the
> problem to determine the bios geometry that is, but that's a somewhat
> separate problem).
> Ciao,
> Wolfgang
> -- 
> ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800