Skip to content

Debian Installer from an USB stick

For various reasons, I usually carry an USB stick with me that holds a single ext2fs and has grub installed. This blog entry quickly documents how to copy a Debian-Installer to it to be able to quickly install Debian without the need to burn a CD.

I had tried this stunt last year already, but without success. I don't know whether Debian Installer was not able to boot from an USB stick back then or if I was just too stupid to do things right. This procedure was done with today's d-i daily image, so I guess that it will work this way in the future.

I'd like the USB stick to be useable for other things even if d-i is available on it as well. So I would have liked d-i to be confined to a single subdirectory, which is possible with today's code.

The Installation Manual is rather verbose about booting from USB stick. The only challenge is to find the Kernel and the initrd files that are needed to actually boot. The exact path to these two files is not in the manual, but the nice people on #debian-boot confirmed that these are the correct ones.

The second challenge was a non-issue for me since grub was already installed and functional on the USB Stick (its installation was also surprisingly straightforward).

Next step: Create a directory on the USB stick and copy vmlinuz, initrd.gz and an arbitrary Debian CD image there. I used the daily netinst image.

root (hd0,3); kernel /d-i/vmlinuz expert; initrd /d-i/initrd.gz and boot

That's it. The installer boots, finds the CD image, mounts it and pulls its components from there. The rest is a normal, stock Debian installation. Debian Installer rocks. It nearly always does the right thing.


No Trackbacks


Display comments as Linear | Threaded

r00tk1d on :

Where do I put the root (hd0,3); kernel /d-i/vmlinuz expert; initrd /d-i/initrd.gz and boot ?? I dont have grub installed on my Stick, and i dont want to either.

Marc 'Zugschlus' Haber on :

In your grub configuration file. If you don't want to use grub, then you need to configure whatever you decided to use as a boot loader to boot kernel /d-i/vmlinux with a command line option of "expert" and with the initrd loaded from /d-i/initrd.gz.

r00tk1d on :

Well I read some more about booting from an USB stick, I use to keep "clean" sticks with me, without any hidden installations in the MBR. I didnt know I even had to install a bootloader to it >.< so I stuck with the good 'ol cd-rom :-D

Marc 'Zugschlus' Haber on :

the syslinux package contains a document README.usbkey which nicely explains the mechanisms of booting from USB. This might help.

Add Comment

Markdown format allowed
Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Form options