Subject: Bootin dedicated NetBSD OFW3 machines off HDD.
To: None <port-macppc@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-macppc
Date: 09/19/2002 19:19:50
I think this might be of interest for people who want a dedicated
NetBSD Mac.
Some time ago I've got a surplus B&W G3 with MacOS 8 installed on the
whole disk and no bootable MacOS CD. I wanted to kill MacOS and use
it for NetBSD only (as a cross-compile box for the bunch of my smaller
and slower boxes).
Matt Thomas posted instructions on booting NetBSD directly on OFW3
macs some time ago:
http://mail-index.netbsd.org/port-macppc/2001/09/02/0002.html
but his method didn't worked for me as described, though it was very
close - I was able to do "dir" from OFW prompt etc, but something was
screwed up and I did't know anything about apple partitioning &c to
tell exactly what.
I managed to do the same trick only a little bit differently. NB: all
contents of your drive will be lost if you use this method, in my case
that's exactly what I wanted, YMMV.
So I created a hybrid ISO image with ofwboot.xcf as the single file on
it using the same set of options that are used for macppc bootable cd
(see distrib/cdrom). The command was
mkisofs -o boot.iso -v \
-f -A "NetBSD Boot" -hide-rr-moved \
-hfs -part --macbin -map hfsmap.lst \
-boot-hfs-file macppcboot.raw \
ofwboot.xcf
where macppcboot.raw is built in distrib/cdrom/macppc_installboot (I
neetbooted the mac and built it).
Some of these options might be superfluous, but as I said I have zero
clue about macs, so I trimmed only the most obviously unneeded
options. I *guess* that the option that made the difference is -hfs
vs. -apple that Matt suggested in his posting, but, frankly, I don't
care ;).
This produces a 900k+ iso file.
I then dd'ed the iso image to the beginning of the disk as is, no
skips no seeks.
Then I diklabeled the disk so that the very beginning of the disk with
the trampoline image in partition 'h', and "normal" netbsd partitions
following it:
+---+---+---~
| h | a | b
+---+---+---~
Then I newfs'ed the netbsd partitions, untarred the sets, yada, yada,
yada. Then I just used hd:,\ofwboot.xcf for boot-device and voila -
my G3 now boots NetBSD off the HDD.
PS: I'm not subscribed to this list, so please Cc me on replies.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen