Subject: labelling a linux disk
To: None <netbsd-help@netbsd.org>
From: Alan Post <apost@interwoven.com>
List: netbsd-help
Date: 01/30/2003 04:14:51
I have an IDE HD that a friend formatted using RHL. It's
got lots of data on it that I'd rather not lose, and which
I'm not in a position to back up.
I am using the NetBSD ext2fs support to use the disk. The
wd driver, though, keeps complaining that the disk has no
disklabel. The disk *does* have a partition table that
the kernel is picking up just fine. In fact, I can mount
and use the drive with no problem. If I add it to fstab,
however, at reboot the system gets very unhappy with the
drive and drops into single-user mode.
So I figure that I need to add a label.
Running disklabel -i -I wd1, as suggested by disklabel(8),
comes up with the correct partition table. When I ask it
to write the label to the disk, though, it says:
$ disklabel -i -I wd1
partition> P
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
d: 240121728 0 unused 0 0 # (Cyl. 0 - 238215)
e: 4195233 63 Linux Ext2 0 0 # (Cyl. 0*- 4161)
f: 235926432 4195296 Linux Ext2 0 0 # (Cyl. 4162 - 238215)
partition> W
Label disk [n]? y
Erase the previous contents of the disk? [n]:
$ disklabel -r wd1
disklabel: no disklabel
$
Do I have to say "y" to the second question? I don't
want to erase the contents of the disk.
$ disklabel -i -I -r wd1
has the same (lack of) effect.
Alan