How To Install FreeBSD 7.x From USB

By | 10/17/2008

I have the horrible habit of not putting a label on a CD after I’ve burned it.  This leads to having a stack of CDs and not knowing which does what.  This was my problem recently when installing FreeBSD, so I decided to start using USB based installations where possible.  I prefer the multiple-write capability of USB, and this way I don’t waste CDs.

Step one is to download a modified unetbootin utility particularly for FreeBSD.  You can get .rpm, .deb, .exe or .sh for both 32 and 64bit here.  I went with the 32bit .sh file.  BE CAREFUL WITH THE PACKAGED VERSIONS AS IT SEEMS THEY DEFAULT TO WRITING TO YOUR LOCAL DISK!

Once you have the unetbootin utility downloaded you’ll want to write the data to your USB drive.  This is done using the command:

chmod +x unetbootin-freebsd70*.sh

./unetbootin-freebsd70*.sh installmode=usbdrive targetpartition=/dev/sdX1 formatpartition=yes|no

Be sure you know which /dev entry your USB drive is connected to and don’t overwrite your existing boot loader on your main disk.  The last option, “formatpartition” can be a yes or no.

This will take a minute, and when its done you should have a bootable FreeBSD 7.0 usb disk.  If you are able to do FTP based installation you’re ready to go at this point.

Now if you’d like to be able to do the full installation from the USB as well you’ll want to copy the contents of the .iso onto the same drive.  If you don’t have an .iso you can find one here.

To copy the contents of the .iso to the USB drive I did something like this:

sudo mount -o loop 7.0-RELEASE-i386-disc1.iso /mnt/

sudo mount /dev/sdX1 /media/disk (this should auto-mount if you re-plug the USB drive)

sudo cp -RvLu /mnt/* /media/disk/

When this is done you should have the contents of the FreeBSD install CD on your USB drive.  When prompted for the install type specify MSDOS partition and you’re set.

I will likely post some more FreeBSD tips based on more of my notes.

12 thoughts on “How To Install FreeBSD 7.x From USB

  1. tgelter

    hey there Christer.
    If you like the ports system, I highly recommend you check out Arch Linux. Thomas and I have been using it extensively for the last little while and loving it. It’s the best of both worlds (linux and freebsd), you get linux along with all that entails, as well as a ports-like system and the best package management system I’ve used thusfar, pacman.
    regards, Tim

  2. aceqbaceq

    thank you. very useful iformation for me. because how to install linux without cd-rom i understand , but always want install freebsd withut cdrom 🙂

  3. bonkers

    gee never heard of a CDRW or DVDRW ?

  4. BoleGontale

    good resourse Anyway by sight very much it is pleasant to me

  5. tom

    how can i change grub install from hd0 to sda?
    the skript loves to take hd0!! can destroy a pc for newbies

  6. Shane

    Thank you! This guide was very helpful and worked like a charm.

  7. Thomas

    Will try it ASAP!

    I already tried with the original unetbootin and did not manage to make a bootable USB pendrive.

    Hope this one will work.

    Many thanks

  8. ...

    “never heard of a CDRW or DVDRW ?”
    older(?) pc cdroms often choke on rw.

Comments are closed.