Subject: Re: Wrong disk partition info
To: Simon Truss <simon@bigblue.demon.co.uk>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-help
Date: 04/15/2000 21:05:24
>I'm currently only able to boot my laptop from a 1.4 CD I made some time ago.
>The machine boots fine using 'boot wd0a:netbsd' but fails with all mbr's I've
>tried and boot selectors. I've only just noticed that the info produced by
>fdisk looks wrong. The output from disklabel looks ok. So from the following
>info can anyone suggest what I need to do to fix this?
>The first partition is Win2K, the second is 1.4 and will be 1.4.2 when I
>can find the disk space on my other machine to build the new userland etc.
>...
>sectors/track: 63
>tracks/cylinder: 15
>sectors/cylinder: 945
>cylinders: 8944
>total sectors: 8452080
>...
>0: sysid 7 (OS/2 HPFS or NTFS or QNX2 or Advanced UNIX)
>    start 63, size 6136767 (2996 MB), flag 0x80
>	beg: cylinder    0, head   1, sector  1
>	end: cylinder 1023, head 255, sector 63
>1: sysid 169 (NetBSD)
>    start 6136830, size 2313360 (1129 MB), flag 0x0
>	beg: cylinder 1023, head 255, sector 63
>	end: cylinder 1023, head 255, sector 63

been there, done that.  about two weeks ago, in fact.  :)

run fdisk -i on that disk and tell it no, you don't want the change
what the bios thinks, and then, for each partition:

 * yes, you want to change the partition
 * just keep all the defaults (fdisk will recalculate cyl/head/sector for you)
 * no, you don't want to explicitly specify beg/end address
 * yes, this entry is okay

then, tell it yes, write the new partition table.  doing this made the
netbsd boot selector work like a charm for me.

i think Manuel Bouyer <bouyer@antioche.lip6.fr> was the first to
suggest this to me.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."