I can easily make a bootable flash drive for installing Debian by doing this:
dd if=debian-7.8.0-amd64-CD-1.iso of=/dev/sdg bs=4M; sync
but then it makes the flash drive read-only. I'd like to customize things, but how?
I can easily make a bootable flash drive for installing Debian by doing this:
dd if=debian-7.8.0-amd64-CD-1.iso of=/dev/sdg bs=4M; sync
but then it makes the flash drive read-only. I'd like to customize things, but how?
Having the install media writable enables a lot flexibility and time-savings. A plain install of Debian rarely has exactly what you want already installed. With a preseed file, you can make choices ahead of time as to how you want the system set up and what packages you want installed. A full discussion of this is at http://www.debian.org/releases/stable/amd64/apb.html.en. 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.