Subject: Mac68k on IDE machines - mini HOW-TO
To: None <port-mac68k@netbsd.org>
From: John Klos <john@sixgirls.org>
List: port-mac68k
Date: 12/03/2001 17:55:45
Hi,

It seems that IDE support has come along far enough to warrant a HOW-TO.
Other people have worked on IDE and even gotten it working to a small
degree in the past, but not enough testing and follow-up was done to
hammer out the bugs and get some code committed. We do not want that to
happen now.

Yesterday I got two Quadra 630 type machines working with IDE. It took
hours, but the information here may make it much easier for other people
to set up their machines.

This assumes you know, generally, how to set up an m68k Mac with NetBSD.

You'll need:
a SCSI disk with NetBSD installed
an IDE disk
some way to partition the IDE disk (a PowerMac with IDE or paritioning
software)
an LC PDS ethernet card (IDE does not work unless something is in the PDS
slot)

First, let's get the URLs together.

The IDE kernel:
http://www.asahi-net.or.jp/~ie9t-sbgk/NetBSD/ide_support/netbsd+wdc+espfix-1.5Y.gz
ftp://ftp.sixgirls.org/pub/tools/netbsd_mac68k_ide.gz

The IDE modified MAKEDEV:
ftp://ftp.sixgirls.org/pub/tools/MAKEDEV.gz

Note that Apple HD SC does not work on IDE drives, older Drive Setups
which do run on m68k do not make A/UX partitions, and so far pdisk does
not work properly (in my experience).

I just plugged my IDE drive into an IDE PowerMac and used a new Drive
Setup from OS 9; it allowed me to create A/UX partitions. Note if you do
this that if the IDE drive is the default boot device on the m68k Mac,
you'll get an unhappy Mac when it tries to boot off of the IDE; you need
to run an older Drive Setup on the m68k Mac and select the "Update Driver"
option in order to make it work properly on an m68k Mac again.

Then, I used the old Booter (2.0.0a3 did not work with the IDE kernel,
don't know why) to boot the IDE kernel from MacOS, and used a SCSI disk
with NetBSD to boot multiuser.

Then I did newfs /dev/wd0a and /dev/wd0h (your partitions will vary), then
mounted /dev/wd0a on /mnt (wd0h is /home for me). Then comes the install.

Download the NetBSD binaries for Mac68k:
mkdir -p /mnt/usr/install
cd /mnt/usr/install
ftp -a ftp.netbsd.org
cd /pub/NetBSD/NetBSD-1.5.2/mac68k/binary/sets
mget *.gz

Then untargzip them:
cd /mnt
sh
for file in /mnt/usr/install/*
do
tar xzpf $file
done

Then copy the IDE kernel into place:
mv netbsd netbsd.orig
ftp ftp://ftp.sixgirls.org/pub/tools/netbsd_mac68k_ide.gz
gunip netbsd_mac68k_ide.gz
mv netbsd_mac68k_ide.gz netbsd

Then set up the device tree:
cd /mnt/dev
mv MAKEDEV MAKEDEV.orig
ftp ftp://ftp.sixgirls.org/pub/tools/MAKEDEV.gz
gunzip MAKEDEV.gz
./MAKEDEV all

Next, create /mnt/etc/fstab, like:
/dev/wd0a       /       ffs     rw 1 1
/dev/wd0b       none    swap    sw 0 0
/dev/wd0h       /home   ffs     rw 1 2
(change to suit your drive)

Then edit files in /mnt/etc/ or copy them from the SCSI /etc, such as
rc.conf, rc.local, master.passwd, group, ifconfig.xx0, mygate, hosts,
resolv.conf...

Assuming you have a small partition for MacOS on the IDE with a System,
IDE kernel, and Booter, you can now remove the SCSI drive and boot the
kernel from the MacOS partition and boot into NetBSD on the IDE disk.

More updates to come!

John Klos
Sixgirls Computing Labs