*BSD News Article 34923


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!bocanews.bocaraton.ibm.com!portal.austin.ibm.com!awdprime.austin.ibm.com!radha
From: radha@austin.ibm.com (Radha Krishnan)
Subject: Re: [FreeBSD] Booting frm sd0 as default?
Originator: root@worf.cet.austin.ibm.com
Sender: news@austin.ibm.com (News id)
Message-ID: <Cv3KA8.3qHu@austin.ibm.com>
Date: Thu, 25 Aug 1994 15:27:43 GMT
References: <miff.777745860@apanix.apana.org.au> <vanepp.777775284@sfu.ca> <Cv2vs7.HIH@tfs.com>
Organization: IBM Austin
Keywords: booting FreeBSD
Lines: 97


In article <Cv2vs7.HIH@tfs.com>, julian@tfs.com (Julian Elischer) writes:
> In article <vanepp.777775284@sfu.ca>,
> Peter Van Epp <vanepp@fraser.sfu.ca> wrote:
> >miff@apanix.apana.org.au (Michael Smith) writes:
> >>I have 2 disks : one wd-style, with DOS alone.  One sd-style, with 
>  
> >>I've tried changing
>  
> >>	part = unit = 0;
> >>	maj = (drive&0x80 ? 0 : 2);
>  
> >>in /sys/i386/boot/boot.c to 
>  
> >>	part = 0;
> >>	unit = 1;
> >>	maj = 1;
> 
> >
> >	Try:
> >
> >	unit = drive & 0x7f;
> >	part = 0;
> >	maj = (drive&0x80 ? 0: 2);
> >
> 

I've precisely these changes only; My setup is two SCSI drives, and OS2 
Bootmanager on sd0 ( dedicated to DOS/Os2-2.1 with a spare to create a usable
 *BSD Partition, without disklabeleing the same! ).

Just those changes in boot.c get me the boot-Manager, letting me boot off from
sd(1,a)/386bsd without any problem or prompting. 

Just wanted to clarify that it works, atleast in case of SCSI drives hung off
from 1742A.
> the end result you want is to have from boot.c is:
> maj=1 
> part=0 
> unit=1
> as you suggest
> so as to trigger the 'tricky bit' in sys.c
> 
>      case 1:
> 	dosdev = unit | 0x80;
> 	unit = 0;
>      	break;
> 
> leaving you with:
> dosdev == 0x81 (D:)
> unit == 0	(sd or wd)0
> maj = 1		
> 
> then in disk.c, the further transformation happens:
>                if( (maj == 4) || (maj == 0) || (maj == 1))
>                 {
>                         if (dl->d_type == DTYPE_SCSI)
>                         {
>                                 maj = 4; /* use scsi as boot dev */
>                         }
>                         else
>                         {
>                                 maj = 0; /* must be ESDI/IDE */
>                         }
>                 }
> which basically says:
> for any kind of hard disk, select the major number
> according to what the disklabel says it is..
> 
> so..
> 
> the end result is:
> 
> maj==4
> part==0
> unit==0
> dosdev==1
> 
> theoretically, if you had two scsi,
> wd1 would boot sd1 just fine..
> 
> 
> I have no idea why the change made by Mike Smith did not work.
> but he's definitly on the right track..
> 
> julian
> (I wrote a lot of this horrid code (but several years ago)).
> 

Radha

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

Radha Krishnan				Email: Radha@austin.ibm.com ( Work )
					       radha@krish.zilker.net ( Home )

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