Subject: Re: labelling a linux disk
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 01/30/2003 10:25:04
> /dev/wd1f /mnt/wd1f ext2fs rw 1 2

/dev/wd1f /mnt/wd1f ext2fs rw,noauto 1 2

will stop the mount at boot time, it might be barfing on the fsck.
Doing one by hand might help.

> >> So I figure that I need to add a label.
> > 
> > That would need a netbsd partition, creating one would delete
> > one of the Linux ones as there isn't any space...
> 
> The first Linux partition (wd1e) is expendable.
> 
>  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)
> disklabel: boot block size 0
> disklabel: super block size 0
> 
> > disklabel is lying, since you actually need to run fdisk first.
> 
> If I run fdisk, will that clobber the data in wd1f, which I care about?

No, fdisk will only write to sector zero.
You can safely change the type of partiton 0 (aka 'e' above)
to 169 (ie netbsd).

disklabel should then be 'happy' to write a label - which would
be written over sector 64 (which is actually, almost certainly,
unused in the ext2 filesystem [1], so you could revert things).

You may have to type all the sector numbers into disklabel,
mbrlabel(8) may, or may not, be useful.

	David

[1] it may affect the ability of that partition to be a boot partition.

-- 
David Laight: david@l8s.co.uk