0

i'm trying to install a server via pxe with ubuntu 16.04. server. So what does fine is the PXE Boot

label   install (x86_64 - Ubuntu 16.04)
    menu    label   Installer (x86_64 - Ubuntu 16.04)
    kernel  install/Ubuntu/16.04/linux
    append  ks=http://insXXXX.XXXXXXX/kickstart/Ubuntu/16.04/release-XXXXXX.XXXXXXXXX.ks initrd=install/Ubuntu/16.04/initrd.gz

i see in the log the the kickstart file is loaded but i fails on network setup. evrytime it falls back to dhcp and there it stucks.

My kickstart file looks like this

#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T

#System language
lang de_DE
#Language modules to install
langsupport de_DE
#System keyboard
keyboard de
#System mouse
mouse
#System timezone
timezone Europe/Berlin
#Network information
network --bootproto=static --ip=192.168.14.XXX --netmask=255.255.255.0 --nameserver=192.168.14.XXX --device=ens3
network --bootproto=static --ip=XXX.XXXXXXXXXXX --netmask=255.255.255.0 --gateway=XXX.XXX.XXX.1 --device=ens6
#Root password
auth       --enableshadow --enablemd5
rootpw     --iscrypted XXXXXXXXXXXXXXXXXXXXXXX
sshpw      --username=root XXXXXXXXXXXXXXXXXXXXXXX --iscrypted
#Initial user
user --disabled
#Reboot after installation
reboot
#Use text mode install
text
#Use interactive kickstart installation method
interactive
#Install OS instead of upgrade
install
#Use Web installation
url --url http://insXXX.XXXXXXXXXXX.com/Ubuntu/16.04/install
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part swap --size 4000 
part / --fstype ext4 --size 1 --grow --noformat 
#System authorization infomation
auth  --useshadow  --enablemd5 
#Firewall configuration
firewall --disabled 
#Do not configure the X Window System
skipx
#Package install information
# Additional packages to install
%packages
ca-certificates
openssl
python
openssh-server
vim
nano

# Unmount drives with active partitions. Without this command all the installation process would stop and require confirmation to unmount drives that are already mounted.
d-i preseed/early_command string umount /media || true

# Don't install recommended items
d-i preseed base-installer/install-recommends boolean false

# Install only security updates automatically
d-i preseed pkgsel/update-policy select unattended-upgrades

# Fix locale
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
echo 'LANGUAGE="en_US:en"' >> /etc/default/locale
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale

# Set hostname
sed -i "s/ubuntu/release-XXXXXX.XXXXXXXXXXX.de/g" /etc/hostname
sed -i "s/ubuntu/release-XXXXXX.XXXXXXXXXXX.de/g" /etc/hosts

%post
# SSH settings
sed -i -e 's/^PasswordAuthentication yes$/PasswordAuthentication no/g' \
       -e 's/^#PermitUserEnvironment no$/PermitUserEnvironment yes/g' \
       -e 's/^X11Forwarding yes$/X11Forwarding no/g' \
       -e 's/^Subsystem/#Subsystem/g' \
    /etc/ssh/sshd_config

# SSH keys
mkdir -m 0700                       /root/.ssh
wget  -O /root/.ssh/authorized_keys http://insXXXX.XXXXXXXXX.com/ssh/authorized_keys
chmod 0600                          /root/.ssh/authorized_keys


# Clean
apt-get -f -y install
apt-get -y autoremove
apt-get clean

it looks like network setting are not loaded... but i dont get any error why this happends ...

6
  • if the file is loaded by tftp or pxe look at the logs adn submit them,mayve you forgott to add the drivers in the kernel? – djdomi Sep 13 '19 at 16:55
  • you mean drivers for network? – Kjellson Sep 16 '19 at 11:50
  • yup indeed of course :) – djdomi Sep 16 '19 at 20:12
  • okey... strange thing. i figured out that the ens6 setting accepted but ens3 is trying DHCP evrytime, then it says, dhcp successful but after that no address has been set for ens3 – Kjellson Sep 18 '19 at 11:15
  • if i add the address for ens3 manual the install works (until partitioning ) there seems to be another error – Kjellson Sep 18 '19 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.