Bug 668063

Summary: Grubby does not handle "template" that uses module keywork properly
Product: [Fedora] Fedora Reporter: W. Michael Petullo <mike>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 19CC: awilliam, bcl, itamar, jim_burn, ketuzsezr, mads, pasik, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: RejectedBlocker
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 13:34:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description W. Michael Petullo 2011-01-07 19:39:29 UTC
Description of problem:
Grubby does not handle "template" that uses module keywork properly. If I have the following in /etc/grub.conf:

title Fedora (
        root (hd0,0)
        kernel /xen.gz dom0_max_vcpus=1
        module /vmlinuz- ro root=/dev/mapper/vg_imp-lv_root_64bit LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us 3
        module /initramfs-

then grubby will insert the following into grub.conf when I install a new kernel:

title Fedora (2.6.37-1.xendom0.fc15.x86_64)
        root (hd0,0)
        kernel /xen.gz dom0_max_vcpus=1
        module /vmlinuz-2.6.37-1.xendom0.fc15.x86_64 ro root=/dev/mapper/vg_imp-lv_root_64bit LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet 3

Note that the line "module /initramfs-2.6.37-1.xendom0.fc15.x86_64.img" is missing.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. Create a grub.conf that contains the first entry above
2. Install a new kernel RPM so that grubby updates grub.conf
Actual results:
The new grub.conf entry is missing a line like "module /initramfs-2.6.37-1.xendom0.fc15.x86_64.img."

Expected results:
Grubby should add the "module /initramfs-2.6.37-1.xendom0.fc15.x86_64.img" line

Additional info:
Blocks "http://fedoraproject.org/wiki/Features/XenPvopsDom0."

Comment 1 Adam Williamson 2011-04-15 18:58:22 UTC
Discussed at 2011-04-15 blocker review meeting. We note the feature in question
was dropped. Regardless, standing policy is that bugs which 'break' accepted
features do not automatically qualify as release blockers: such issues are to
be handled through the feature process (i.e. drop the feature in question), not
the release validation process. They only count as blockers if they meet the
blocker criteria, regardless of the feature process. This does not appear to
hit any release criteria.

Fedora Bugzappers volunteer triage team

Comment 2 W. Michael Petullo 2011-07-25 02:11:00 UTC
Moved bug to Rawhide; this is still an issue for the XenPvopsDom0 feature.

Comment 3 W. Michael Petullo 2011-07-25 03:01:06 UTC
For reference, the desired grub.conf may be produced by hand using something like:

grubby  --add-multiboot=/boot/xen.gz --add-kernel=/boot/vmlinuz-${KERNEL_VERSION} --args="ro root=/dev/mapper/vg_imp-lv_root_64bit LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us" --initrd=/boot/initramfs-${KERNEL_VERSION}.img --title="Fedora (${KERNEL_VERSION})"

Comment 4 Pasi Karkkainen 2011-08-10 12:07:18 UTC
Update: This issue needs a fix for F16.

Comment 5 Itamar Reis Peixoto 2011-08-16 18:58:07 UTC
any news about this ?

Comment 6 W. Michael Petullo 2011-09-15 14:58:00 UTC
A bug that is related with respect to getting grubby to work with Xen Dom0 kernels, #658387, has been fixed. However, this bug still seems to result in a missing "module /initramfs-..." line, as noted above. This is my understanding about what is happening:

The kernel RPM runs three times, first as a post-install script:

/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --install %{KVERREL}%{?-v:.%{-v*}}

and then as a post-transaction script:

/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --dracut --depmod --update %{KVERREL}%{?-v:.%{-v*}}
/sbin/new-kernel-pkg --package kernel%{?1:-%{1}} --rpmposttrans %{KVERREL}%{?1:.%{1}}

Because the initramfs has not been created before the first new-kernel-pkg run, new-kernel-pkg/grubby does not create a "module /initramfs-..." line at this point. /sbin/grubby --grub --add-kernel=/boot/vmlinuz- --copy-default --make-default --title Fedora ( --add-multiboot=/boot/xen.gz --args=root=/dev/mapper/vg_imp-lv_root_64bit  --remove-kernel=TITLE=Fedora (

Next, new-kernel-pkg/grubby creates the initramfs. /sbin/grubby --update-kernel=/boot/vmlinuz- --initrd /boot/initramfs- --args= SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us. But for some reason, grubby does not update grub.cfg.

Does grubby not recognize the correct grub.cfg record because of the use of the module syntax?

Comment 7 W. Michael Petullo 2011-09-16 15:21:44 UTC
I just tested Fedora 16 RC1. On that release, this bug is somewhat irrelevant. Fedora 16 uses GRUB 2. Bug #728775 has been fixed (grub2-1.99-6.fc16) and so Fedora 16 properly sets up GRUB 2 entries that boot the kernel in Dom0.

Comment 8 Mads Kiilerich 2011-11-25 16:07:25 UTC
grub legacy is still used on EFI machines which more and more big machines are using.

Comment 9 Adam Williamson 2011-11-29 02:11:36 UTC
right, we do need serious grub-legacy bugs fixed in F16 still.

Fedora Bugzappers volunteer triage team

Comment 10 jim burns 2012-01-04 23:03:09 UTC
On the comment that 'Fedora 16 uses GRUB 2', I believe this is only true for NEW installs. When I upgraded from f15 to f16, anaconda installed the grub2 packages, but did not switchover the boot loader, even tho' I requested to reinstall the boot loader.

Thus, I believe that users who upgrade are still using legacy grub, as I am, and legacy grub still needs to be bug maintained.

Comment 11 Adam Williamson 2012-01-04 23:24:46 UTC
No, upgrading via anaconda usually switches to grub2. If it didn't for you, then the installer failed somehow.

Fedora Bugzappers volunteer triage team

Comment 12 Fedora End Of Life 2013-04-03 18:55:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 13 Fedora End Of Life 2015-01-09 16:30:27 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2015-02-17 13:34:02 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.