Subject: port-i386/507: not easy to auto-boot off 2nd drive if it's SCSI
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 10/06/1994 21:20:06
>Number:         507
>Category:       port-i386
>Synopsis:       i386 boot code doesn't make it easy to boot 2nd disk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct  6 21:20:04 1994
>Originator:     John Kohl
>Organization:
>Release:        NetBSD-1.0_BETA
>Environment:
System: NetBSD kolvir 1.0_BETA NetBSD 1.0_BETA (KOLVIR) #29: Tue Oct 4 21:54:31 EDT 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386


>Description:
I have one IDE disk and one SCSI hard disk.  The BIOS calls these drives
0 and 1, respectively.
I have a pair of MBRs (from booteasy), one on each drive.  If I set
drive 0 (IDE)'s default to be a switch to drive 1 (SCSI), and drive 1's
default to be a NetBSD partition on drive 1, the default NetBSD boot
blocks will end up trying to boot off of disk wd1, I believe, or at
least in some way they get confused.
>How-To-Repeat:
see above
>Fix:
If you set the default disk device in the boot code to be the "hd"
driver, rather than the first driver (wd?), then things seem to Just
Work.  With these boot blocks, I can boot a NetBSD partition off of wd0
(BIOS disk 0) via the MBR, or use the MBR to transfer  to sd0 (BIOS disk
1) and boot its MBR and a NetBSD partition from there.
*** 1.1	1994/09/05 22:02:10
--- sys/arch/i386/boot/boot.c	1994/09/13 02:33:11
***************
*** 90,96 ****
  	\***************************************************************/
  	part = 0;
  	unit = drive&0x7f;
! 	maj = (drive&0x80 ? 0 : 2);		/* a good first bet */
  
  	name = names[currname++];
  
--- 90,96 ----
  	\***************************************************************/
  	part = 0;
  	unit = drive&0x7f;
! 	maj = (drive&0x80 ? 1 : 2);		/* a good first bet */
  
  	name = names[currname++];
  

>Audit-Trail:
>Unformatted: