Last time I played with the macppc port of FreeBSD was around the 9.xR series and I did that on my G4 iMac. Now I would like to install 14.1R to my G4 Mac Mini, sharing the SSD between MacOS X Tiger and FreeBSD. Unfortunately, I forgot many details on why and how I did things back then. And even more unfortunate is that there seems to be no proper documentation for PPC related details.
No manual for
boot1.hfs, no mention of it in the architecture specific texts either. No PPC details in
man boot. And
man gpart is nowhere near as descriptive regarding APM and how booting is done there than it is about GPT or MBR.
My iMac has a 800k apple-boot partition, but no FreeBSD documentation mentions why it is there or what it is for. My guess is that this is where
boot1.hfs is written using
dd. But I may be wrong. I do not remember these details well.
In
post#30 Tingo provides a useful description of the installation process, but some steps do not make sense. He partitions the disk like so ...
Code:
gpart add -s 800K -t '!Apple_Bootstrap' ad<disk number>
gpart add -s <size> -t freebsd-ufs ad<disk number>
gpart add -s <size> -t freebsd-swap ad<disk number>
gpart add -s <size> -t freebsd-ufs ad<disk number>
... and then writes out boot1.hfs like this ...
Code:
dd if=/boot/boot1.hfs of=/dev/ad<disk number>s2
In that example, slice2 is the first UFS volume, makes no sense to write
boot1.hfs into the beginning of that, overwriting the beginning of that filesystem. It would make sense to write
boot1.hfs into slice1. Assuming
boot1.hfs contains a small HFS or HFS+ filesystem with a FreeBSD boot code at its beginning. The fact that the '
!Apple_Bootstrap' partition is sized for 800k and
/boot/boot1.hfs on the 14.1R installation CD is exactly 819'200 bytes suggests that my logic is not far off.
I also remember doing something in OpenFirmware that made FreeBSD to autoboot, and I had to hold down Option/Alt on the keyboard at power-on time if I wanted to boot MacOS X instead, and pick that volume from the built-in GUI OS selector. I found the corresponding instructions for
OpenBSD, ...
Code:
setenv auto-boot? true
setenv boot-device hd:,ofwboot
reset-all
... but I have nothing for FreeBSD. The OpenBSD installation workflow instructs to place the
ofwboot file onto the first HFS/HFS+ partition (which is otherwise used by MacOS). So the
setenv boot-device line sets up that
ofwboot file on the first HFS partition to boot from. I do not know how to define the FreeBSD specific 800k !Apple-Bootstrap partition instead, and how to refer to any file on it (if I must refer to a file at all). Particularly as I want to keep my MacOS X volume at the beginning of the SSD.
Any pointers or clarifications on those are more than welcome.