Change simple-cdd configuration to have full installer work offline

We move the default preseed to the kali profile so that the default
preseed can actually again enable simple-cdd-profiles that we need
because we want the other profiles to have their preseed and postinst
working (and they work through the script run when simple-cdd-profiles
is installed).

We add an offline profile that disables the network mirror (but not
the networking!) and we add a "postinst" script that is run in the
finish-install step to actually configure /etc/apt/sources.list that
is empty due to the preseed.
merge-requests/16/head
Raphaël Hertzog 5 years ago
parent 7c3989f668
commit 830d863fa6

@ -1 +0,0 @@
../../kali-config/common/includes.installer/preseed.cfg

@ -0,0 +1,3 @@
# loads the simple-cdd-profiles udeb to which asks for which profiles to use,
# load the debconf preseeding and queue packages for installation.
d-i preseed/early_command string anna-install simple-cdd-profiles

@ -1,2 +1 @@
# Disable default udebs from simple-cdd
# We don't want simple-cdd-profiles, we want to use tasksel
simple-cdd-profiles

@ -0,0 +1,17 @@
#!/bin/sh
if grep -q '^deb ' /etc/apt/sources.list; then
echo "INFO: sources.list is configured, everything is fine"
exit 0
fi
echo "INFO: sources.list is empty, setting up a default one for Kali"
cat >/etc/apt/sources.list <<END
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
END
apt-get update

@ -0,0 +1 @@
../../kali-config/common/includes.installer/preseed.cfg

@ -0,0 +1,3 @@
# Do not use a network mirror, full offline install
d-i apt-setup/use_mirror boolean false
d-i pkgsel/upgrade select none

@ -30,8 +30,17 @@
# To automatically select profiles (must also be listed in profiles):
# auto_profiles="foo bar baz"
if [ "$DISKTYPE" = "DVD" ]; then
# Enable offline installation for full installer image
profiles="kali offline"
auto_profiles="kali offline"
else
profiles="kali"
auto_profiles="kali"
fi
# To include profiles which only effect the CD build
build_profiles="kali"
# build_profiles="kali"
# Mirror tools
mirror_tools="reprepro download"

Loading…
Cancel
Save