Setting up a bootable disk from scratch

Marcel Moolenaar marcel at xcllnt.net
Fri Jul 21 21:02:23 UTC 2006


All,

I'm trying to setup my iMac for FreeBSD. I replaced the MacOS X
disk with an empty disk to preserve my Mac OS X for now. So, what
I have currently is a netbooting FreeBSD machine, with / over NFS
and an empty ATA disk. See for an almost up-to-date dmesg output
and a pciconf output:
	http://www.xcllnt.net/~marcel/machines/imac/

My first step was to get a Mac partition table on the disk. I
ended up hacking parted to compile on FreeBSD, with hardcoded
values for the ATA disk in my iMac. With parted I put an empty
partition table on the disk. It's seen by the kernel:

imac% sysctl -b kern.geom.conftxt
0 DISK ad0 9115288064 512 hd 16 sc 63
1 APPLE ad0s2 9115254784 512 i 1 o 32768 ty Apple_Free sn Extra
1 APPLE ad0s1 32256 512 i 0 o 512 ty Apple_partition_map sn Apple

What I want to do is add one or more FreeBSD partitions, of which
one is formatted in such a way that I can use it to boot. I read
that OpenFirmware boots from HFS and CD9660 filesystems, so I'm
thinking of creating an CD9660 partition with boot related stuff,
a regular UFS2 partition for / and a swap partition.

I tried using sysinstall, but that wasn't fruitful. It sees the
free partition, but doesn't seem to create more partitions or
even sub-partitions (i.e. BSD label) under the free-partition.

My questions:
1. Am I getting lost in the woods and am I better off abandoning
    this venture in favor of established methods?
2. Is sysinstall broken WRT to partitioning currently or is it
    supposed to work?
3. Am I correct when I say that all I need is an image of /boot
    on some OFW recognized partition in order to make the machine
    boot FreeBSD?

Thanks in advance,

-- 
  Marcel Moolenaar         USPA: A-39004          marcel at xcllnt.net




More information about the freebsd-ppc mailing list