*BSD News Article 21157


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!spool.mu.edu!news.clark.edu!netnews.nwnet.net!ns1.nodak.edu!agassiz.cas.und.NoDak.Edu!agassiz.cas.und.NoDak.Edu!rand
From: rand@cs.UND.NoDak.Edu (Douglas K. Rand)
Newsgroups: comp.os.386bsd.development
Subject: Re: changing bootwd for 2nd IDE drive? [NetBSD]
Date: 19 Sep 1993 13:22:42 -0500
Organization: University of North Dakota, Grand Forks, ND
Lines: 50
Distribution: world
Message-ID: <RAND.93Sep19132240@agassiz.cas.und.NoDak.Edu>
References: <BRAD.93Sep19092040@stemwinder.FCR.COM>
NNTP-Posting-Host: agassiz.cas.und.nodak.edu
To: brad@FCR.COM (Brad Parker)
In-reply-to: brad@FCR.COM's message of 19 Sep 93 09:20:40

>>>>> Brad Parker <brad@FCR.COM> writes:

  I'd like the boot tracks to default to wd1, however (so I don't have
  to type "wd(1,a)/netbsd" each time).

I got some help on this from Julian Elischer. Here is what he said: 

   to make the bootcode default to drive 1
   look in boot.c

   for the following code:
   (or similar.. It has changed a little)

   loadstart:
 
	/***************************************************************\
        * As a default set it to the first partition of the first	*
        * floppy or hard drive						*
  	\***************************************************************/
        part = unit = 0;
        maj = (drive&0x80 ? 0 : 2);             /* a good first bet */
        name = names[currname++];


   and change it to:


   loadstart:
 
	/***************************************************************\
        * As a default set it to the first partition of the SECOND	*
        * floppy or hard drive						*
  	\***************************************************************/
        part = 0;
	unit = 1;
        maj = (drive&0x80 ? 0 : 2);             /* a good first bet */
        name = names[currname++];

I did this, and then rebuilt the boot blocks. To install the boot
blocks I had to do two extra things: Change wd0 to wd1 in the Makefile
and create a disktab entry for my hard disk. After that I did a "make wd1" 
and next time I booted it worked great. (Oh, the boot file he is
refering to is in /sys/arch/i386/boot.)

Hope this helps.
--
Douglas K. Rand                     UND Aerospace - Scientific Computing Center
Home:   +1 218 773 0120                              University of North Dakota
Office: +1 701 777 2801                    Box 9022, Grand Forks ND  58202-9022
Internet: rand@cs.UND.NoDak.Edu             UUCP: ...!uunet!plains!agassiz!rand