Project

General

Profile

Feature #12635

Updated by Lukas Zapletal about 8 years ago

It looks like Grub2 is the best and most compatible way of PXE booting EFI hardware and it is available in most Linux distributions. It makes sense to provide support in our Puppet classes and installer to deploy these. 

 Puppet changes as follows: 

 if RHEL6 or Fedora 18 or older is found then 
   install grub package 
   create /var/lib/tftproot/grub/ 
   copy /boot/efi/EFI/*/grub.efi Instructions on where to /var/lib/tftproot/grub/grubx64.efi 
   create a *relative* symlink shim.efi to /var/lib/tftproot/grub/grubx64.efi 
   ensure correct file permissions and SELinux context 

 if find the firmware in RHEL7 are at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-installation-server-setup.html (RHEL6 does not ship Grub2 so installer should fail or Fedora 19 or newer is found then 
   install packages: grub2-efi grub2-efi-modules grub2-tools 
   create /var/lib/tftproot/grub2/ 
   copy /boot/efi/EFI/*/grubx64.efi to /var/lib/tftproot/grub2/grubx64s.efi 
   copy /boot/efi/EFI/*/shim.efi to /var/lib/tftproot/grub2/shim.efi 
   build grub2 with all modules with: grub2-mkimage -O x86_64-efi -d /usr/lib/grub/x86_64-efi -o /var/lib/tftproot/grub2/grubx64.efi -p "" `find /usr/lib/grub/x86_64-efi/*.mod -printf "%f " | sed -e 's/\.mod//g'` (X) 
   ensure correct file permissions skip that). Similarly for Debian and SELinux context 

 if Debian or Ubuntu it is found then 
   install packages: grub-common grub-efi-amd64-bin 
   create /var/lib/tftproot/grub2/ 
   build grub2 with all modules with: grub-mkimage -O x86_64-efi -d /usr/lib/grub/x86_64-efi -o /var/lib/tftproot/grub2/grubx64.efi -p "" `find /usr/lib/grub/x86_64-efi/*.mod -printf "%f " | sed -e 's/\.mod//g'` (X) 
   create a *relative* symlink shim.efi to /var/lib/tftproot/grub/grubx64.efi 
   ensure correct file permissions 

 I have only tested this with latest LTS Ubuntu and Debian Jessie (8) 

 (X) - this command could be extracted to a helper script available for direct download at http://archive.ubuntu.com/ubuntu/dists/trusty/main/uefi/grub2-amd64/current/ or in debian-installer-8-netboot-amd64 package. 

Back