Created attachment 1058666 [details] Add 'want_bios_boot_partition' ks_meta Description of problem: rhts_partitions needlessly creates a BIOS boot partition Version-Release number of selected component (if applicable): beaker-server-20.1-1.el6eng How reproducible: Always if the system meets following conditions - non-EFI - x86 - RHEL7 or Fedora - Custom partitioning is specified (e.g. 'partitions', 'ondisk') Steps to Reproduce: Provision non-EFI x86 system with custom partitioning and with RHEL7 Expected results: BIOS boot partition should not be created if the system doesn't boot from >2TB disk or user requests to do so Actual results: BIOS boot partition is created even if the system doesn't have >2TB disks Additional information: The change was introduced intentionally with this change: define biosboot partition in cases where it might be necessary Bug: 1108393 Change-Id: I463ab8978eaafcb25021e168b5bf46454ce0b9dd It seems 'has_gpt_bios_support' ks_meta was introduced to mean the operating system has BIOS boot partition support. {% if partitions or ondisk or rootfstype or fstype or swapsize %} ... {% elif distro_tree is arch('i386', 'x86_64') %} {% if system and system.has_efi %} ... {% else %} {# x86 BIOS #} {% if has_gpt_bios_support is defined %} {# biosboot partition is needed in case Anaconda uses GPT (when the disk is >2TB) #} part biosboot --size 1 --fstype biosboot As a provisioning tool for test system, it is undesirable to create the partition which is not requested and which will not be created in customer's actual installation scenario. By beaker 'kindly' adding the partition, we might unable to find possible bugs in installer or boot loader in testing, for example. Given that the number of systems that require BIOS boot partition should be limited (newer systems have EFI, older systems boot from small disk), how about making it opt-in behaviour by introducing new ks_meta such as 'want_bios_boot_partition'? (A patch is attached) If admins want to control the behaviour per system, they can give it in "Installation Options" of systems. If admins want to force the behaviour for all systems, they can give it in beaker.ks_meta of /etc/beaker/server.cfg.
Ideally we would just let Anaconda decide what partitions are needed for booting and have it create those. We will be able to do that using the new reqpart command in RHEL7.2+, that's bug 1230997.
As a workaround, if your lab has no systems with >2TB disks and BIOS-compatible firmware then you can edit the install options for RedHatEnterpriseLinux7 family and set "!has_gpt_bios_support" in ksmeta. This is essentially lying to Beaker by telling it that RHEL7 does not support GPT on BIOS-compatible firmware, but it will have the desired effect.
Jun'ichi, do you think the workaround in comment 2, plus the proper solution of "reqpart" in bug 1230997, is satisfactory? Could I close this bug?
Could I apply "!has_gpt_bios_support" workaround for all systems/distros in the lab by adding it in /etc/beaker/server.cfg?
Hmmm, unfortunately that won't work. The "has_gpt_bios_support" variable is filled in by default at the distro family level. So the workaround needs to be set either on the distro family, individual distro trees, or individual systems, so that it overrides the default.
Ok. Then I think we'll somehow workaround the issue and I'm fine if you close this bug. Just a comment. Basically I want beaker provisions the system by default with normal and basic configuration and provides some opt-in options for particular systems/distros/users/recipes to select specific configuration. I hope "reqpart" solution works in that way.
Yes, by using the "reqpart" command, the end result should be the same as today. Except the superfluous biosboot partition will not be created, because Anaconda is smart enough to decide at installation time whether it is needed. So using "reqpart" is really taking it closer to being a default configuration with fewer customisations.