The following will create an automated custom debian iso image using simple-cdd.
Copy the iso to the USB. Plug in the USB and press power; it will automatically restart with a fresh debian install.
No prompts, or typing required.
Barebone and vm tested.
Jump to Code
Anchor links do not work on github gists. please scroll down.
simple-cdd is in the debian repositories so there is no need to add or configure anything. Install it like any other package.
# install
apt install simple-cdd
This will create some directories to save your custom profiles.
# custom profiles
mkdir -p ~/simple-cdd/{profiles,config}
touch profiles/mjc.{description,packages,downloads,preseed,postinst}
touch config/mjc.conf
cd ~/simple-cdd
See a custom default.preseed below
You can use the global preseed or a defined local one by copying the global one into ~/simple-cdd/profiles/
# Global to local
#sudo vim /usr/share/simple-cdd/profiles/default.preseed
cp /usr/share/simple-cdd/profiles/default.preseed ~/simple-cdd/profiles/
vim profiles/default.preseed
See mjc.preseed below
Here is the magic of simple-cdd. The custom profile (mjc.preseed) is only 15 lines long.
The rest will be added into default.preseed; which will be the base for all custom isos.
# custom preseed
vim profiles/mjc.preseed
See mjc.packages below
Add all of the packages you would like in this file;
Do not add dependencies.
# packages
vim profiles/mjc.packages
See mjc.conf below
These are variables passed to simple-cdd.
# conf
vim config/mjc.conf
# This will create the iso in images/
build-simple-cdd --conf config/mjc.conf -p mjc
Make sure your usb is partitioned before using a high capacity USB.
# Your usb "/dev/sdc" might be different
# Do a df or disk -l
sudo dd if=images/debian-9.8-amd64-CD-1.iso of=/dev/sdc conv=notrunc,sync
# Overview
sudo apt install simple-cdd;
mkdir -p ~/simple-cdd/{profiles,config};
cd ~/simple-cdd;
# copy the files below into the profiles directory so it looks like this.
profiles/default.preseed;
profiles/mjc.preseed;
profiles/mjc.packages;
config/mjc.conf;
build-simple-cdd --conf config/mjc.conf -p mjc;
sudo dd if=images/debian-9.8-amd64-CD-1.iso of=/dev/sdc conv=notrunc,sync;
12.3. Automated Installation
B.4. Contents of the preconfiguration file (for stretch)
Simple-CDD/Howto - Debian Wiki
/usr/share/simple-cdd/README
Hello! You could put together all the good stuff I needed. Congrats.
If I may, I'd add the commands to install the gpg keys:
apt-get install debian-keyring debian-archive-keyring