5

I am trying to boot FreeBSD 9 from a USB stick that I created following the official guidelines:

dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/da0 bs=64k

Booting fails with a simple 'boot error'. I have used this USB stick for quite a while for the very purpose of booting / installing new OSs, but I tried a different one anyway - same problem. I have also reproduced the issue on a different machine. I've acquired to image file over torrent which AFAIK has an md5 check built in, but I downloaded it again anyway directly from a FreeBSD mirror. Same result.

Does anyone have any success with this ? I did not find anything related online which seems to suggest this is not a well-known problem. Does anyone have a thought where else to search for the cause of the problem ?

1
  • Hi! Did you find a way to solve this? I have the same problem from ubuntu 12.04 and from Archlinux. Can't even mount the device after dd'ing =/
    – Marco
    Sep 13, 2013 at 21:04

4 Answers 4

4

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
1
  • In my question, I quoted from the FreeBSD manual page; on my system, I did use the correct device to dd the USB stick - I guess I would have noticed if I had dd'd the installation image to some other device in my system ;-)
    – ssc
    Jan 17, 2012 at 13:18
3

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
2
  • this is the way to do it from Linux!
    – oz123
    Nov 22, 2012 at 20:37
  • did not work for me
    – ibrahim
    May 25, 2013 at 8:19
2

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 ?

3
  • 2
    The image can absolutely be written from other operating systems - even Windows with the correct tool. Check my answer and see if I'm on the right track. Jan 16, 2012 at 8:18
  • I would think so too, but I've double-checked every step of what I've been doing and went through the entire process several times before asking here - same result. Apart from the different OSs, I can't seem to see any other reason why the USB stick created under Linux does not boot. BTW: I ended up installing Windows just for the purpose of running the USB stick creation tool mentioned on the FreeBSD site.
    – ssc
    Jan 17, 2012 at 13:22
  • Long-shot, but have you tried it from Linux without the bs=64k? Jan 17, 2012 at 14:25
1

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.

1
  • 1
    Idk if I'm not reading closely enough, but I don't see an answer in this answer. You seem to suggest the iso ending with memstick works but not disk-1, but in your question you say you were trying memstick and it didn't work. What actually worked for you? Dec 29, 2017 at 21:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .