Subject: Re: Labelling a disk
To: Arto Huusko <arto.huusko@maailma.yok.utu.fi>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 01/21/2001 14:25:23
On Sun, Jan 21, 2001 at 01:55:25PM +0200, Arto Huusko wrote:
> 
> Hi,
> 
> I've got NetBSD 1.5 on an i386 system. I've got two IDE hard drives,
> wd1 is dedicated to NetBSD and wd0 hosts currently Win98 and other
> stuff.
> 
> I'd like to install disklabel for wd0 so that I could actually use
> it on the NetBSD side, too. Given my understanding of the disklabel
> man page I said:
> 
>  disklabel -i -I wd0
> 
> And set up the partition table in the way NetBSD had read it from
> the hard drive.
> 
> Then I press 'W' to write the data, and I get:
> 
> Erase the previous contents of the disk [n]:
> 
> What the hell is this? Can't I install the disklabel on the disk
> anymore without losing all the data? Or is it just asking about
> erasing the old partition *table* or whatever the Windows
> equivalent of disk labels is. What am I to do?

When there's no NetBSD partition a disk, the kernel constructs a fake
disklabel from the dos partition table.
What does 'disklabel wd0' returns ? Maybe it's enouth for you ?

If there's no NetBSD partition and try to write a disklabel it'll write it
at the beggining of the disk, erasing the partition table.

--
Manuel Bouyer <bouyer@antioche.eu.org>
     {Net,Free}BSD: 22 ans d'experience feront toujours la difference
--