For some reason, starting a PXE boot installation of RHEL6.4 on UEFI systems is poorly documented. Simultaneously, the process is not terribly verbose when it fails. Here's what I had to do to get this to work.
We going to use Cobbler to take care of a lot of the gruntwork (TFTP, DHCP, etc). It's entirely possible to do it without Cobbler, but even accounting for its warts it will make you more sane. Here's a basic list of what you'll need:
- One host to run all of the Cobbler services. I'm going to refer to this as the server.
- A local network connecting the hosts you want to PXE install.
- A copy of the RHEL installation media.
There's usually a version of Cobbler in the EPEL repository, but it's also quite old and much of the EFI PXE functionality has been updated in the Cobbler source. As such I recommend grabbing it from Github.
On the server:
git clone https://github.com/cobbler/cobbler
git checkout cobbler-2.4.0-1 # Get the 2.4.0 release branch
cd cobbler
make rpms
# You may have to satisfy some dependencies for
# this next step. Use Yum do to so.
sudo rpm -i cobbler-2.4.0-1.el6.noarch.rpm
You now have a basic Cobbler installation. We'll need to modify some things to get everything working. First, let's make sure Cobbler is running and accessible.
sudo service httpd restart
sudo service cobblerd restart
# Get the EFI (and other) boot loaders we'll need
cobbler get-loaders
Make sure you 'restart' cobblerd. If you 'start' it when it's already started it gets into a bad state.
Before we tweak the Cobbler installation, get the installation
media available by inserting the DVD or mounting the ISO
somewhere. I'll refer to the location with the source as
$RHEL_SOURCE
. Now we'll import it into Cobbler.
cobbler import --arch=x86_64 --name=rhel6.4
--path=$RHEL_SOURCE
This will produce a distro and a profile for RHEL6.4 within
Cobbler. You can see them if you run cobbler report
. The
profile will appear as a boot option once we sync the changes,
but first we need to configure a few more things.
Go to the Cobbler configuration directory:
cd /etc/cobbler
The main configuration file is called settings. Modify as necessary for your environment, but make sure you set the following options:
# /etc/cobbler/settings
kernel_options:
ksdevice: link # If you have more than one *connected*
# network card you may need something different
# here. The default option is 'bootif',
# but the PXE environment doesn't seem to
# pass the right options so it doesn't
# work.
lang: 'en_US' # Obviously use your language of choice
manage_dhcp: 1
next_server: <ip> # The IP of server on the local network
server: <ip> # Same
You'll also need to modify the DHCP configuration template located at /etc/cobbler/dhcp.template as appropriate for your environment. Now we'll restart Cobbler to accept the changes
service cobblerd restart
The standard Cobbler install won't load the installer properly on UEFI systems. One of the reasons for this is that it doesn't include the bootsplash image, without which you'll just get yellow text on a white screen (don't ask, I don't know why).
We'll modify our profile to transfer the boot splash image to the TFTP directory and to use basic video mode:
cobbler distro edit --name=rhel6.4-x86_64 --boot-files="/var/lib/tftpboot/grub/splash.xpm.gz=$RHEL_SOURCE/EFI/BOOT/splash.xpm.gz --kopts="xdriver=vesa nomodeset"
And we modify the /etc/cobbler/pxe/efidefault file to load the boot splash:
# /etc/cobbler/pxe/efidefault
default=0
timeout=10
splashimage=(nd)/splash.xpm.gz
$grub_menu_items
Restart Cobbler one more time:
service cobblerd restart
Check for any errors. This will probably produce warnings, but they're not all fatal. Fix any that look particularly bad
cobbler check
Sync Cobbler to push all the changes:
cobbler sync
Boot the clients in PXE mode, and the installer should start right up. Presumably you'll want to use a Kickstart file, but there are lots of good references for that.
Could you give an example of how to do this UEFI thing for CentOS 7 please, this is not working for me.