Subject: Re: Boot an IDE drive on port-i386 - pardon
To: Martin Weber <Ephaeton@gmx.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 08/05/2001 14:59:40
On Sat, Aug 04, 2001 at 11:42:53PM +0200, Martin Weber wrote:
> Okay this is my idiocy seemingly.
> 
> So here comes my problem. When I _upgraded_ to netbsd I had a machine with 
> two ide drives and an installed linux. Linux was living on the first disk, 
> using the second disk for some data. As I did not want to deal with lilo 
> booting the netbsd loader, I switched the boot priority in my bios, masking 
> the second drive as the first and vice versa (that is, at boot time, my wd0 
> is my wd1 and other way round, when the system boots it's "right" again.) I 
> had some problems with the "old" (second) ide drive understanding DMA, and as 
> I managed all the moving of all the data from the linux drives to the NetBSD, 
> I was newfsing and fdisking/disklabeling the linux drive (which understands 
> DMA fine) and pax'ed the data from the second drive to the first (means atm I 
> have two mirrors of my working NetBSD system - one on wd0, one on wd1). Now I 
> want to boot from my first ide so after paxing, I booted into wd1a:netbsd 
> from the boot menu (as I said, wd1 really is wd0) and ran installboot -f 
> /usr/mdec/biosboot.sym /dev/rwd0a. Okay, then I rebooted, and changed 
> priority in bios, so wd0 REALLY is wd0 now. Gives me a "read err". Okay, so I 
> thought I made something wrong, changed priority and booted via my old disk. 
> Checked fdisk, which says I have a 16 sector (0 MB) bios partition on wd0. 
> Erm strange. I went into fdisk and corrected the information. Ran installboot 
> again. Now fdisk says again I have a 16 sector thing at :3 . hmm rebooted, 
> did not work. Tried fdisk -B and installboot in various combinations (run 
> this or that , or first this and then that or first that and this) and it 
> either gives me a bootmenu (F4:NetBSD) which prints again and again and does 
> not boot anything or a "read err". Hmm. I don't know how to procede further. 
> Here is some verbose info about my box :
> 
> phaeton# fdisk wd0
> NetBSD disklabel disk geometry:
> cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
> 
> BIOS disk geometry:
> cylinders: 1022 heads: 255 sectors/track: 63 (16065 sectors/cylinder)
> 
> Partition table:
> 0: <UNUSED>
> 1: <UNUSED>
> 2: <UNUSED>
> 3: sysid 169 (NetBSD)
>     start 0, size 19807200 (9671 MB), flag 0x80
>         beg: cylinder    0, head   0, sector  1
>         end: cylinder 1021, head 254, sector 63

You don't want to start your NetBSD partition at sector 0, as you
need some space to hold the partition table.
Make it start at 63 (which, unfortubably, mean you have to
disklabel/newfs/copy the data again).

--
Manuel Bouyer <bouyer@antioche.eu.org>
--