Subject: Re: hfsutils/SCSI problems
To: Amitai Schlair <amitai.schlair@usa.net>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 08/11/1997 23:30:50
Amitai Schlair wrote:
> 
> I've got:
> 
> - a freshly installed NetBSD 1.2.1 system on a Mac IIci
> - running on a freshly low-level formatted internal Seagate 1GB drive
> - 950MB Root&Usr partition
> - 40 megs of swap (20MB RAM)
> - 15MB System 7.0.1 partition for booting
> 
> (The drive was formatted with FWB's Hard Disk ToolKit. Great stuff -- I
> highly recommend it.)
> 
> I've also got some packages on another HFS (System 7.6) drive that I
> want to install under NetBSD. (This one is Apple-formatted, yesterday in
> fact, with HD SC Setup 7.3.5.) The internal drive is ID 0; the external
> drive is ID 1.
> 
> The problem: the Installer can't install some of them, even though
> they're gzipped tar files (yes, I downloaded them in binary mode) -- it
> says the format is invalid and suggests using cpin. (Incidentally, how
> does cpin work? Do I need to specify absolute filenames on both ends?)

Although this could indicate a SCSI problem, or perhaps a bug in the
Installer, it's still possible they were corrupted during download.  Of
course, downloading them again is a pain, so....

The 'cpin' command can use relative paths as well as absolute for both
the MacOS path and the NetBSD path (although you can just cd to the
necessary directory in the mini-shell, so why bother?).  Keep in mind that
MacOS uses the opposite convention for relative vs. absolute paths
compared to unix (i.e. :folder:file is relative in MacOS).  I find it
easiest to simply put whatever I want to install into the same folder as
the Installer and go from there (assuming I use the Installer rather than
the hfsutilities).

> I figured I'd use hfsutils (which compiled without a hitch) to copy them
> from the external Quantum HFS partition to the internal Seagate Root&Usr
> partition. Seems like the right tool for the job, no? Well, I couldn't
> mount *any* HFS partition, from /dev/sd1a through /dev/sd1h. (Not sure
> which the HFS partition is, so I tried all.) Some complained about not
> being configured (probably Apple_Free); others complained about not
> being able to get a lock on the device ("Operation not supported", "mode
> sense returns nonsense"). I'm pretty sure the HFS partition was one of
> this last kind.

Yes, this was most likely the case.  Did you read the README?  I'm pretty
sure it is documented that you need to undefine some variable (in
config.h?) which turns off the use of flock.  I know that the most recent
version of hfsutils has this feature.  If you want, you can also go dig
into libhfs and comment out the offending section of code.  BTW, the
reason this doesn't work is that NetBSD doesn't do fcntl-style locking.
Oh, I just found the reference in the INSTALL, you need to add
-DNODEVLOCKS to the DEFINES section of the Makefile and recompile.

> Norton 3.5 checks out the Quantum fine -- no problems whatsoever. I'm
> having some minor difficulties with the SCSI chain, which might be
> throwing a wrench into the whole thing... namely:
> 
> 1) Can't boot the HFS partition on the internal Seagate, even when
> specified with *both* Startup Disk and System Picker, when the external
> Quantum is on.
> 
> 2) When booting Mac OS 7.6 from Quantum, the internal HFS partition does
> not auto-mount like SCSI volumes should. I have to use SCSIProbe to get
> it mounted.
> 
> 3) The internal Seagate drive does not spin up at all (!) when I power
> up the IIci without the Quantum and its terminator on the SCSI bus. The
> Quantum doesn't have to be on -- it just has to be plugged into the SCSI
> bus and have a terminator on the end.
> 
> In fact, the only way I can boot NetBSD as intended (boot internal Mac
> OS partition, open booter on that partition, boot) is to leave the
> Quantum connected to the SCSI bus and leave it off. Pretty strange!

This is why people call SCSI a "black art" ;-)

> Should I remove the 3 terminating resistors from the internal drive? Or,
> is there a 25-pin SCSI terminator somewhere which I can put directly
> into the Mac's SCSI port? Or is there something else which I am
> completely missing?

I'm not too sure what you might be missing unless you have a bad internal
cable somewhere.  Is it possible that you have a bad jumper setting on the
internal drive?  Check the owner's manual and see what it says about
jumper settings.

> I've used Macs for 11 years and have never encountered SCSI strangeness
> like this. Could it explain my hfsutils problem? Maybe... but the
> Installer had no problem at all getting NetBSD and X installed.

It might explain the Installer problem....buth this is definitely a bit
weird...

> My brain hurts... :p

I know what you mean ;-)  Good luck, and I hope this helps some.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.