Subject: Re: booting wrong partition (1.4.1)
To: Anne Bennett <anne@alcor.concordia.ca>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 01/14/2002 10:57:36
On Mon, Jan 14, 2002 at 12:37:32AM -0500, Anne Bennett wrote:
> 
> Someone please save my sanity!
> 
> My work on making the SCSI board work in the new system (for those of you
> following my trials and tribulations in this respect) is temporarily on
> hiatus because I have had another disk failure on the old system, so task
> #1 has been to recover the data and get the old system back on its feet.
> 
> I ended up buying an IDE disk (much cheaper than SCSI!), and copying
> my data onto it.  In fact, I now have two copies of the O/S (not
> counting the one on the flakey SCSI disk sd1):
> 
>   copy #1:  root  sd0e
>   (SCSI)    usr   sd0g
>             root  sd0a  <- this one lets the system boot from the
>                            bootblocks, but I specify "boot
>                            sd0e:netbsd" at the boot prompt and it
>                            seems to do the right thing:
>                              boot device: sd0
>                              root on sd0e dumps on sd0b
>                            I am going to put 1.5.2 on sd0a/sd0f when I
>                            have time, which is why 1.4.1 is in a weird
>                            place.  Both sd0a and sd0e have a 1.4.1
>                            root filesystem for now.
> 
>   copy #2: root wd0a
>   (IDE)    usr  wd0e
>                           this copy will not boot properly.  When I
>                           specify "boot wd0a:netbsd", or even "boot
>                           wd0a:netbsd.generic" at the boot prompt, I
>                           get:
>                             boot device sd0
>                             root on sd0a dumps on sd0b
>                           I even tried doing the initial part of the
>                           boot from floppy, then asking for a boot
>                           from wd0a: still the same.
> 
> I am going nuts.  *Why* is this system's initial boot code apparently
> agreeing to boot from my IDE disk (wd0), then sneakily booting from my
> SCSI disk (sd0)???

wd0, wd1, wd2 ... and sd0, sd1, sd2, ...  are only aliases to really what
matters to the boot code: hd0, hd1, hd2, ... (which are also called
C,D,E,... by the BIOS).

The boot code uses the BIOS to load the kernel, and so doesn't know if the
disk is IDE or SCSI. All it knows is "disk 0", "disk 1", etc ...
So saying wd0 or sd0 at the boot prompt both points to hd0, the first
BIOS disk.
I don't know what number your IDE disk is, or even if the bios can boot from
it at all when the SCSI bios has priority (the "boot IDE/SCSI fist" option
in some PC), it depends on your SCSI bios and on your setup.
Check what you SCSI bios say about disks, it should assign C to the fisrt
bootable disk, D to the second, etc ...
You may  be able to tweak the SCSI bios so that it assigns only one bootable
disk, so that D (or hd1) gets assigned to your IDE disk.

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