Create a bootable Linux USB flash disk

To create a bootable USB flash stick using linux, enter the commands below. My example assumes that you’ve already downloaded the iso image that you intend to write to the USB stick. It has been tested to work on ubuntu 8.04, 8.10 and 9.04.

First off we’ll download a script, isostick.sh, which we’ll use to write the image file to the USB stick.

sudo apt-get install syslinux mtools
wget http://download.ubuntu-fr-secours.org/isotostick.sh

Now we’ll make the script executable and then use it to write the image file to the USB stick. Make sure to replace X in sdbX below with your USB disk device number. If you do not now the device ID of  your USB stick you can find it out by running the dmesg command, the USB stick and its device ID should printed as one of the last devices.

 chmod +x isotostick.sh
sudo ./isotostick.sh [imagefile.iso] /dev/sdX1

Make it bootable by running:

sudo /sbin/parted /dev/sdX

Thats it folks!

About jens

handsome
This entry was posted in linux and tagged , . Bookmark the permalink.

One Response to Create a bootable Linux USB flash disk

  1. Magnus says:

    Thanks for the tips mate!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>