The chocolate ration is being increased to 25 grammes per week.

Category Archives: linux

CentOS 7 USB kickstart installation: HOWTO

I believe in repeatable processes, and keeping with that philosophy, I wanted to script the installation of CentOS 7 on a new server I was building.  I’ve used kickstart files booting over the network, but many hours invested in this and I couldn’t get my Gigabyte Z87X-UD5H to boot from my PXE server, which I had used successfully before.  So, the next best thing seemed to have the kickstart file on a USB drive, but the iterative nature of the task wasn’t well suited for this.  A friend reminded me that you can load the kickstart file via HTTP, so that seemed to be the best remaining option.

I found a post from the kickstart mailing list which described most of what I wanted to do.  However, many hours into the task it was clear there were serious typos and mistakes in the recipe.  In #3, the second directory to make is CentOS-7-KS-iso not CentOS-7-iso. In #4, there’s no reason to use compression in the local copy. And, in #8, the the dd if= argument has a typo (CSB instead of KS).

But the mother of all mistakes is in #7. Turns out the volume id of the installer must match the isolinux/isolinux.cfg file used to boot the installer. And since there were no instructions to change the latter file, this meant anyone using these instructions was destined to get this error when booting from the USB drive:

Warning: Could not boot
Warning: /dev/root does not exist

Googling for this error was not that helpful, since most of the replies had wrong or misleading information, some in places that are usually pretty reliable.  I don’t remember where I saw it, but I found a post that said the error was from mismatched volume identifiers. Yep, once I changed genisoimage to use the expected volume id, I was happily executing my kickstart file and installing CentOS 7.

I made a script to create the USB installer. I hope it helps someone else.