This repository used to contain bash scripts that helped create installer CDs with containing a preseed.cfg
, or various files. You can still find those on the bash-scripts branch. They were too restrictive, and a rewrite in Python wasn't worth it. Ultimately, creating these CDs is rare, and doesn't need to be automated. So instead, this repo now contains instructions and a few examples.
You will need
sudo apt-get install debian-installer-8-netboot-amd64 fakeroot xorriso isolinux syslinux-common
(the last two only necessary if you want to produce CDs).
mkdir installer
cp /usr/lib/debian-installer/images/8/amd64/text/debian-installer/amd64/{linux,initrd.gz} installer/
The folder extra
will contain things that will be added to the initrd
.
mkdir extra
For example, a preseed file:
cp /path/to/my/preseed.cfg extra/preseed.cfg
Or, if you wanted to use the network-console (continue installation over SSH; see netinstall-preseed.cfg
),
# add our public key to the installer, so we can log in
mkdir extra/.ssh
cp ~/.ssh/id_rsa.pub extra/.ssh/authorized_keys
# generate the installer's host keys in advance, so that we know what the fingerprints are.
# note that the installer will generate new ones for the final system.
mkdir -p extra/etc/ssh
for type in rsa dsa ecdsa; do
ssh-keygen -q -t $type -f extra/etc/ssh/ssh_host_${type}_key -N ''
ssh-keygen -l -f extra/etc/ssh/ssh_host_${type}_key
done
Note: I find it a bit weird that when you log into the network console it
starts a new instance of the installer menu rather than just attaching you to
the existing one on the terminal. So you may prefer to, instead of logging in
as the installer
user (whose shell is /bin/network-console), log in as root
and use screen -aAx
. In particular, this means that if your SSH drops,
you're not hosed/split brain.
If your network card requires binary blobs:
apt-get download firmware-bnx2
dpkg-deb --extract firmware-bnx2_*.deb extra/
gunzip installer/initrd.gz
(cd extra; find . | fakeroot cpio --quiet -F ../installer/initrd --append -o -H newc)
gzip installer/initrd
At this point, if you can direct boot, then linux
and initrd.gz
will suffice. Otherwise:
cp /usr/lib/ISOLINUX/{isohdpfx.bin,isolinux.bin} installer/
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 installer/
Copy isolinux.cfg
from this repository to installer/isolinux.cfg
. Note the comment that enables the serial console, if you intend to install via OOB management / a VM / etc.
xorriso -outdev installer.iso \
-map installer/ / \
-boot_image isolinux dir=/ \
-boot_image isolinux system_area=installer/isohdpfx.bin \
-boot_image isolinux partition_table=on