Subject: Re: i386 disklabel placement on non NetBSD disk
To: None <netbsd-help@netbsd.org>
From: James Thompson <list_mail@softhome.net>
List: netbsd-help
Date: 10/15/2002 08:58:32
Frederick Bruckman wrote:
> On Sun, 13 Oct 2002, James Thompson wrote:
> 
> 
>>I have a disklabel on a slave drive that looks similar to this:
>>
>>disklabel for /dev/wd1
>>8 partitions:
>>#        size    offset     fstype  [fsize bsize cpg/sgs]
>>  d:  19931184         0     unused      0     0         # (Cyl.    0 -
>>19772)
>>  e:  19920537        63      MSDOS                      # (Cyl.    0*-
>>19762*)
>>disklabel: boot block size 0
>>disklabel: super block size 0
>>
>>Noting that there is no NetBSD part whatsoever, now I've set this label
>>up as above so that I may mount the msdos partition in order to obtain
>>access to files on the msdos only disk.
>>
>>Now was it an error on my part to have written such a label to the disk
>>with disklabel -r?
> 
> 
> You should have been prompted to "overwrite the previous contents
> of the disk". From what you say below, it looks like no label was
> written, for whatever reason, so no harm done.
> 
> 
>>If I understand correctly the disklabel is normally stored inside
>>partition c on i386 computers (the netbsd part of the disk) but in this
>>case that part does not exist since the entire drive is devoted to
>>msdos.  So my question is where has this label been written to?
> 
> 
> I suspect it wasn't written to disk at all. If "disklabel wd1" seems
> to print a label, but then sends "no disklabel" to standard error, it
> means that the label you're looking at is faked (from the MBR).

Ok, if it hasn't been written to disk then where is the
partition information persisting from?  I guess thats whats
confusing me the most.  I mean shouldn't the 'e' partition
disappear after a reboot if the label isn't written to disk?

> 
>>Pending the above can a disk that is entirely devoted to msdos be
>>mounted under netbsd.  (This has worked but will it cause data loss on
>>the msdos partition?)
> 
> 
> In this case, yes, as the faked label is adequate. Just mount
> "/dev/wd1e" as you normally would. ("Extended" partitions require
> greater finesse, but fortunately, you needn't worry about that.)
> Note, there are known problems with writing to NTFS partitions,
> but read/write to FATxx works fine.
> 
> 
>>I should mention that on boot I get complaints that say "wd1: has no
>>disklabel" even though it does have an kernel disklabel.  Is there any
>>way to get rid of this error if what I'm trying to do isn't incorrect?
> 
> 
> No, but it's harmless.
> 
> Frederick
> 
>