Solved Upgrading MacMini 7.4 to 9.1 - mountroot failure

MacMini (3,1) running fine on 7.4 stable with root mounted from /dev/ad4s1a
  1. I compiled and installed a new 9.1 kernel (after reading /usr/src/UPDATING :)
  2. I rebooted and get the mountroot> prompt.
  3. dmesg shows
    Code:
    ada0: Previously known as ad4.
  4. However using the ? at the prompt, does not show ada0s1a but ada0p1, ada0p2 and ada0.
  5. None of ada0s1a, ada0[p1|p2] allow booting - each fails with error 19.
Confused!

So, I tried ditching the new fangled disk subsystem and resorting to the legacy disk subsystem as per /usr/src/UPDATING. Similar problem... ad4 is recognised in dmesg, ad4s1a fails to mount root and along comes the mountroot> prompt which only offers ad4[p1|p2]. Again none of these result in a satisfying experience.

Back to 7.4 which still boots without issue thankfully.

Any ideas?
 
After some investigation it transpired that the sysinstall MBR for the original installation of FreeBSD 6.4 was inside an HPFS partition. Source upgrades from FreeBSD 6.4 to 7.1, 7.2, 7.3 and then 7.4 had no problem with this, but FreeBSD 9.1 did not understand it at all. The dmesg disk device did not match any of the partitions shown at the mountroot> prompt.

The only option was to do a complete backup of the existing data and reinstall from scratch. For the avoidance of doubt, and given I was unable to find the method in the FreeBSD documentation, I have set out the process I successfully followed below.

Caveat Utilitor: This completely removes any OSX OS and EFI partitions and erases all data on the internal hard disk drive. It applies to an Intel-based Mac Mini (mine is hardware version 3,1).
  1. Boot into an OS X installation DVD with the internal (if available) or external DVD. You could try an OS X installer from a thumb drive, but I had a Leopard DVD handy.
  2. Choose the language, then Utilities, then Disk Utility from the menu.
  3. Select the internal hard disk drive, then Partition, choose 1 Partition, then Options, choose Master Boot Record then Apply.
  4. Quit the installation process.
  5. Boot the FreeBSD CD/DVD (it will take around 45 seconds to start booting). Do not use the internal DVD drive for the FreeBSD disc as you will not be able to eject it. I found this out the hard way. Luckily I also had an external DVD drive so I could load the OSX installation and use Diskutil to eject the disk (you could probably also use an OS X installer on a thumb drive). camcontrol eject from FreeBSD would not eject the disc (error stopping device).
  6. Install FreeBSD, choosing the "use whole disk" option. Eject disc when installation completed.
  7. Boot into the OSX installation DVD again, choose the language, then Utilities, then Terminal from the menu.
  8. In the terminal, enter diskutil list and look for the FreeBSD boot partition of 64KB (it will look like /dev/disk0sX)
  9. In the terminal, enter bless –device /dev/disk0sX –setBoot –legacy (where disk0sX is the identifier you found in step 8 above for the FreeBSD boot partition).
  10. Quit the installation process
  11. Reboot and enjoy FreeBSD!
 
Back
Top