*BSD News Article 34903


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!torn!nntp.cs.ubc.ca!unixg.ubc.ca!news.mic.ucla.edu!news.bc.net!newsserver.sfu.ca!sfu.ca!vanepp
From: vanepp@fraser.sfu.ca (Peter Van Epp)
Newsgroups: comp.os.386bsd.questions
Subject: Re: [FreeBSD] Booting frm sd0 as default?
Date: 25 Aug 94 00:41:24 GMT
Organization: Simon Fraser University
Lines: 51
Message-ID: <vanepp.777775284@sfu.ca>
References: <miff.777745860@apanix.apana.org.au>
NNTP-Posting-Host: fraser.sfu.ca
Keywords: booting FreeBSD

miff@apanix.apana.org.au (Michael Smith) writes:

>Gotta be a FAQ 8) (but I can't find it there 8( )

>I have 2 disks : one wd-style, with DOS alone.  One sd-style, with 
>FreeBSD.

>I have boot-easy to boot the second disk for me, that's fine.
> 
>I can type hd(1,a)/386bsd and boot from the second disk just dandy, but
>I'm not always there, and it doesn't take very long for most
>machines to count from 240,000 to zero these days.

>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;

>but then horrible things happen... the segment of the prompt that looked
>like [[[wd(0,a) now looks like [[[f(0,a.
>This doesn't make a lot of sense to me - devs[maj] should be "hd" for
>maj == 1.

>Who wrote it? who can I hit? 8)

>Seriously - if anyone (and I can only assume that someone must) has done
>this before, I'd love to hear about it.

	Try:

	unit = drive & 0x7f;
	part = 0;
	maj = (drive&0x80 ? 0: 2);

This works for me for booting via a modified bootmenu from the second IDE
drive, and I expect should work for a SCSI as the second drive (which will
appear as unit 0x81 the same as my second IDE), although I haven't tried
that combination yet. This will continue to use what ever drive you managed
to boot off (although again I have not tried this on a third drive, and 
it won't work with two IDEs and a SCSI on an Adaptec 1542 for 1542ish
reasons, that I have tried).

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada