1

I am trying to perform a PXE boot on a server with the following PXE linux configuration located in pxelinux.cfg/default:

default cli
label cli
        menu label kickstart-installation
        kernel ubuntu-installer/amd64/linux
        append text ks=http://172.22.196.61/kickstart.cfg initrd=ubuntu-installer/amd64/initrd.gz noipv6 ksdevice=eth0 ip=172.22.196.200 netmask=255.255.255.0 gateway=172.22.169.254 dns=8.8.8.8 biosdevname=0

The image is pulled on the server to the machine. The installation is started but the ubuntu installation itself still tries to obtain a DHCP address (and this fails because we only use static ip addresses). Also the text parameter is not accepted for some reason because the installation still happens in the GUI.

I've followed this manual for kickstarting a server: https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-startinginstall.html

The actual PXE boot is a Ubuntu 14.04, pulled from this location: http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/

Jonas Libbrecht
  • 141
  • 1
  • 7

2 Answers2

2

Thanks to Pat for hinting me the fact that every distro uses other setup parameters, and not just the kernel parameters.

Apparently the kernel parameters were passed through as seen in cat /proc/cmdline but the debian-installer is not using the kernel parameters to kickstart the setup.

It is using netcfg in this format:

default cli
label cli
        menu label kickstartinstall
        kernel ubuntu-installer/amd64/linux
        append ks=http://172.22.196.61/kickstart.cfg initrd=ubuntu-installer/amd64/initrd.gz hostname=test-machine domain=test.local interface=eth0 netcfg/get_ipaddress=172.22.196.200 netcfg/get_netmask=255.255.255.0 netcfg/get_gateway=172.22.196.254 netcfg/get_nameservers=8.8.8.8 netcfg/disable_dhcp=true

As found here: http://blog.loftninjas.org/2008/07/17/booting-debian-installer-with-a-static-ip-address/

Jonas Libbrecht
  • 141
  • 1
  • 7
0

Even when CentOS and Ubuntu both use the kickstart technology it does not mean their booting parameters (append) are identical. Please consider some append parameters are read by the kernel but others are read by the corresponding initrd init script (and descendants) and thus the differences you can see from one distro to the other one.

You should look for Ubuntu specific parameters. i.e. Ubuntu ignores the variable text and the variable ip takes as parameter bootp or dhcp but not an IP address.

For PXE parameters of many Linux distributions you can take as starting point Serva's website.

Pat
  • 3,519
  • 2
  • 17
  • 17
  • Indeed, I've discovered that I really just need basic kernel parameters to kickstart the ubuntu installation found here: https://www.kernel.org/doc/Documentation/kernel-parameters.txt, Also I've found that assigning a IP address for the linux kernel works like this: https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt – Jonas Libbrecht Jun 07 '16 at 08:10
  • You did not read my answer and you are stubbornly looking for info in the wrong place. Save yourself a lot of time and try to find how your target distro specifically do things. – Pat Jun 07 '16 at 08:37
  • Indeed you are correct, I've been looking into the fact why the kernel parameters are not passed to the installer. And I figured it out. Apparently the ubuntu setup uses a debian installer and the parameters are passed to the installer like this: http://blog.loftninjas.org/2008/07/17/booting-debian-installer-with-a-static-ip-address/ – Jonas Libbrecht Jun 07 '16 at 09:00
  • It all depends on the target. Ubuntu uses 2 systems `kickstart` and `preseed` for automating installs now what you've found are the preseed variables. Then you are mixing things; it can be done but it is better if you know what you are doing. The pressed engine works on installs but it might not be present when you PXE i.e. just a kernel and a plain initrd. – Pat Jun 07 '16 at 09:12