Subject: Re: boot switch program
To: Roland McGrath <roland@frob.com>
From: Jason R. Thorpe <thorpej@cs.orst.edu>
List: current-users
Date: 01/12/1994 17:35:08
On Tue, 11 Jan 1994, Roland McGrath wrote:

> This must be a common question; sorry.  I want to be able to pick at boot
> time between booting netbsd from an IDE disk and booting MSDOS from a SCSI
> disk.

Here's how I'd do it...

Go into your CMOS setup...
to boot from the ide disk tell the CMOS that it exists...

to boot from the SCSI disk tell the CMOS that the ide doesn't exist.

> 
> I have two disks, an ~400MB IDE disk (wd0), and a 1.2GB SCSI disk (sd0)
> with an Adaptec 1542 controller.  On wd0 I think I have no DOS partition
> table at all, and three netbsd partitions (root and two swap areas).  On
> sd0 I have a DOS partition and three netbsd partitions (two ufs and one
> swap).
> 
> NetBSD boots from wd0a.  I would like to be able to tell the boot program
> to boot MSDOS from sd0a instead.
> 
> Can anyone point me at the program I'm looking for?
> 
> Here in case useful are the output of `fdisk' and `disklabel' on my two disks:
> 
> baalperazim 16 % fdisk /dev/rwd0d
> ******* Working on device /dev/rwd0d *******
> parameters extracted from in-core disklabel are:
> cylinders=989 heads=15 sectors/track=56 (840 blks/cyl)
> 
> parameters to be used for BIOS calculations are:
> cylinders=989 heads=15 sectors/track=56 (840 blks/cyl)
> 
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 0 is:
> <UNUSED>
> The data for partition 1 is:
> <UNUSED>
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> sysid 165,(NetBSD)
>     start 0, size 50000 (24 Meg), flag 80
> 	beg: cyl 0/ sector 1/ head 0;
> 	end: cyl 1023/ sector 63/ head 255
> baalperazim 17 ] disklabel wd0
> # /dev/rwd0d:
> type: ST506
> disk: caviar
> label: 
> flags:
> bytes/sector: 512
> sectors/track: 56
> tracks/cylinder: 15
> sectors/cylinder: 840
> cylinders: 989
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0		# milliseconds
> track-to-track seek: 0	# milliseconds
> drivedata: 0 
> 
> 5 partitions:
> #        size   offset    fstype   [fsize bsize   cpg]
>   a:   757680        0    4.2BSD     1024  8192    16 	# (Cyl.    0 - 901)
>   b:    40320   757680      swap                    	# (Cyl.  902 - 949)
>   c:   830760        0    unused        0     0       	# (Cyl.    0 - 988)
>   d:   830760        0    unused        0     0       	# (Cyl.    0 - 988)
>   e:    32760   798000      swap                    	# (Cyl.  950 - 988)
> baalperazim 18 { fdisk /dev/rsd0d
> ******* Working on device /dev/rsd0d *******
> parameters extracted from in-core disklabel are:
> cylinders=991 heads=64 sectors/track=32 (2048 blks/cyl)
> 
> parameters to be used for BIOS calculations are:
> cylinders=991 heads=64 sectors/track=32 (2048 blks/cyl)
> 
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 0 is:
> sysid 6,(Primary 'big' DOS (> 32MB))
>     start 32, size 122848 (59 Meg), flag 80
> 	beg: cyl 0/ sector 1/ head 1;
> 	end: cyl 59/ sector 32/ head 63
> The data for partition 1 is:
> sysid 165,(NetBSD)
>     start 122880, size 1906688 (931 Meg), flag 0
> 	beg: cyl 60/ sector 1/ head 0;
> 	end: cyl 990/ sector 32/ head 63
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> baalperazim 19 $ disklabel sd0
> # /dev/rsd0d:
> type: SCSI
> disk: Micropolis 1598
> label: 
> flags:
> bytes/sector: 512
> sectors/track: 32
> tracks/cylinder: 64
> sectors/cylinder: 2048
> cylinders: 991
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0		# milliseconds
> track-to-track seek: 0	# milliseconds
> drivedata: 0 
> 
> 6 partitions:
> #        size   offset    fstype   [fsize bsize   cpg]
>   a:   122848       32    MS-DOS                    	# (Cyl.    0*- 59*)
>   b:   122880   122880    unused        0     0       	# (Cyl.   60 - 119)
>   c:  1906688   122880    unused        0     0       	# (Cyl.   60 - 990)
>   d:  2029568        0    unused        0     0       	# (Cyl.    0 - 990)
>   e:   245760   245760    4.2BSD     1024  8192    16 	# (Cyl.  120 - 239)
>   f:  1538048   491520    4.2BSD     1024  8192    16 	# (Cyl.  240 - 990)
> baalperazim 20 % 
> 
> 
> Thanks,
> Roland
> 

-----------------------------------------------------------------------------
Jason R. Thorpe                thorpej@cs.orst.edu                   737-9533
OSU CS Support                    CSWest Room 12                     737-2552
      'These are my opinions and not necessarily those of my employer.'


------------------------------------------------------------------------------