PC-BSD only installing off a memory stick or off a DVD these days. I opted to go the DVD route because this computer didn't support booting off USB media as far as I could tell (I tried it on two machines: an old HP eVectra 933MHz box, and a slightly newer Dell Optiplex GX270).
The summary of this hack is 'Copy all the files from /boot on the ISO image onto a hard disk that has been made bootable and use a USB expansion box to store the real DVD'.
First, I needed to create a bootable hard disk. I put the hard disk that was going to be installed into the system info a USB expansion box and plugged it into my FreeBSD system. This gave me a disk as 'da0'. This disk had an old Windows installation on it. All commands are run as root. You are advised to triple check your typing, as transposed letters and such might have adverse effects.
Relabeling the Disk
Since I had an old windows install on the disk, I just needed to delete the old windows partition and create a FreeBSD one.
- gpart delete -i 1 da0
- gpart add -t \!165 da0
- gpart create -s bsd da0s1
- gpart add -t \!7 da0s1
Making the disk bootable
Next we need to make the disk bootable. This is a lot easier than it used to be in days of yore:
- gpart bootcode -b /boot/boot0 da0
- gpart bootcode -b /boot/boot da0s1
Copying The Files
The pc-bsd installer for the DVD just loads a ram disk, and then runs off that. All the early stages of the boot loader need are contained in /boot. This includes the kernel, the third stage boot loader and various config files and scripts. So the next steps are to copy these files from the cd onto the bootable hard disk we just made. This assumes that the mdconfig command below prints "md0" for unit 0. If it prints anything else, you'll need to adjust accordingly. Also, if you are reading this in the future, you may need to change the PCBSD iso name.
- newfs /dev/da0s1a
- mount /dev/da0s1a /mnt
- mdconfig -f PCBSD8.1-x86-DVD.iso
- mount -t cd9660 /dev/md0 /cdrom
- mkdir /mnt/boot
- cd /cdrom/boot
- tar cf - . | (cd /mnt/boot; tar xvf -)
- cd /
- umount /mnt
- umount /cdrom
- mdconfig -d -u 0
Moving the disk
At this point, I had to unplug the USB expander from the first system, remove the hard drive and install it into my target box. I also grabbed my UBS DVD player and connected it to the box with a copy of the DVD I burned from the above file. I selected hard disk as the boot media in the bios and let the system boot. It booted off the hard disk, but then started looking for the proper cd device. Luckily for me, it found the DVD on cd1 instead of cd0 (which is what was built-in to the Dell I was booting off of). It then became a 'normal' PC-BSD installation, which is described in detail elsewhere.
Hopefully, people find these instructions useful. Since I only had one of these systems, I didn't create any kind of script to make it easier. Sorry.
[[ Updated to fix problem noted in the comments ]]