Howto make USB BOOT Drives #2

ahmadnurhadirmw - 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.

Shell script

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.

Here is the shell-script for anyone to use or improve.

Download mkusb from the following link

There are also previous versions for users that like simple scripts.

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
gpg --keyserver hkp:// --recv-keys EB0FC2C8
gpg --verify md5sum.txt.asc

The output should be something like
gpg --keyserver hkp:// --recv-keys EB0FC2C8
gpg: key EB0FC2C8: public key "Nio Sudden Wiklund (sudodus) 
" 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) " 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
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

'Good signature from "Nio Sudden Wiklund (sudodus)"'.


mkusb-nox is supplied via the PPA. It works in text screens, 'No X', and can do 'everything' that mkusb version 9 can do (but without eye candy). The improved recognition of operating systems in iso files and devices is ported is ported from version 9.
sudo add-apt-repository ppa:mkusb/ppa

For Ubuntu 14.0x-16.0x

sudo apt-get update
sudo apt-get install mkusb-nox


A very basic version of mkusb is made for old and/or very small operating systems (suitable for very old computers and as portable systems). mkusb-bas is tweaked to run in TinyCore and Wary Puppy. See this link mkusb version 7.4.x - mkusb-bas

mkusb minimal shellscript - mkusb-min

mkusb-min is simple, the shellscript is very small compared to the other versions, yet it serves the purpose to wrap a safety belt around 'dd'.

Small and flexible
- mkusb-min needs no extra packages (but makes the user experience nicer, if you install pv). It runs in text screens, terminal windows, via ssh and other network connections.
- mkusb-min works in many different linux distros. It needs bash, some standard tools and features, that are present in almost all current linux distros (2017).

There are more details, for example how to download mkusb-min and how to use it, at the following link,

Part 3 - Howto make USB BOOT Drives #3

Post a Comment