Currently I am trying to build a more or less dynamic preseed. This means I am creating custom templates/question and depending on the answers I want to set specific "d-i" options. My environment is ubuntu/debian using the debian-installer.
These are executed using the following command:
d-i preseed/early_command string wget -qO preseed_early_command.sh http://myurl/preseed/server/bionic/preseed_early_command.sh && sh preseed_early_command.sh
Depending on the language selection I am trying to set specific options using
debconf-set and it looks like they are recognized but I am still getting language dialog after
early_command finishes (tho all set values are set correctly following the questions asked)
if [ "$(debconf-get language-select/select)" = "German" ]; then debconf-set debian-installer/language "de" debconf-set debian-installer/country "DE" debconf-set debian-installer/locale "de_DE.UTF-8" debconf-set console-setup/ask_detect false debconf-set keyboard-configuration/layoutcode "de" debconf-set keyboard-configuration/variantcode "nodeadkeys" fi
How can I prevent the installer asking me the questions again despite being set? Is it even possible to manipulate the preseed in such a way I am trying to?
Depending on the machine type selection (i.e. Desktop / Headless) I would want to set the tasksel/pkgsel options. But these always fail with an error whether I am trying to run them directly or using
if [ "$(debconf-get machine-type/select)" = "Ubuntu Desktop" ]; then debconf-set tasksel/first multiselect ubuntu-desktop debconf-set pkgsel/include openssh-server build-essential nano vim hardinfo htop remmina bash-completion dkms dialog elif [ "$(debconf-get machine-type/select)" = "Ubuntu Headless" ]; then debconf-set tasksel/first multiselect standard debconf-set pkgsel/include "openssh-server nano vim htop bash-completion ntp" fi
How are the "pkgsel/tasksel" options being executed/evaluated? Tasksel doesn't seem to be availabe at this stage as busybox throws