Quick start manual and mkusb
The fastest way to start making USB boot drives is to download the quick start manual and the shell-script mkusb and check the md5sums.
See this link http://phillw.net/isos/linux-tools/mkusb/
- Download mkusb http://phillw.net/isos/linux-tools/mkusb/mkusb
- View or download the new quick start manual http://phillw.net/isos/linux-tools/m...art-manual.pdf
- View or download the old quick start manual http://phillw.net/isos/linux-tools/m...-manual-74.pdf
- Check the md5sums http://phillw.net/isos/linux-tools/mkusb/md5sum.txt.asc
If you want to try something new, the new mkusb version 8 with menus is uploaded to
and there are more details at
The intention is that the menus should make this version useful for a larger group of people.
Doing the same thing many times
For the first time I had been helping to test a new Ubuntu version (Lubuntu 12.04 LTS). After a while I wanted to make itsimpler and safer to transfer the code to the USB pendrive. I have been happy using unetbootin, because of its high success rate. I also tested Ubuntu's startup disk creator usb-creator-gtk, which has the advantage that you reach Ubuntu's first screen, that is skipped by unetbootin. Both tools work with my computers and can be used to create persistent live systems.
Temporary edit: usb-creator-gtk was buggy in Lubuntu 13.04 and 13.10, and is being debugged. It is improved and can create persistent USB drives in 13.10 but it crashes when trying to erase a disk. There is project to rewrite it for 14.04 LTS. If you still have problems with usb-creator-gtk, as a temporary workaround, you can try using usb-creator-kde or unetbootin or one of the other tools instead. See details at post #4
dd image of iso file to USB device safely
But I also read somewhere that it should be possible to boot from a direct image of the iso file. So I tried it with dd, the disk destroyer ;-) And it works, the computer boots from a USB device (pendrive, stick, flash drive, but also disk or SSD) just like it were from a CD drive. Also like a CD, it will be mounted read-only, so it cannot carry persistence.
Since dd is a bit risky, I made a shell-script, so that you get advice from a help text window and have to run dd manually only once, but with support from the script to avoid writing to any internal drive. The first time you must select the correct USB device, if more than one are connected. So it is safer and also much more convenient (but not 100%).
The next daily build will automatically select the correct USB device (when it is inserted into the computer). So for the next daily builds it is safe and very convenient.
I cloned an ubuntu-desktop-amd64.iso this way, and the USB pendrive works in both UEFI and CSM (BIOS) modes.
The shell-script has been updated and improved and will be updated again when necessary. It is now convenient to use also for one-off creations of USB boot devices from iso files and compressed image files and also to wipe the drives if necessary after the cloning. The shellscript can monitor the data transfer with pv, and suggests that you install it, if not available. Notice that pv shows Mibibytes and dd shows Megabytes.
The new version 8 is available now, and is very different, because it has replaced the crude text interface with menus (using the program package dialog).
The shell-script version 4, 5 ... work well not only in graphical desktops with terminal windows, but also in text screens (for example in a server). They can manage img.xz files (compressed with xz with ~20% better compression than gzip).
A typical dialogue looks like this the first time you run the script (and the label of the iso file does not match that on the USB drive). Either the general usage text
or the specific usage text to help you cut and paste to get 'sudo and the path' easily, and then run the whole script to get the advice how to run the dd command line.
$ ./mkusb -h
Usage: # New: menus to select source file and target device #
---- Make a USB install device from ISO or image file --------
sudo ./mkusb file.iso
sudo ./mkusb "quote file name (1) with special characters.iso"
sudo ./mkusb file.img
sudo ./mkusb file.img.gz
sudo ./mkusb file.img.xz
---- Install from 'file.img.xz', show all mass storage devices
sudo ./mkusb file.img.xz all
---- Wipe the USB device (may take long time) ----------------
sudo ./mkusb wipe-whole-device
---- Wipe the first megabyte (MibiByte), show only USB devices
sudo ./mkusb wipe-1
---- Wipe the first megabyte, show all mass storage devices --
sudo ./mkusb wipe-1 all
---- Help and Version ----------------------------------------
$ ./mkusb -v
mkusb version 8.0
Here is the shell-script for anyone to use or improve.
$ mkusb saucy-desktop-i386.iso
sudo /home/sudodus/bin/mkusb saucy-desktop-i386.iso
Download mkusb from the following link
There are also previous versions for users that like simple scripts.
I use the file name mkusb, put it into my ~/bin directory and make it executable.
Use the current md5sum.txt.asc file to check that the md5sum matches before you start using mkusb!
Verify that this signed md5sum file is correct with the following commands
The output should be something like
gpg --keyserver hkp://pgp.mit.edu --recv-keys EB0FC2C8
gpg --verify md5sum.txt.asc
The warning "This key is not certified with a trusted signature! There is no indication that the signature belongs to the owner." means that there is no chain of trusted keys between your computer's keyring and the key, that was used to sign the md5sums (the key of sudodus). Check that the result matches, when you verify it: The md5sums and the signature of your output of these commands should match. Then there is reason to trust that nobody else has written the mkusb script file and its md5sum. The date of the signature will change at updates, and the text might be translated to your local language, but it should be clear that it is a
gpg --keyserver hkp://pgp.mit.edu --recv-keys EB0FC2C8
gpg: key EB0FC2C8: public key "Nio Sudden Wiklund (sudodus) <email@example.com>" imported (or not changed the second time ...)
gpg --verify md5sum.txt.asc
gpg: Signature made Sat Aug 2 12:09:06 2014 CEST using RSA key ID EB0FC2C8
gpg: Good signature from "Nio Sudden Wiklund (sudodus) <mail address>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 0303 EA77 E34C 52F2 2958 47C6 BD43 C742 EB0F C2C8
'Good signature from "Nio Sudden Wiklund (sudodus)"'.
Use the new version, or stay with an old version with more direct interaction in the terminal window or version 7.4, the last non-menu version.
mkusb version 8 with menus
The new version of the mkusb tool is still only a bash script, that has been running in crude text mode, but people want eye candy, so I've made a menu interface, and also improved the identification of devices slightly (replaced calling parted -ls with a home-made bash function).
See the attached pictures, which illustrate the crucial part of mkusb, how to help selecting the correct device and avoid overwriting other devices.
mksub version 8.4
mkusb version 8.4 is uploaded to phillw's server http://phillw.net/isos/linux-tools/mkusb/
There are menus using dialog which makes the text mode experience quite nice. And there are flie selectors using zenity, which makes it even more user friendly in graphical desktop environments. mkusb works in text mode as well as in graphical mode, locally as well as remotely via ssh.
There are more details at https://help.ubuntu.com/community/mkusb
mkusb version 8.5
The new version 8.5 has a feature to make it safer. The last warning screen has red background. See the attached picture.
Wipe the CD file system
I should add, that if you want to re-use a USB drive that has been used like this, you should wipe it with dd (overwrite with zeros), otherwise grub-install doesn't want to write into the mbr area, because it recognizes the CD file system, iso9660. (You need not wipe it before cloning.)
You can use the shell-script also for this task and wipe the whole drive, 'wipe-whole-device', but often it is enough to wipe the first megabyte of the drive, 'wipe-1'.
It is very important that you wipe your intended target drive and nothing else. It will be completely wiped, not even PhotoRec can do anything after that operation. But there are other (and better) tools to wipe an entire HDD or SSD for example hdparm or DBAN.
$ sudo ./mkusb wipe-1
And after that you can use gparted to make a new partition table (for example MBR) and suitable partition(s) for example FAT32 with boot and lba flags.
Several iso files can be cloned to working USB pendrives
ISO files that can be be cloned to working USB boot drives are called hybrid iso files. I tested and could make working USB boot drives from
- ubuntu flavours 12.04+ (Kubuntu, Lubuntu, Ubuntu, Xubuntu, ... , desktop, alternate and server work, but not mini.iso)
- mini.iso version 13.04+ Plus means 'and newer versions'. See this link.
- linux mint 13+
- debian stable
while some other iso files did not work (although they make good CD boot disks). I could convert such an iso file to a hybrid iso (another person's 12.04 LTS re-spin using my own 12.04 LTS system) with the following command
It converts the iso in-place (the file is overwritten), so make a copy before you run isohybrid if you want to keep the original file untouched. See the following link
Complete install to USB
I also installed Lubuntu to a 16 GB USB pendrive, a complete install, like to a HDD. It was a little tricky with the swap partition, so now I know, why people advice, that you should disconnect the internal drive before doing it. This pendrive is truly portable, and probably better than a persistent live system. Nota bene, avoid proprietary drivers, if you want portability! There are several compressed image files, that were made from such installed systems, and they can be installed with mkusb.
Booting USB drives with grub2 and iso files 'grub-n-iso'
64-bit versions work only in 64-bit computers. 32-bit versions work in 32-bit and 64-bit computer with BIOS, but not with UEFI.
The 'grub-n-iso' method uses grub2 to boot from an iso file, so once you have such a USB pendrive, you can boot most Intel and AMD computers that can run a 32-bit system (except very old non-PAE systems, UEFI systems, systems with too low RAM, and systems with non-compatible hardware). The 'grub-n-iso' method can be used to create multi-boot USB pendrives by selecting iso file to boot from in the grub menu. There is space in 'grub-n-iso-n-swap' for a second iso file. You can also start from this link to Pendrivelinux and modify the USB drive to suit what you need: size, number of iso files ...
You can use the shell-script also for this task, to clone a compressed image from a file file.img.gz to a USB drive.
One Button Installer
$ sudo ./mkusb Lubuntu-13.10-desktop-grub-n-iso.img.gz
243967+1 poster in
243967+1 poster ut
999292416 byte (999 MB) kopierade, 33,9696 s, 29,4 MB/s
The One Button Installer is very simple, it uses only standard text mode programs and shell-scrips and menus via the dialog program package. It is easy to use and needs very little RAM.
The file dd_blank-obi_7.8GB_25_LubuntuTrusty_nonpae.img.xz contains Lubuntu and the One Button Installer scripts. There is a wiki page at https://help.ubuntu.com/community/OBI, and files to download are available at http://phillw.net/isos/one-button-installer/ There is also a tutorial thread here, One Button Installer, 'OBI'.
A system to install is stored in a tarball, a compressed tar file, file.tar.gz. Tarballs can be added and removed in a similar way as the iso files of the 'grub-n-iso' installer.
A tool that helps boot some computers from [other] USB boot drives - Chainloader
$ sudo ./mkusb dd_blank-obi_7.8GB_25_LubuntuTrusty_nonpae.img.xz
The chainloader is useful for middle-aged computers, for example computers without a CD/DVD drive, where it can be hard to boot from a USB drive, or when you want to run from a fast USB 3 drive that is unwilling to boot. See this link to the tutorial Howto help USB boot drives
References to tutorials and tips how to make USB boot drives
Ubuntu Wiki - FromUSBStick
Pendrivelinux about Multisystem