Economy of Effort

Twitter LinkedIn GitHub Mail RSS

Linux Usb Bootable Stick Netinstall That Works

Today, I spent a lot of time fussing with bootable USB thumbsticks, trying to set one up that would boot the new backup server I just built at work. The machine has no optical drive, so I just wanted to boot a simple netinstall and have the system pull everything it needs from remote mirrors.

The supposed easy method was to use Unetbootin. Everything about it was easy, except for the part where the bootable USB sticks it created didn’t work. Every boot attempt was met with “Boot error” or “Missing operating system”.

Since I am on Ubuntu, I tried to use Ubuntu’s usb-creator. Also a nice app, except for the fact that it too failed to work. In usb-creator’s case, the failure was to even get started. I would browse to the ISO that I wanted to use as the image for my boot stick, and the app refused to load it, or any ISO. No error, the app simply didn’t respond to the input.

So, two piece-a-junk GUI apps down. After a little digging, I found the methods that created working USB sticks on the first try.

For CentOS:

  1. Download diskboot.img from a CentOS mirror’s centos/(version)/os/(arch)/images folder. (I used the mirror and i386 arch, so my diskboot.img was located at:
  2. Insert USB stick (I’ll assume it’s /dev/sdb, adjust instructions to fit your system), format to FAT32 (I used Gparted for this)
  3. Run: dd if=diskboot.img of=/dev/sdb
  4. Remove USB drive, stick into machine that’s getting the CentOS install, and boot When asked for installation media, select HTTP. Use the website and folder path of the mirror you’re using.
    So, from my example:
    Website name:
    CentOS directory: centos/5.5/os/i386

Proceed through installer as normal.

For Debian:

  1. Download boot.img.gz from /debian/dists/(version)/main/(installer-arch)/current/images/hd-media folder
    (I did i386 stable from Debian’s US mirror, so boot.img.gz was located at:
  2. Download Debian netinstall ISO (I used:
  3. Insert USB drive (again I’ll assume /dev/sdb) and format to FAT32
  4. Run: zcat boot.img.gz > /dev/sdb
  5. Remove and re-insert USB drive. Copy the netinstall ISO to the USB drive.
  6. Stick USB into machine getting the Debian install, boot, and run through installer.

I imagine these instructions will probably stay good for a long time. You’ll just need to adjust for mirror location, arch and release numbers, but the URLs I’ve provided here should give you a good clue as to where to find the necessary files on the mirror you’re using.