cptkeys
February 28th, 2019, 07:06 AM
Hey all,
Been working on configuring a deployment for 18.04.2 with Desktop and Server as available options.
I have the preseed working enough to get Desktop to finish
The main issue I have after completion is that DHCP is entirely not working until editing network-manager files, or running dhclient
What I need is for the preseed to configure the dhcp and keep the dhcp settings working (whether by late_command or other)
This is the pxelinus menu config:
LABEL Ubuntu 18.04 Desktop - Full erase MENU LABEL Install Ubuntu 18.04 Desktop - Full erase
kernel Linux/Ubuntu/Desktop/18.04/casper/vmlinuz
append boot=casper automatic-ubiquity netboot=nfs nfsroot=10.2.1.72:/Linux/Ubuntu/Desktop/18.04/ initrd=/Linux/Ubuntu/Desktop/18.04/casper/initrd.lz auto=true url=http://10.2.1.72/preseed/preseedfullerase.cfg toram
There are commented lines from where I have been testing different methods to get dhcp to function.
The reference to */install.sh is a script file that purely runs (but still fails to do anything):
sudo sed -i 's/^managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf
See below preseed file. Lots of pieces used from the origin preseed that was used, and other options added from preseeds found online
# Language setting
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i localechooser/supported-locales multiselect en_US.UTF-8
# Keyboard setting
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/charmap select UTF-8
d-i keymap select us
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/modelcode string us
d-i preseed/early_command string curl -k http://10.2.1.72/preseed/install.sh;
### Network configuration
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto
# Just in case our DHCP server is busy.
d-i netcfg/dhcp_timeout string 60
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i preseed/early_command string curl -k http://10.2.1.72/preseed/install.sh;
# paritioning.
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
# Clock setting
d-i clock-setup/utc boolean true
d-i time/zone string Brisbane
d-i clock-setup/ntp boolean true
d-i pkgsel/include string wget net-tools git
# User setting
d-i passwd/root-login boolean false
d-i passwd/make-user boolean false
d-i passwd/root-password password Test123
d-i passwd/root-password-again password Test123
d-i user-setup/allow-password-weak boolean true
d-i passwd/user-fullname string administrator
d-i passwd/username string administrator
d-i passwd/user-password password Test123
d-i passwd/user-password-again password Test123
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
### Mirror settings
d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/hostname string 10.3.1.31
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
tasksel tasksel/first multiselect standard,ssh-server
d-i pkgsel/upgrade select full-upgrade
#d-i preseed/late_command string \
# in-target tftp 172.16.0.1 -c get postpreseed.sh; \
# in-target chmod +x postpreseed.sh; \
# in-target /bin/bash -x postpreseed.sh; \
# in-target rm -f postpreseed.sh;
d-i preseed/late_command string \
cd /target; \
wget http://10.2.1.72/preseed/install.sh; \
chmod +x ./install.sh; \
chroot ./ ./install.sh; \
#rm -f ./install.sh;
#d-i preseed/run string install.sh
d-i preseed/late_command string curl -k http://10.2.1.72/preseed/install.sh;
#d-i preseed/late_command string in-target sed -i 's/^managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf;
#in-target wget -O /target/etc/install.sh; http://10.2.1.72/preseed/install.sh; \
#chmod 700 /target/etc/install.sh; \
#in-target sh /target/etc/install.sh
# reboot at the end
d-i finish-install/reboot_in_progress note
#Grub
d-i debian-installer/exit/shutdown boolean true
Been working on configuring a deployment for 18.04.2 with Desktop and Server as available options.
I have the preseed working enough to get Desktop to finish
The main issue I have after completion is that DHCP is entirely not working until editing network-manager files, or running dhclient
What I need is for the preseed to configure the dhcp and keep the dhcp settings working (whether by late_command or other)
This is the pxelinus menu config:
LABEL Ubuntu 18.04 Desktop - Full erase MENU LABEL Install Ubuntu 18.04 Desktop - Full erase
kernel Linux/Ubuntu/Desktop/18.04/casper/vmlinuz
append boot=casper automatic-ubiquity netboot=nfs nfsroot=10.2.1.72:/Linux/Ubuntu/Desktop/18.04/ initrd=/Linux/Ubuntu/Desktop/18.04/casper/initrd.lz auto=true url=http://10.2.1.72/preseed/preseedfullerase.cfg toram
There are commented lines from where I have been testing different methods to get dhcp to function.
The reference to */install.sh is a script file that purely runs (but still fails to do anything):
sudo sed -i 's/^managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf
See below preseed file. Lots of pieces used from the origin preseed that was used, and other options added from preseeds found online
# Language setting
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i localechooser/supported-locales multiselect en_US.UTF-8
# Keyboard setting
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/charmap select UTF-8
d-i keymap select us
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/modelcode string us
d-i preseed/early_command string curl -k http://10.2.1.72/preseed/install.sh;
### Network configuration
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto
# Just in case our DHCP server is busy.
d-i netcfg/dhcp_timeout string 60
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i preseed/early_command string curl -k http://10.2.1.72/preseed/install.sh;
# paritioning.
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
# Clock setting
d-i clock-setup/utc boolean true
d-i time/zone string Brisbane
d-i clock-setup/ntp boolean true
d-i pkgsel/include string wget net-tools git
# User setting
d-i passwd/root-login boolean false
d-i passwd/make-user boolean false
d-i passwd/root-password password Test123
d-i passwd/root-password-again password Test123
d-i user-setup/allow-password-weak boolean true
d-i passwd/user-fullname string administrator
d-i passwd/username string administrator
d-i passwd/user-password password Test123
d-i passwd/user-password-again password Test123
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
### Mirror settings
d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/hostname string 10.3.1.31
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
tasksel tasksel/first multiselect standard,ssh-server
d-i pkgsel/upgrade select full-upgrade
#d-i preseed/late_command string \
# in-target tftp 172.16.0.1 -c get postpreseed.sh; \
# in-target chmod +x postpreseed.sh; \
# in-target /bin/bash -x postpreseed.sh; \
# in-target rm -f postpreseed.sh;
d-i preseed/late_command string \
cd /target; \
wget http://10.2.1.72/preseed/install.sh; \
chmod +x ./install.sh; \
chroot ./ ./install.sh; \
#rm -f ./install.sh;
#d-i preseed/run string install.sh
d-i preseed/late_command string curl -k http://10.2.1.72/preseed/install.sh;
#d-i preseed/late_command string in-target sed -i 's/^managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf;
#in-target wget -O /target/etc/install.sh; http://10.2.1.72/preseed/install.sh; \
#chmod 700 /target/etc/install.sh; \
#in-target sh /target/etc/install.sh
# reboot at the end
d-i finish-install/reboot_in_progress note
#Grub
d-i debian-installer/exit/shutdown boolean true