Subject: Re: problems making an IDE drive bootable....
To: NetBSD/i386 Discussion List <port-i386@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 03/29/2001 18:21:13
On Wed, Mar 28, 2001 at 11:35:27PM -0500, Greg A. Woods wrote:
> I've got this little old Pentium box that's acting as my home router and
> firewall.  I've recently upgraded it to 1.5F (2000/09/21), and then one
> day soon after that I made a mistake (which I've recently posted about:
> I over-wrote the first part of the main disk because /dev/rwd0d is not
> protected when securelevel >= 1) and I had to re-install.
> 
> Ever since then I've been unable to make the damn thing boot from the
> IDE drive again.  It did boot just fine before the accident and now it
> just locks up with the HD activity light coming on full for a second or
> so (after the floppy boot fails) and then flickering so fast it looks as
> though it's on at half-brightness.  (the machine is operational using
> the boot loader from a floppy with "boot wd0a:netbsd" for now.)
> 
> Tonight it crashed again (as it's been doing occasionally -- I'll have a
> new -current release ready to try on it very soon) and so I had a chance
> to experiment with the boot issue again.
> 
> Here's what I did:
> 
> 1. I trashed the MBR and rebuilt it with fdisk:
> 
> 	dd if=/dev/zero of=/dev/rwd0d count=1
> 	fdisk -i wd0
> 	fdisk -i -u wd0
> 	fdisk -a wd0
> 
>    I have tried various different configs using either the first fdisk
>    partition or the last; explicitly specifying the full disk or just
>    enought to cover /boot, etc..  The current fdisk partition table is:
> 
> 	# fdisk wd0
> 	NetBSD disklabel disk geometry:
> 	cylinders: 723 heads: 13 sectors/track: 51 (663 sectors/cylinder)
> 	
> 	BIOS disk geometry:
> 	cylinders: 722 heads: 13 sectors/track: 51 (663 sectors/cylinder)
> 	
> 	Partition table:
> 	0: sysid 169 (NetBSD)
> 	    start 0, size 50000 (24 MB), flag 0x80
> 	        beg: cylinder    0, head   0, sector  1
> 	        end: cylinder   75, head   5, sector 20
> 	1: <UNUSED>
> 	2: <UNUSED>
> 	3: <UNUSED>

You NetBSD partition should not start at 0, but at 51 (yes, fisrt trak unused).
You disklabel says the c partition starts at 51 anyway.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--