warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

Create Ubuntu / Debian SSH network install ISO

wget -q --no-check-certificate -O - | bash -s



# install required applications
wget -q -P /tmp/
sudo dpkg -i /tmp/syslinux_6.03+dfsg-11ubuntu1_amd64.deb

# create target directory
mkdir /tmp/iso

# download kernel and initrd
wget -q${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux -O /tmp/iso/linux
wget -q${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz -O /tmp/iso/initrd.gz

# create preseed configuration (and copy to webserver)
cat <<EOF> /tmp/iso/ssh.seed
d-i anna/choose_modules string network-console
d-i preseed/early_command string anna-install network-console

# password authentification
d-i network-console/password password t00r
d-i network-console/password-again password t00r

# or authentication with pre-shared SSH key
#d-i network-console/password-disabled boolean true
#d-i network-console/authorized_keys_url string

# create isolinux configuration
cat <<EOF> /tmp/iso/isolinux.cfg
default linux
timeout 1
label linux
kernel linux
append initrd=initrd.gz url=http://www.example/preseed/ssh.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical biosdevname=0 --

# copy required files
cp /usr/lib/syslinux/isolinux.bin /tmp/iso

# create iso image
mkisofs -q -V "netinstall" -o /tmp/netinstall.iso -b isolinux.bin -c -no-emul-boot -boot-load-size 4 -boot-info-table -r -J /tmp/iso

Get selected debconf answers

# view all manual selections
for PACKAGE in $(debconf-show --listowners); do
   echo ${PACKAGE}
   debconf-show ${PACKAGE} | grep "*"
apt-get install debconf-utils
# replace <TAB> with tabulator key
for i in $(debconf-show ${PACKAGE} | grep "*" | cut -d" " -f2 | cut -d":" -f1); do 
	debconf-get-selections | egrep "$i<TAB>";
debconf-get-selections  | grep -v "#"
debconf-show ddclient | grep '*'
apt-get install debconf-utils
sudo debconf-set-selections
# show installed packages
debconf-show  --listowners
debconf-show mysql-server-5.0 | grep "*" | cut -
Syndicate content