From: mea@sparta.com (Mike Anderson)
Newsgroups: comp.os.vxworks
Subject: re: Disk Boot
Date: Fri, 20 Nov 92 08:49:52 EST
Organization: Lawrence Berkeley Laboratory, Berkeley CA
NNTP-Posting-Host: 128.3.112.16
Originator: daemon@vxw.ee.lbl.gov

Greetings!
 
> geger@phantom.den.mmc.com (George Eger (303) 971-6974) writes:
> 
> >Is there any attempt in 5.1 to allow a local disk boot?  I have heard that
> >bootp is going to be used for booting, but I haven't heard anything about 
> >allowing booting from a local disk?
> 
> Yes, 5.1 will allow booting from a local SCSI disk.  There is a patch
> to allow 5.0.2b to boot from a local SCSI disk.
> 
> Carl C. Chesbrough
> Wind River Systems

  As Carl indicates, you can boot from local SCSI disks under 5.0.2b.  The caveat is that
they must have an MSDOS partition as the first one on the media.  With some initial pointers
from Mike Trest @ Visicom and some code samples from June Liesch at Heurikon (thanks Mike
and June :-), I now have boot from both hard disk *and* SCSI floppy disk (Teac FD-535)
working.  It is soooo convenient to be able to send out a new MSDOS floppy with O/S
and software updates instead of burning new ROMs!  Not to mention how much simpler it
is to explain how to change a floppy instead of pulling the board and changing the ROMs
to a customer over the phone ;-).

  In fact, the demand for the boot from SCSI floppy info has been so great, that I now teach
the techniques for modifying the boot ROMs and usrConfig during my intermediate real-time
programming courses.  The students have been really surprised that they too can learn
how to add code to the ROMs and make a new boot device in just a couple of days.  If you
want the code to get boot from SCSI floppy working, just drop me a note and I'll be
happy to send it to you.  There is one other trick to know if you're trying to get boot
from SCSI *and* initialize the networks at the same time (like Mike Trest does for his
VxWindows demos).  The code in usrConfig (usrNetInit) is not set up to know what to do
if your boot device is "scsi".  It tries to initialize the network device "scsi" and fails
miserably.  Therefore, what I did was to place the network device name in the "other"
field of the NVRAM parameters and modify usrNetInit to use that field to get the network
device if the boot device was "scsi".  If you're already using the "other" field for
something, then you'll need to add it somewhere and parse the fields.  I did it this way
so I could keep the same boot ROM code, but be able to initialize the "ei", "enp" or
even the "fddi" network devices (I've just started the protocol on-board ports for
the Interphase Peregrin-2 FDDI board) during the normal boot sequence.

  Booting from hard disk can be much easier than booting from floppy because the SCSI
inquiry command gives the correct answer about disk geometry for modern SCSI hard
disks.  The Teac, on the other hand, supports about 12 different disk geometries only
two of which resemble MSDOS formats.  Therefore, you have to issue the inquiry command
to wake the device up, send a scsiModeSelect, delete the scsi physical device, recreate
it and issue the inquiry command a second time to get the right geometry info set in both 
the Teac controller and in VxWorks.  A little tricky at first, but after looking at it
for a while, you eventually start to understand why.

  I can't wait to get my hands on some of the new hardware that supports the PCMCIA RAM
credit cards to try to get these set up as boot devices.  Look Ma, no moving parts and
I can reprogram it from a DOS sub-notebook computer.  It should greatly increase the
lifespan of VxWorks systems in the field especially in harsh environments.

Hope this helps,


==============================================================================
    AAAA  D D    D D    EEEEE   M   M  TM  // AAAA RRRR  TTTTTT SSSSS EEEEE TM
   A   A  D   D  D   D  E      M M M M    // A   A R   R   TT   S     E
  AAAAAA  D   D  D   D  EEEEE  M  M  M   // AAAAAA RRRR    TT    SSS  EEEEE
 A     A  D   D  D   D  E      M     M  // A     A R  R    TT       S E
A      A  D D    D D    EEEEE  M     M // A      A R   R   TT   SSSSS EEEEE

Process Distribution/Control and Communications for Distributed Systems

Mike Anderson                       Voice: (703) 448-0210 ext. 235
Director, ADDEM(TM) Project Office  FAX:   (703) 734-3323
SPARTA, Inc.                        EMAIL: mea@sparta.com
Suite 900                     
7926 Jones Branch Drive        "It is useless for sheep to pass resolutions 
McLean, VA  22102               in favor of vegetarianism while wolves remain
                                of a different opinion."

                                   William R. Inge, D.D.
==============================================================================