Install FreeBSD 10.0 using memstick IMG file on Virtualbox
When FreeBSD 10.0 arrived, I headed straight to the FreeBSD website and downloaded the FreeBSD-10.0-RELEASE-amd64-memstick.img file. I usually do not burn DVDs. It is just not flexible enough. Writing the installation media on to a USB is easiest thing to do when you are addicted to installing OSs in your free time.
Most Linux distros publish their installation media as ISO images while the FreeBSD team creates an IMG image in addition to the ISO. While the Linux ISO images can be written to a USB (ISO -> USB), the FreeBSD ISO cannot beĀ written to USB. That is where the FreeBSD IMG file comes into picture. While the IMG file is good for writing onto USB drive, one will surely have a horrid time installing FreeBSD as a Virtualbox guest using the IMG file. Virtualbox does not recognize the IMG format.
What is the solution?
Just run the following command:
VBoxManage convertfromraw -format VDI [filename].img [filename].vdi
Once this is done, a VDI file is generated. This is the virtual hard disk file format used by Virtualbox. Now this file can simply be attached as another storage device in Virtualbox. During the boot process, hit F12 key and enter the virtual BIOS menu. One can select the attached drive and boot from it, in case Virtualbox does not automatically boot from the attached drive.
To write FreeBSD IMG file to USB, I use the following command:
dd if=FreeBSD-10.0-RELEASE-amd64-memstick.img of=/dev/
The general command is:
dd if=
Yes, dd command works on Linux and FreeBSD
Be very careful while using the above command. The changes are irreversible. Thus, if you select a wrong device, you will definitely lose all data.
Further reading: