Subject: Re: labelling a linux disk
To: None <netbsd-help@netbsd.org>
From: Alan Post <apost@interwoven.com>
List: netbsd-help
Date: 01/30/2003 12:43:10
Thanks for your help!

In article <20030130102504.C968015@snowdrop.l8s.co.uk>, David Laight wrote:
>> /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.

Unfortunately, fsck_ext2fs crashes with a "floating point exception"
when I invoke it.  (Floating point numbers in a file system????)
Running gdb on the core file shows:

Program terminated with signal 8, Floating point exception.
#0  0x804e7a6 in ?? ()
#1  0x804dca1 in ?? ()
#2  0x804abe4 in ?? ()
#3  0x804ab0c in ?? ()
#4  0x804825c in ?? ()

I suppose I need to recompile fsck_ext2fs with debugging info?

> 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).

This worked great.  No more kernel logs about missing the missing
disk label.

  Alan