How to write FreeBSD image to USB flash drive

28,119

Assuming you are using dd within FreeBSD or Linux:

Using Linux:

1) umount /dev/sdb

If your USB stick is under /dev/sdb

2) dd if=FreeBSD-10.3-RELEASE-amd64-memstick.img of=/dev/sdb bs=10240

Using (Free)BSD:

1) umount /dev/da0

If your USB stick is under /dev/da0

2) dd if=FreeBSD-10.3-RELEASE-amd64-memstick.img of=/dev/da0 bs=1m

Please note the of=/dev/sdb argument as you are supposed to write to the whole stick instead of its first partition.

The same is true of of=/dev/da0. But please note that da is typically the prefix for USB port devices on (Free)BSD. Which means that it might just as well be da1. So make sure to check beforehand. :)

Easiest way would be to compare the results of an ls /dev before and after plugging/unplugging your flash drive/USB stick.

3) Now reboot and choose the USB stick as the boot option.

Share:
28,119

Related videos on Youtube

gnu
Author by

gnu

delete me

Updated on September 18, 2022

Comments

  • gnu
    gnu over 1 year

    I am trying to write FreeBSD-10.3-RELEASE-amd64-memstick.img to a USB flash drive, in the hopes of installing FreeBSD on an x64 computer in my house. Here is the image: ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.3/.

    I have searched up how to write .img files to a USB flash drive, with most sites saying to use Unetbootin, Startup Disk Creator, or the dd command. When I plugged in and selected the flash drive after using Unetbootin, I received the message "Missing operating system". With Disk Creator, I received a message telling me that Disk Creator couldn't write the image to the flash drive.

    As for the dd command, I used this: dd if=FreeBSD-10.3-RELEASE-amd64-memstick.img of=/dev/sdb1 bs=10240 conv=sync, which I got from here and here. The command writes a bunch of garbage files to my flash drive, instead of the contents of the FreeBSD image (which I assume wouldn't be garbage files).

    How should I go about writing FreeBSD to the flash drive and installing it to my computer, given that these options didn't work?

  • lucidbrot
    lucidbrot over 7 years
    Thanks for mentioning the part about sdb instead of sdb! For anybody using cygwin for this, make sure you started cygwin as administrator. you can find out what /dev/sdb or similar you should use with cat /proc/partitions. To see if dd is making progress, append status=progress to the dd command.