Description of problem: rhts_partitions snippet should create /boot/efi for UEFI-based system. The partition is needed by UEFI firmware to boot OS. Without the partition, either anaconda detects the problem and abort, or the system fails to boot after the installation. Version-Release number of selected component (if applicable): beaker-0.16.1-1.el6eng How reproducible: Always, depends on hardware Steps to Reproduce: 1. Provision a system with RHEL6.5, adding "ondisk=sda" to Kickstart Metadata 2. 3. Actual results: Installation fails Expected results: Installation succeeds Additional info: When a recipe requires non-default partitioning (e.g. if ksmeta like partitions, ondisk, rootfstype and fstype are used), beaker sets up kickstart file to specifically create partitions. However, it misses /boot/efi, which is required for UEFI-based system. This is an excerpt from rhts_partitions: {% if distro_tree is arch('ia64') %} part /boot/efi --fstype vfat --size 200 --recommended {%- if ondisk %} --ondisk={{ ondisk }}{% endif %} {% elif distro_tree is arch('ppc', 'ppc64') %} part None --fstype 'PPC PReP Boot' --size 8 part /boot --size 200 --recommended --asprimary {%- if fstype %} --fstype {{ fstype }}{% endif %} {%- if ondisk %} --ondisk={{ ondisk }}{% endif %} {% else %} part /boot --size 200 --recommended --asprimary {%- if fstype %} --fstype {{ fstype }}{% endif %} {%- if ondisk %} --ondisk={{ ondisk }}{% endif %} {% endif %} It should somehow detect whether the system is UEFI-based or not and then create /boot/efi instead of /boot, in the similar way as arch('ia64') case above. If /boot/efi is not created for UEFI-based system, the installation will fail like this: (tested on RHEL6.5) ... Examining storage devices In progress The following errors occurred with your partitioning: You have not created a /boot/efi partition. This can happen if there is not enough space on your hard drive(s) for the installation.
I filed bug 1112439 for recording the firmware type in Beaker. In the meantime we can examine the NETBOOT_METHOD key (NETBOOT_METHOD=efigrub means it booted in EFI mode).
On Gerrit: http://gerrit.beaker-project.org/3168
"ondisk" line is needed inside "if system.has_efi" block, too. Quoted from Gerrit: +{% if system and system.has_efi %} +{# x86 EFI #} +part /boot/efi --fstype vfat --size 200 --recommended +{% else %} +{# x86 BIOS #} +part /boot --size 200 --recommended --asprimary +{%- if fstype %} --fstype {{ fstype }}{% endif %} +{%- if ondisk %} --ondisk={{ ondisk }}{% endif %} +{% endif %} Expected: +{% if system and system.has_efi %} +{# x86 EFI #} +part /boot/efi --fstype vfat --size 200 --recommended +{%- if ondisk %} --ondisk={{ ondisk }}{% endif %} +{% else %} +{# x86 BIOS #} +part /boot --size 200 --recommended --asprimary +{%- if fstype %} --fstype {{ fstype }}{% endif %} +{%- if ondisk %} --ondisk={{ ondisk }}{% endif %} +{% endif %}
(In reply to Jun'ichi NOMURA from comment #4) Well spotted!
http://gerrit.beaker-project.org/3174
(In reply to Dan Callaghan from comment #2) > In the > meantime we can examine the NETBOOT_METHOD key (NETBOOT_METHOD=efigrub means > it booted in EFI mode). Do we have to set NETBOOT_METHOD=efigrub key/value pair manually in the inventory system?
(In reply to Jun'ichi NOMURA from comment #7) > Do we have to set NETBOOT_METHOD=efigrub key/value pair manually in the > inventory system? It is populated automatically by /distribution/inventory, or you can set it manually.
beaker-distribution-inventory-1.2-3 is used in our lab currently but NETBOOT_METDHO=efigrub was not set for EFI system. Does the automatic registration need newer /distribution/inventory?
It could be because the NETBOOT_METHOD key is not defined in your Beaker installation. The key was added in 2012, it is created automatically for new Beaker installations, but existing installations would need to add it manually as a non-numeric key type using Admin -> Key Types. Unfortunately we didn't have proper release notes back then, so this step was never noted anywhere.
I've added this for you Jun'ichi.
Notes for verification: * This bug only affects recipes which use custom partitioning. When no custom partitions are defined, Beaker uses 'autopart' in the kickstart which tells Anaconda to figure out the right partitions itself. To trigger custom partitioning, you can just add a small custom partition with any mount point, for example <partition fs="ext4" name="mnt" size="1" />. * You can search on the NETBOOT_METHOD key-value to find BIOS or EFI systems. NETBOOT_METHOD=pxe is x86 BIOS, NETBOOT_METHOD=efigrub is x86 EFI. IBM x3250 m4 systems have EFI firmware, KVM guests have BIOS firmware. * x86 EFI is only supported on RHEL6+ and Fedora. Suggested test cases: * Check that Beaker recipes using custom partitioning run successfully on an x86 EFI system using RHEL6, RHEL7, and Fedora. Verify that /boot/efi partition is defined in the kickstart, and exists after installation. * Check that Beaker recipes using custom partitioning still run successfully on x86 BIOS systems.
(In reply to Dan Callaghan from comment #10) > It could be because the NETBOOT_METHOD key is not defined in your Beaker > installation. > > The key was added in 2012, it is created automatically for new Beaker > installations, but existing installations would need to add it manually as a > non-numeric key type using Admin -> Key Types. Unfortunately we didn't have > proper release notes back then, so this step was never noted anywhere. After NETBOOT_METHOD key is added and re-running /distribution/inventory, NETBOOT_METHOD=efigrub is added to the EFI system. Thank you.
Beaker 0.17.1 has been released.