Debian Flash Install
Last updated Thursday February 19, 2015
For quite some time it has been easy to make a bootable flash drive to install Debian by writing a boot CD image to the drive like this:
dd if=debian-7.8.0-amd64-CD-1.iso of=/dev/sdg bs=4M; syncWhile this works, the resulting flash drive is read-only. As soon as you log into a new machine, there will be packages you want to install that weren't installed by default. What can you do?
This article has the solution. After following these instructions, you'll have a writable flash drive installer to which you can add a preseed file. See here for a complete discussion of preseeding. A writable flash drive installer is also handy for files that you may want immediately and before networking is available. These can include seperately-packaged network drivers (typically laptops), configuration files, wallpaper, source code, or keys. Be careful if you choose to include keys.
Here we go...
default vmlinuz append initrd=initrd.gz
To automate the installation, the preseed.cfg file should go into the root of the flash drive. You can then change the syslinux.cfg file to:
default vmlinuz append initrd=initrd.gz auto file=/hd-media/preseed.cfg locale=en_US console-keymaps-at/keymap=us
You now have a bootable flash drive that you can also easily modify. You won't need to re-run syslinux unless you change vmlinuz or initrd.gz. This really isn't necessary unless you switch to a different release.
To get you started on preseeding, here is my preseed.cfg file:
d-i clock-setup/utc boolean true d-i time/zone string US/Pacific d-i clock-setup/ntp boolean true d-i passwd/user-default-groups string cdrom floppy sudo audio dip \ video plugdev netdev scanner bluetooth fuse vboxusers d-i partman/mount_style select traditional d-i mirror/country string US d-i mirror/http/hostname string http.us.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string d-i popularity-contest/participate boolean false d-i apt-setup/backports boolean true d-i apt-setup/use_mirror boolean true d-i pkgsel/include string alsa-base alsa-utils alsa-oss oss-compat \ sudo wicd-curses wicd-cli units cups-bsd curl \ irssi mate-desktop-environment-extras/wheezy-backports \ build-essential debhelper dpkg-dev g++ automake autoconf \ libncurses5-dev libtool intltool-debian libdpkg-perl \ wicd-gtk xterm xfonts-terminus openjdk-7-jdk xinit lightdm \ iceweasel flashplugin-nonfree mozplugger \ xul-ext-ablock-plus xul-ext-flashblock \ xul-ext-useragentswitcher \ texlive-latex-extra texlive-extra-utils \ texlive-fonts-recommended texlive-fonts-extra \ psutils pdfjam \ xclip gcolor2 geeqie xsane mikmod xmp gnucash \ git gitk
Please note that some old BIOSes might not happily boot USB drives created in this way.
This article is based on one that is no longer available. The last version can be seen here.
( home | articles )