Subject: Re: Getting mac68k drives working on a macppc machine...
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-macppc
Date: 09/17/1999 17:41:53
On Thu, 16 Sep 1999, gabriel rosenkoetter wrote:

> So, I've got these two, old external hard drives that were once on my
> Performa 636 running NetBSD/mac68k 1.3.1. They've got a lot of files
> that I want into, but I don't have any 68k macs floating around
> nearby.
> 
> I *do* have my current ppc machine (the one I'm typing this on,
> actually, albeit sshed from a Sun E450), a 7500 running NetBSD/macppc
> 1.4.1.
> 
> I would like to connect these SCSI drives to the (MESH) external SCSI
> adapter on my PPC and mount them at, say, /oldmachinename. Didn't
> think this would be a problem... but I started to have concerns when I
> saw that the macppc port uses a munged Apple partition map to manage
> booting via Open Firmware... then again, these things are just SCSI
> 2 drives with ffs file systems... right? I mean, it's not like I want
> to boot off of them, why do their (unused) Apple partition maps even
> come into it?

macppc only munges the partition map if you run installboot on a disk.

mac68k exclusivly uses the Apple partition maps to keep track of
filesystems, while right now macppc exclusivly uses NetBSD disklabels.
Thus they keep info in two different places..

> Well, when I actually plugged them in, I got all kinds of errors. I
> think a big part of that was that the external SCSI chain gets
> addressed before the internal one, meaning that this external drive
> was at sd0, my (internal) macos drive at sd1, and my NetBSD/macppc
> drive at sd2... which utterly messes up its fstab expectations. Even
> after fixing the fstab, I couldn't manage to get the drive mounted,
> though I'll admit I wasn't incredibly persistant.
> 
> In hindsight, I realized that the external drive was at SCSI ID 1,
> same as the internal, NetBSD boot drive, but this shouldn't matter as
> the 7500 motherboard has separate SCSI chains for the external and
> internal chains. (Anyway, if it were a SCSI ID conflict, I'd have
> gotten problems long before getting to assignation of device names.)

Right. If you can compile your own kernel, you can wire down the scsi
devices. So sd0 will always be the internal one...

> So my question is, is it possible to mount these ex-mac68k drives on
> my macppc machine? Has anyone done so? If so, how? If no one's tried,
> but it should theoretically be possible, what's my next step? No, I
> wouldn't like to just reformat the drives - I want the data that's on
> them. (If it comes to it, I guess I can give in, find a 68k mac, boot
> on it on the network here at swarthmore.edu, tar the two drives up -
> total of about 750 MBs - and transfer them to the new machine, but
> that's a terrible pain.)

You have two options: 1) wait for me to add code to macppc to do this. 
While it's the least work option for you, I've had setbacks in doing it. 
Mainly pressing work needs or an unscheduled power outage which wiped out
my first effort. :-(  2) Make a macppc disklabel which covers the
partitons & use that. You'd need to know where the partitions are on disk.
Either a MacOS formatter or pdisk (from mkLinux) would work here. You need
to know start and size for each fs in sectors. Then use disklabel to make
a label with partitions at those start and stop points.

Option 2 will definitly get you there sooner. :-) You could probably do it
tonight. :-)

Take care,

Bill