I'm trying to deploy an easier way to configure my computers.
I'm using an Ubuntu Server as DHCP and tftp server to manage PXE installations.
I find help with ubuntu netboot and with ubuntu PXE install server
Everything is fine until my menu on my futur well installed computer.
It tries to connect to ubuntu mirrors.. It's a huge problem because it doesn't have internet connection !
I've mount an image of Ubuntu Trusty on my Ubuntu Server (thank to Apache) and my link is available.
Here is my code
DEFAULT vesamenu.c32
timeout 100
display boot.msg
menu background splash.png
menu title Welcome to my awesome installer
label Install new computer
kernel ubuntu-installer/amd64/linux
append ks=http://ip.local.server/ks.cfg vga=normal initird=ubuntu-installer/amd64/initrd.gz
When I make my decision to select "Install new computer" it seems working but finally the installer installs network tools (configure ip v4, searched dhcp, configured ip v6) and fail when try to connect to Ubuntu mirror. But I don't want it to connect to mirrors because files are already downloaded on my Ubuntu Server (http://ip.local.server/ubuntu-trusty).
It didn't seems to understand that my ks.cfg
is here (http://ip.local.server/ks.cfg
).
ks.cfg
:
#Generated by Kickstart Configurator
#platform=x86
#Install OS instead of upgrade
install
#Use Web installation
url --url http://192.168.3.1/ubuntu-trusty
#### Mirror settings ###
d-i mirror/country string fr
d-i mirror/http/hostname string http://192.168.3.1
d-i mirror/http/directory string /ubuntu-trusty
d-i mirror/suite string trusty
#d-i mirror/country string fr
#System language
lang fr_FR
#Language modules to install
langsupport fr_FR
#System keyboard
keyboard fr
#System mouse
mouse
#System timezone
timezone Europe/Paris
#Root password
rootpw --disabled
#Initial user
user myuser --fullname "MyUser" --iscrypted --password $1$tDwZTgoh$a25ayXUItWDWxdQlUg0Tk1
#Reboot after installation
reboot
#Use text mode install
text
#Use interactive kickstart installation method
interactive
#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
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=static --ip=192.168.3.222 --netmask=255.255.255.0 --nameserver=192.168.3.1 --gateway=192.168.3.1
#Firewall configuration
firewall --disabled
#X Window System configuration information
#xconfig --depth=32 --resolution=2048x1536 --defaultdesktop=GNOME --startxonboot
This ks.cfg
file was generated directly from system-config-kickstart
.
Edit:
I've set a static ip on my ks.cfg
and with a tcpdump
on my server I can see requests with this ip. This means my ks.cfg
file is read but I still don't know why it's searching to access mirrors on the web instead of searching on my server.
Does anyone have an idea of this mirror researches that fail my PXE installation?
Thank you in advance.
Booting with kickstart have multiple layers and not all information is send from one layer to the next.
Even though your DHCP server have send an ip and information about bootfiles to the loader program ( often that is syslinux or pxelinux ) this information is not send to the OS when it boots. The kickstart file is only read after the system boots and the install program have started ( often that is anaconda ).
I think you need to pass ip=dhcp somewhere on the append line. In my setup I also have keymap=dk lang=en_US on this line to setup language and keyboard settings.
First let me ask if you have turned your HTTP server on? in your case the ks.cfg file is going to be retrieved by an http transfer from
Next for the mirror parameters in your ks file you have to add something like
you could also add mirror settings at the "append" line like