Subject: Re: CVS commit: src
To: Wolfgang Solfrank <ws@tools.de>
From: Robert V. Baron <rvb@cs.cmu.edu>
List: source-changes
Date: 09/29/1998 10:28:08
Below are my comments to Wolfgang Solfrank <ws@tools.de>:
I neglected to post to source-changes@netbsd.org

I'm pretty sure that we are both wrong.  But I'll let you
fix it for 1.3.3.  First, if I do an fdisk -i, I really think you 
shouldn't second guess and decide if that's what I want to
do.  (I've not had the chance to look at your change yet, but
I don't see how it would change my opinion.)

So what is really wrong.  Certainly, I goofed in my attempt to make
sure that fdisk -i never happens again.  (You sort of get that
way after you spend a day or two restoring your disk.)  You
are right; you need to initialize an empty disk.  The problem is
sysinst.  There are two flags, mbr_present and bstuffset.  It is 
mbr_present that should be used to control fdisk -i.  At present,
(1.3) mbr_present == 0, causes the geometry stuff to be called
which then sets bstuffset.  At present, bstuffset controls the 
fdisk -i.  The problem is that there other ways into the geometry
code ... that sets bstuffset and ...

So I'll fix current (as indicated above) if there are no objections
and you fix 1.3.3
				thanks.

> Hi,
> 
> > But what if you REALLY want to blow away the partition table?
> 
> You explicitly initialize the four partitions to zero.
> 
> That's what you have to do with DOS fdisk, too.  (Yes, I did test it, and
> no, even fdisk/mbr doesn't initialize the partition table, only the boot code,
> i.e. out fdisk -i is now the same as DOS fdisk/mbr).
It is different than the previous operation of fdisk -i, but certainly
reasonable to have it behave like dos fdisk.  The problem still
remains in the scenario I described above; you will
accidentally do an fdisk -i when you go to set the geometry and this
will blow away whatever multibooter you are using -- not good.

> 
> One might argue that a "fdisk -f -u -1 -s 0/0/0" should be changed to make
> the partition entry all zero (currently it initializes the beginning sector
> to 1).  Currently you can zero out an entry completely only by using the
> interactive mode.
> 
> Ciao,
> Wolfgang
> -- 
> ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800