Sunday, June 17, 2012

Installing FreeBSD 9.0: Drives unrecognized, error 19 and mountroot prompt

Yes, I messed up a lot of stuff on my Dell E520 desktop including my FreeBSD 9.0-RELEASE install.
When I tried to boot it from the Grub2 menu, I got a mountroot prompt.
Hitting '?' at the mountroot prompt should give a list of bootable devices.
However, in my case absolutely nothing showed up.
Now how I did this is another story altogether but now I just want to talk about getting my FreeBSD back again

I actually posted about this to the FreeBSD forums but after more than 100 views, nobody has replied.
Nevertheless, there are quite some more details available in this post about what exactly happened and what I tried.
In any event, I have now resolved the problem so don't need anything more from the forum.

When I tried to reinstall FreeBSD 9.0-RELEASE from either a CD (502MB version) or a DVD (2.1GB version), in both cases the boot ended up at the mountroot prompt, having first asserted that it couldn't find cd9660:/dev/iso9660/FREEBSD_INSTALL and failed with error 19.

Once again, typing '?' at the mountroot prompt showed absolutely no bootable devices.

Also tried the install from a USB-key and this time it booted. However, when it came to selecting the disks to install two, only the USB key was recognized.

Trawling through the forums, this problem is by no means unique to me.
One suggested fix was to add the following at the loader prompt when booting from whatever medium:

set kern.geom.part.check_integrity=0
However, this did nothing for me.
Another suggested solution involved fiddling with /etc/fstab but, likewise, this did not resolve my problem.

Another potential fix from the forums is this which recommends getting the USB key to behave like a floppy (no details given). I tried this (see post #6) on a Windows computer but nothing improved.

Yet another, but rather vague, suggestion is to enable AHCI mode in the BIOS. Again, this does nothing for me.

However, as is not unusual in the case of these seemingly intractable problems, the solution is readily available and very, very easy.
Here's where I found it and all that is need is to open the loader prompt during the CD/DVD/USB boot (by pressing 2 or ESC) and adding the following line:
set debug.acpi.disabled ="hostres"
and then booting with
 Once the USB key has booted you can add the line
debug.acpi.disabled ="hostres"
to /boot/loader.conf, if you intend to use the key again.
In any event, once you have installed FreeBSD 9.0-RELEASE, you still need to add this line to /boot/loader.conf.

Incidentally, you may not be able to write to /boot/loader.conf as the / slice is mounted ro from the booting medium.
But, you can easily remount it as rw, as explained here, by running
# mount -o rw /


  1. RE: FreeBSD9 DVD to USB
    Good eve,
    I'm stumbling just as you were. I've tried unebootin, Sardu, Yumi, and various tools in Linux (DD), and Ubuntu tools all to no avail.

    I just checked my USB stick and don't see a /boot/loader.conf file. How did you get this?


  2. This bit me too while I was installing FreeBSD 9.1-RELEASE from an external (USB) DVD drive. Glad you documented this so that Google could find it.

  3. It is documented on FreeBSD web site on 9.0-RELEASE Errata, Section 3, Open Issuses.

  4. I'm a noob who has loaded and used Ubuntu, Linux Mint, Crunch Bang, Peppermint Linux, and some Gentoo. I can't get Free BSD to load. I first tried to load Debian, and had some difficulties. I'd love to try Debian, and dual boot Free BSD.