PXE boot and install ESXi 6.7 U1 - remember to use correct boot files
This is a short revisit of an earlier blog post on automating ESXi installation through PXE booting and Kickstart scripts.
In that post we configured a solution for installing 6.5 U1 and that have served me well for a while. Although we have our hosts on newer builds and versions we like to install them with the same image and then run through the patches so that all hosts in the environment are configured in the same way.
On a new environment however we decided to install the hosts directly to 6.7 U1 and that had me revisiting my tftp server setup.
I won't repeat the details on how to configure the tftp stuff, please refer to my earlier post on that. The steps for adding the 6.7 U1 image to the mix would be:
- Mount the iso image to the VM
- Copy the files to a directory for your tftp server to use (i.e. /var/lib/tftpboot/imagepath)
- Fix the "/" path references (sed -i 's////g' /var/lib/tftpboot/imagepath/boot_.cfg_)
- Copy the imagepath/efi/boot/bootx64.efi to imagepath/mboot.efi (for UEFI boot)
Another point that is easy to forget is that you always should have the newest boot.cfg (and mboot.efi) files on your tftpboot root directory. I forgot this when I first tried to boot up to 6.7.
The boot.cfg is the file that determines what modules the installer should load. There might be differences between versions (and updates) to which modules the installer needs to load. Another important piece of this file is the kernel line. From 6.5 to 6.7 this is changed.
In my case I use the boot.cfg file as a template so that each installation (i.e. ESXi host) gets its own instance of this file so it points to the correct kickstart file (refer to this post for more info). Before I remembered I needed to copy the new file I only set the prefix line to point to the new imagepath, having the installer to fail to load the correct kernel.
This should remind you to always copy the newest boot.cfg (and mboot.efi) file from the iso image (and not only update the prefix to point to the new imagepath). This is also mentioned in the documentation: