Description of the problem: ks_meta "grubport=" is expected to be translated into "--port=" option of grub. However, it does not happen on UEFI-based systems. "grubport=" is used for systems where "--port=" grub option is necessary for reliable specification of serial port. Version-Release number of selected component (if applicable): beaker-0.16.1-1.el6eng.noarch How reproducible: Always on UEFI-based system Steps to Reproduce: 1. Add "grubport=0x2f8" for systems's "Kickstart Metadata" 2. Provision the system 3. Check grub configuration Actual behavior: grub config file (*) does not contain "--port=0x2f8" option (*) config file path - /boot/efi/EFI/redhat/grub.conf (grub1, e.g. RHEL6) - /boot/efi/EFI/redhat/grub.cfg (grub2, e.g. RHEL7) Expected behavior: grub config file should contain "--port=0x2f8" option Additional Information: rhts_post snippet handles "grubport=". The snippet tries to apply the "--port=" change to appropriate grub config file. However, it misses the fact that the config file location is different on legacy BIOS system and UEFI system. The problem can be fixed by the following patch. Tested on RHEL6.5 and RHEL7.0, for both legacy BIOS system and UEFI system. --- a/rhts_post 2014-03-26 00:16:45.000000000 -0400 +++ b/rhts_post 2014-06-11 21:04:08.000000000 -0400 @@ -70,11 +70,21 @@ fi {# #/bin/sed -i 's/^serial.*/serial --port={{ grubport }} --speed=115200/' /boot/grub/grub.conf #} -if [ -e "/boot/grub/grub.conf" ]; then - /bin/sed -i 's/^\(serial.*\)--unit=\S\+\(.*\)$/\1--port={{ grubport }}\2/' /boot/grub/grub.conf +if [ -e "/boot/grub/grub.conf" -o -e "/boot/efi/EFI/redhat/grub.conf" ]; then + if [ -d "/sys/firmware/efi" ]; then + GRUBCONF="/boot/efi/EFI/redhat/grub.conf" + else + GRUBCONF="/boot/grub/grub.conf" + fi + /bin/sed -i 's/^\(serial.*\)--unit=\S\+\(.*\)$/\1--port={{ grubport }}\2/' $GRUBCONF elif [ -e "/etc/default/grub" ]; then + if [ -d "/sys/firmware/efi" ]; then + GRUBCONF="/boot/efi/EFI/redhat/grub.cfg" + else + GRUBCONF="/boot/grub2/grub.cfg" + fi /bin/sed -i '/^GRUB_SERIAL_COMMAND="serial/ {s/--unit=[0-9]\+//; s/"$/ --port={{ grubport }}"/}' /etc/default/grub - /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg + /sbin/grub2-mkconfig -o $GRUBCONF fi {% endif %}
Thanks for the patch, Jun'ichi! I used a slightly different, more brute force approach here (sed every GRUB config we can find). Also split into a new snippet for convenience, and added some docs. http://gerrit.beaker-project.org/3238
This bug fix was applied to the release-0.17 branch, but we are not doing any more maintenance releases of the 0.17.x series. So this bug is fixed in Beaker 0.18.0.