Subject: Re: Some questions about disklabeling.
To: Ib-Michael Martinsen <imm@nethotel.dk>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 03/28/2002 11:14:53
On Thu, 28 Mar 2002, Ib-Michael Martinsen wrote:

> I have a second 30 GB DOS disk connected to my NetBSD system, which I
> would like to be able to read from NetBSD. To be able to do this I
> know I must disklabel it. But I am a little unsure of what happens
> with the content of the disk. Is it damaged (i.e. will the disk be
> unreadable from DOS/Windows)?

> I am not booting from the disk, but if I were would it then be
> impossible to boot after disklabeling the disk?
>
> Where execatly is the disklabel written on the disk? In the
> Master Boot Record or some place else?

The disklabel goes in the NetBSD MBR partition, if there is one, but if
not, yes, it *is* likely to overwrite something important to Windows.

But if the disk has only have one Windows partition, you won't need to
disklabel that disk -- the fake label will be adequate. If you type
"disklabel wd1"  and see an MSDOS type partition, you can just mount
that, with "mkdir /c; mount -t msdos /dev/wd0e /c", or similar.

> And what is the difference between the disklabel and mbrlabel
> commands?. In which situations would you prefer the one for
> the other?

mbrlabel does automatically what disklabel does by hand, but if there's
no NetBSD partition at all, it'll have the same problem that disklabel
does -- there's no safe place to write the label. mbrlabel used to
(does?) have an option to update the in-kernel label without writing
anything to disk, but that's very tricky and dangerous if the option is
even still there.

Frederick