Subject: Re: IIsi installer/running error(s)
To: None <port-mac68k@NetBSD.ORG>
From: Stephen C. Brown <sbrown@shellx.best.com>
List: port-mac68k
Date: 04/15/1996 22:32:37
Hi,

I was wondering exactly what range of devices people are actually installing
and booting netbsd from.  What, other than standard hard drives, are we
supporting??  I am just trying to figure what scsi device types for the
installer to recognize, other than your typical hard drive with scsi device
type 0.  The following list of scsi device types were gleaned from headers
on an SGI box:

/* types for class INV_SCSI and INV_VSCSI; should be the same as the
 * device type code returned by the inquiry command.
 */
#define INV_PRINTER     2       /* SCSI printer */
#define INV_CPU         3       /* SCSI CPU device */
#define INV_WORM        4       /* write-once-read-many (e.g. optical disks) */
#define INV_CDROM       5       /* CD-ROM  */
#define INV_SCANNER     6       /* scanners */
#define INV_OPTICAL     7       /* optical disks (read-write) */
#define INV_CHANGER     8       /* jukebox's for CDROMS, for example */
#define INV_COMM        9       /* Communications device */

Which of those devices(such as worm or optical), if any, are currently being
used as bootable root drives??  Have they been accessed successfully by the
installer utility in the past?  Also, if anyone has a more complete list of
SCSI
device types, let me know.  Anyone know which of the above the syquest drives
map to?? Or do they just map to a regular device type 0 as most hard drives do??

Also, if we support any of the above, where should I look for the proper naming
convention?  I know hard drives have device names starting with "sd" and cd-roms
start with "cd".

Thanks for your help,
Steve Brown

>>I changed one line in interface.c to cause the installer to ignore
>>anything other than SCSI device type 0(hard drive).  This tests out ok
>>and also gets rid of the consistent SCSIRead() and SCSIComplete() errors.
>>The generated /etc/fstab comes up with the proper netbsd device numbers.
>>
>>Let me know if you have any problems with this.
>>
>>Steve Brown
>>
>>p.s. If anyone is curious, all I did was change the line that read:
>>                if (inquiry(i,buffer)==0)
>>        to read:
>>                if ((inquiry(i,buffer)==0)&&(buffer[0]==(char) 0x0))
>>
>>        the very first byte of the buffer returned from inquiry() is the
>>        device type.  Device type 0 seems to be the typical hard drive.
>>        Device type 5 is cdrom.  I'll look up the references and see what
>>        the others possibilities are, but after I've had some sleep :) .
>>
>>>> First while running Mkfs I got the following error:
>>>> Error on SCSIRead(),#5
>>>>
>>>> Then while running Install I got:
>>>> Error on SCSIComplete(), #10
>>>
>>>Possibly not important. I think I always get the #5 error. One is
>>>probably ok.
>>>There's a bug in the installer; it doesn't know that CDROMs are cd's,
>>>not sd's. So if you have (in accending SCSI ID)
>>>
>>>Thing:          Installer ID    NetBSD ID
>>>Drive A         sd0             sd0
>>>CD              sd1             cd0
>>>Drive B         sd2             sd1
>>>
>>>So the generated /etc/fstab comes out wrong.
>>>
>>>Watch the messages about found SCSI devices at boot time. Find the
>>>message for your drive, and make sure that /etc/fstab points to the
>>>right place.
>>>
>>>cpout /etc/fstab, change the sd2a to sd1a, cpin it, and you should be set.
>>>You should also be able to mount /dev/sd1a / (is my syntac correct?);
>>>have mount not look in /etc/fstab. Then just vi it.
>>>
>>>Could some kind, gentle, MacOS utility maintainer teach the installer about
>>>cd's and st's? This bug comes up often!
>>>
>>>Take care,
>>>
>>>Bill
>>