Fixing Intermittent IPv6 Kickstart Issues

For a work project, it became necessary to kickstart CentOS installations using only IPv6. This is because the provisioning VLAN is separate from everything else, we needed to set static IPv4 addressing in the kickstart, and there’s (currently) no way to have “installer only” network settings in a kickstart configuration.

It’s simple enough, just create a local-only IPv6 network on the provisioning server, announce it with radvd (and DHCPv6, for good measure), and just use those addresses for Anaconda’s boot parameters and kickstart’s url line. However, in Anaconda’s haste to start the installation, a small bug came forth…

On a seemingly random basis, it would show a dialog box like the one above, saying it could not download the kickstart file. (Note: The same thing can also happen during download of install.img) The most peculiar thing about this problem is that hitting OK, even just a few seconds later, would almost always result in the installation being successfully kicked off. So what’s the problem?

“K, network’s up! Let’s go!”

Anaconda gives the networking interface some time to get configured. In fact, it will outright wait until NetworkManager configures the interface, and tells you as much. The problem is that it waits for any addressing, so if you need IPv6, and IPv4 gets configured first, Anaconda will rush to move on, and hit a brick wall trying to grab the kickstart file (or install.img). You can press OK and move on right away, because within those few seconds it takes to hit <tab> and <enter>, it has the IPv6 addressing it needs. But, this isn’t acceptable for fully automated and unattended installations.

This will happen during both Anaconda’s fetching of the kickstart fileĀ and the actual installation, because the network stack (if needed for the installation) is restarted after the kickstart file is downloaded, in order to apply any network settings listed in the file.

“No seriously, you need this.”

The fix is really easy. Just explicitly tell the installer that, yes, IPv6 is a real thing now, people actually use it, and it’s actually going to be needed in order to get this install done.

For Anaconda’s initial kickstart download, specify both noipv4 and ipv6=dhcp in the boot parameters, kernel command line, whatever you call it. Just a friendly reminder, if there’s more than one NIC in your server, you’ll also want to set ksdevice=<MAC or interface name> as well, so you aren’t prompted to select a NIC during an otherwise unattended installation.

For the kickstart file, and the installation itself, add --ipv6=auto or --ipv6=dhcp in your first network line. Remember, only the first one is used for installation.

Other Resources

The entire system I built would have probably been way more efficient if I knew about all the various options available for unattended installs. Here are some pages that documentĀ a few of them.

https://fedoraproject.org/wiki/Anaconda_Boot_Options_(F17)
https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#network
https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-startinginstall.html

One comment on “Fixing Intermittent IPv6 Kickstart Issues

Leave a Reply

Your email address will not be published. Required fields are marked *