Setting up a bootable disk from scratch

Peter Grehan grehan at freebsd.org
Fri Jul 21 21:29:06 UTC 2006


Hi Marcel,

> 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:

  Daring :)

> 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.

  That might work: I vaguely recall Matt Thomas used cd9660 inside a 
partition to boot NetBSD on an xserve and avoid HFS.

> 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.

  Yeh, sysinstall for ppc assumes that partitions were pre-created.

> My questions:
> 1. Am I getting lost in the woods and am I better off abandoning
>    this venture in favor of established methods?

  No, you're almost there.

> 2. Is sysinstall broken WRT to partitioning currently or is it
>    supposed to work?

  As above, broken.

> 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?

  Almost: the loader itself doesn't understand HFS, so you generally 
point it at the partition that you want to boot from, and it will update 
currdev and read the relevant parts of /boot from there.

e.g. if your UFS2 / is on partition 7, and the loader is on partition 2, 
you would issue:

boot hd:2,\loader hd:7

  If you had cd9660 on a disk partition it could read loader.conf and 
friends from there, though I've never tried it. Works fine on a cdrom 
though.

later,

Peter.


More information about the freebsd-ppc mailing list