I couldn’t find a concise article about creating a Debian installer USB key with a writable file system, so here is my take. This assumes you have an available Linux system. Note that some old BIOSes might not happily boot USB drives created in this way.
- Install syslinux
- Insert the USB key and find the device using dmesg (assumed to be at /dev/sdg below)
- Create a FAT partition, mark it bootable (assumed at /dev/sdg1 below)
- Put mbr.bin on the key (cat /usr/lib/syslinux/mbr.bin > /dev/sdg)
- Mount the FAT partition and put the following files on it:
- vmlinuz and initrd.gz from http://http.us.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/hd-media/
- ISO of the first Debian installation CD
- Create syslinux.cfg with the following content:
- Unmount the FAT partition if it was mounted (umount /dev/sdg1)
- Run syslinux /dev/sdg1
You can also automate the installation. See: http://www.debian.org/releases/stable/amd64/apb.html.en. The preseed.cfg file should go into the root folder of the USB key. You can then change the syslinux.cfg file to:
append initrd=initrd.gz auto file=/hd-media/preseed.cfg locale=en_US console-keymaps-at/keymap=us
You now have a bootable USB key that you can also easily modify.