Subject: Re: Using disklabel -e wd0 to add new partition
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 01/31/2002 09:30:58
> I think you wanted disklabel -e -r wd0 (or maybe -R instead of -r).
> 
> This brings up something I've always wondered:
> 
> Is there ANY ever reason to update only the in-core disklabel versus
> the on-disk label?  If there is, I would stipulate that it doesn't
> happen that damn often.  Maybe we should change the defaults for disklabel
> so by default it always updates the in-core and on-disk disklabel?  It
> sure would eliminate a lot of confusion.

RTFC!

I looked at this code recently, disklabel (on i386 anyway!) always
updates the kernel label AND the on disk label.  All the -r flag does
(with -R) is make disklabel write to the disk instead of the kernel.

For what I was doing I wanted to write a label to the disk WITHOUT
telling the kernel (I was trying to write one to a different sector).

Maybe the operation out to work by getting disklabel to update the disk
then request the kernel re-read the label information.  This would be
needed if, for example, partitions 1-4 (and maybe extended ones) were
automajically included in the in core disklabel and you have just run
fdisk.

	David