Making a bootable USB stick / SD card Debian installer image

A lot of people these days would like to install Debian (or other distro according to preference) from a USB stick / USB flash drive / thumb drive / SD card / flash memory card / whatever else the fuck you might call it. Basically, some form of removable solid-state non-volatile memory device that presents itself as a raw /dev/sdX when you plug it in, whether it has its own built-in USB interface or whether it plugs into a "card reader" slot which then connects to the motherboard via USB.

Unfortunately it seems to be rather hard to find out how to create a bootable Debian installer image on such a device. There are various recipes and shit scattered about the internet which mostly seem to suggest such things as dding an hd-media installation image onto the non-volatile memory device and then cping a CD installation image into the filesystem thus created, or something of the kind. I have tried a couple of these and they do not work. Maybe they did when they were first posted, but they don't now.

So I was delighted to find that it is MUCH SIMPLER AND EASIER THAN THAT. What I don't understand is why this important fact is kept so well hidden and is so bleeding hard to find out. Because it is very useful to know and very simple. Hopefully this page will render this important information less obscure and easier to find.

All you do is this.

First, wipe out any partition table that is already on the device (replace sdX with whatever is appropriate for your device/system):

# dd if=/dev/zero of=/dev/sdX count=1 bs=512

...then unplug the device and plug it in again to register the new, nuked state of the partition table with Linux.

(It may not be strictly necessary to wipe out the existing partition table, but it only takes a few seconds so I never bothered to try it without.)

Then, simply dd the Debian CD installation image of your choice (the netinst image is recommended, because it is both smaller and so faster to write to the device, and gives you more control over what packages you install to begin with) onto the non-volatile memory device:

# dd if=debian-whatsit-thingummy.iso of=/dev/sdX

(wait about a quarter of an hour while it does it)

$ sync $ sync

...and unplug the device.

Congratulations! You now have a bootable Debian installation image on a USB stick or SD card or whatever it was you used.

What you have just done is simply to write the bootable ISO image to something that isn't a CD. It doesn't seem to matter that it isn't a CD. You might think the BIOS would get confused and not be able to boot it, but this is not in fact the case. How long BIOSes have been able to boot ISO images off non-volatile USB-connected devices I don't know - for all I know they may have been able to do it since first they supported such devices at all, or on the other hand it could be that the one I tried it with was one of the first. Whichever, that one I tried it with is from 2006, and it is now nearly the end of 2014, so I would expect it to be a universal feature by now even if it wasn't then.

Now doesn't that make you happy?

Right then, I will finish this page off with another piece of important information which is very much less well known than it should be.

The word "install" is a verb. It describes the action of setting up a working system. The system that results is an "installation", which is a noun. The software that performs the process is the "installer".

There is no such thing as an "install image", it is an "installation image" (because you perform an installation with it) or "installer image" (because it is an image of an installer). Similarly, there is no such thing as "a Debian install". It is "a Debian installation". If you speak or write of "install images" or "Debian installs" then you are an ILLITERATE FUCK.

Back to Pigeon's Nest

Be kind to pigeons

Valid HTML 4.01!