Subject: Re: booting from sd0 instead of wd0?
To: port-i386@NetBSD.ORG, Jukka Marin <jmarin@pyy.jmp.fi>
From: William O Ferry <WOFerry+@CMU.EDU>
List: port-i386
Date: 01/29/1997 20:38:39
Excerpts from internet.computing.netbsd.port-i386: 29-Jan-97 booting
from sd0 instead of.. by Jukka Marin@pyy.jmp.fi 
> Finally installed a usable SCSI disk.. how do I make the system boot off
> sd0a instead of wd0a if both disks have valid bootblocks?  I have an NCR
> SCSI card which is supported by BIOS.

    I changed the following two lines in the file:

/usr/src/sys/arch/i386/boot/boot.c

    The main part is changing the major number from 0 to 1.  This refers
to the declaration in boot/disk.c
char *devs[] = {"wd", "hd", "fd", "", "sd", 0};
so that rather than defaulting to 0 (wd), it chooses 1 (hd).


--- boot.c.orig Fri Dec 20 03:42:00 1996
+++ boot.c      Fri Dec 20 03:42:00 1996
@@ -85,7 +85,7 @@
                
        printf("\n"
               ">> NetBSD BOOT: %d/%d k [%s]\n"
-              "use hd(1,a)/netbsd to boot sd0 when wd0 is also installed\n",
+              "use wd(1,a)/netbsd to boot wd0 when sd0 is also installed\n",
                argv[7] = memsize(0),
                argv[8] = memsize(1),
                version);
@@ -95,7 +95,7 @@
                * As a default set it to the first partition of the
first       *
                * floppy or hard drive                                  
       *
               
\***************************************************************/
-               maj = (drive & 0x80 ? 0 : 2);   /* a good first bet */
+               maj = (drive & 0x80 ? 1 : 2);   /* a good first bet */
                unit = drive & 0x7f;
                part = 0;


Hope that helps!

                                                          Will Ferry

--------------------------------------------------------------------------
William O Ferry <woferry@CMU.EDU> | finger:  woferry@WarpDrive.RES.CMU.EDU
talk:  finger for online status   | http://warpdrive.res.cmu.edu/~woferry/
--------------------------------------------------------------------------