Bug 789696

Summary: grub2-mkconfig fails on initrdless system
Product: [Fedora] Fedora Reporter: cam <camilo>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dennis, mads, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-17 19:16:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description cam 2012-02-12 12:05:08 UTC
Description of problem:
I am running initrdless and grub2 is not quite managing to function when new kernels are available through yum. The failure to install is silent from the point of view of the yum user.

Version-Release number of selected component (if applicable):
grub2-1.99-13.fc16.i686

How reproducible:
100%

Steps to Reproduce:
1. use an initrdless setup (can't remember where I copied it from but it was along the lines of adding rootfstype=ext4 plymouth.disable=0 to the boot command line and removing the initrd files and config from grub)
2. install a new kernel from yum update
3. grub2 config is not updated
  
Actual results:
Old kernels remain in the grub menu

Expected results:
grub menu should reflect installed kernels

Additional info:
Running manually I can see that /dev/root is missing 


[root@bishop ~]# grub2-mkconfig > /etc/grub2.cfg 
/sbin/grub2-probe: error: cannot stat `/dev/root'.

-> so I manually create a /dev/root link:

[root@bishop ~]# ln -s /dev/sda3 /dev/root

-> I also remove the initrd:

[root@bishop ~]# rm /boot/initramfs-3.2.5-3.fc16.i686.img
rm: remove regular file `/boot/initramfs-3.2.5-3.fc16.i686.img'? y

-> remake grub config:

[root@bishop ~]# grub2-mkconfig > /etc/grub2.cfg 
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.5-3.fc16.i686
Found linux image: /boot/vmlinuz-3.2.3-2.fc16.i686
Found linux image: /boot/vmlinuz-3.2.2-1.fc16.i686
  No volume groups found
done

-> install succeeds now:

[root@bishop ~]# grub2-install /dev/sda
Installation finished. No error reported.

So currently I have to install manually or find what passes for rc.local under systemd?

Comment 1 Mads Kiilerich 2012-04-17 19:16:21 UTC

*** This bug has been marked as a duplicate of bug 737370 ***