Subject: Re: How to...
To: None <adam@pulstar.albedo.com.pl, bouyer@antioche.lip6.fr>
From: Wolfgang Solfrank <ws@tools.de>
List: current-users
Date: 11/23/1998 15:30:13
Hi,

> then move your disk, and restore the disklabel (in kernel memory only):
> disklabel -R xxx disklabel_txt

Note that this will _not_only_ set the in memory disklabel, but will also
try to write a label to the disk!  Most likely you'll be lucky however,
since the write of the disklabel will fail, as it will only overwrite a
valid disklabel, but will fail to find one that adheres to the way i386
stores disklabels (and probably vice versa, too).

This is arguable a bug in the disklabel utility.  There should probably be
an option that allows setting the incore disklabel without affecting even
a valid disklabel on the media.

BTW, note that the changed incore-only disklabel will be lost on the
last close of a partition.  In order to retain it long enough to allow
mounting and access to the partitions, you'll have to keep the label open
between the disklabel run and the mount command.  E.g. on the PC you might
want to use:

	# sleep 100</dev/rsd0d &
	# disklabel -R /dev/rsd0d disklabel_txt
	# mount /dev/sd0a /mnt

Hope it helps.

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