booting FreeBSD 9 from USB stick: boot error
Solution 1:
Did you actually use /dev/da0
or did you replace it with the actual device name?
The official guidelines only give you an example device name to write to. da0
is a FreeBSD device name, not a Linux one so you probably didn't actually write to your USB stick.
Use dmesg
to work out which device your USB stick is under Linux - perhaps something like sdb
, in which case your dd
command would look like:
dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/sdb bs=64k
Solution 2:
I added the option "conv=sync" to dd, and I could create a boot disk on Ubuntu. The whole command looks like:
dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/sdb bs=64k conv=sync
Solution 3:
I found the cause of the problem: I had created the USB stick under Linux - and it seems the stick can only be created under FreeBSD.
You would think it should not make a difference if dd is run under Linux or FreeBSD or any other OS, since all it does is copy bytes from one device to another, but in this case, it does.
I wonder: How is anyone supposed to install FreeBSD if a running installation of FreeBSD is needed to create the installation medium ?
Solution 4:
I am in the process of installing FreeBSD 10 from scratch on that server and I took the opportunity to review this question. I am afraid the best answer is: Try again.
I have run the dd
command on Linux with and without each of the bs=64k
(and other chunk sizes) and conv=sync
switches and every time the server booted fine from the USB stick.
The only cause I can imagine that triggered the problem in the first place is that - as opposed to e.g. Debian - FreeBSD (among others) offers two ISO images, one called ...-disc-1.iso
and another one called ...-memstick.iso
; dd
'ing the first one to a USB stick will cause the boot error described. Seems unlikely (as I even quoted the ISO name in the question), but if you come from e.g. Debian, skip reading the FreeBSD documentation and generally turn off your brain, this might happen.
Thank you very much everybody for your responses, sorry this did not resolve in some gotcha that might be of use to anyone later on with the same problem.