Bug 829068 - grub.cfg not updated on kernel installation
grub.cfg not updated on kernel installation
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: grubby (Show other bugs)
17
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-05 17:32 EDT by Martin Naď
Modified: 2012-12-16 10:13 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-16 10:13:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
grub.cfg (6.21 KB, text/plain)
2012-06-05 17:39 EDT, Martin Naď
no flags Details

  None (edit)
Description Martin Naď 2012-06-05 17:32:15 EDT
Description of problem:
grubby fatal error: unable to find a suitable template
When try update kernel with yum I get some error message 

[root@localhost Dokumenty]# yum update kernel-3.4.1-1.fc17.x86_64.rpm 
Zavedené moduly: langpacks, presto, refresh-packagekit
Zkoumání kernel-3.4.1-1.fc17.x86_64.rpm: kernel-3.4.1-1.fc17.x86_64
Označení kernel-3.4.1-1.fc17.x86_64.rpm jako aktualizace kernel-3.3.7-1.fc17.x86_64
Označení kernel-3.4.1-1.fc17.x86_64.rpm jako aktualizace kernel-3.4.0-1.fc17.x86_64
Řešení závislostí...
--> Kontrola transakce spuštěna
---> Balíček kernel.x86_64 0:3.4.1-1.fc17 bude instalován
--> Řešení závislostí dokončeno

Závislosti vyřešeny.

=============================================================================================================================================================
 Package                       Arch                          Verze                                  Repozitář                                           Vel.
=============================================================================================================================================================
Instalování:
 kernel                        x86_64                        3.4.1-1.fc17                           /kernel-3.4.1-1.fc17.x86_64                        114 M

Shrnutí transakce
=============================================================================================================================================================
Instalovat  1 Package

Celková velikost: 114 M
Nainstalovaná velikost: 114 M
V pořádku [a/N]: a
Stahování balíčků:
Spuštěna kontrola transakce
Spuštěn test transakce
Test transakce v pořádku
Transakce spuštěna
  Instalování: kernel-3.4.1-1.fc17.x86_64                                                                                                                1/1 
grubby fatal error: unable to find a suitable template
  Verifying  : kernel-3.4.1-1.fc17.x86_64                                                                                                                1/1 

Nainstalováno:
  kernel.x86_64 0:3.4.1-1.fc17                                                                                                                               

Hotovo!

Version-Release number of selected component (if applicable):
grubby-8.12-1.fc17.x86_64
grub2-2.0-0.25.beta4.fc17.x86_64

How reproducible:
sometimes

Steps to Reproduce:
1.try update kernel with yum
2.grubby paste error
3.no change in grub.cfg
  
Actual results:
grub.cfg not automatic update after kernel updated

Expected results:
Fedora correctly update grub.cfg

Additional info:
Comment 1 Martin Naď 2012-06-05 17:34:58 EDT
system ugrade with preupgrade from f16 and I have some manual change in grub.cfg
Comment 2 Martin Naď 2012-06-05 17:39:58 EDT
Created attachment 589650 [details]
grub.cfg
Comment 3 Mads Kiilerich 2012-06-05 18:03:03 EDT
What is the output of 
  ls -ld /etc/grub*
  head /etc/grub*
  ls -l /boot/
Comment 4 Martin Naď 2012-06-06 11:40:34 EDT
[root@localhost ~]# ls -ld /etc/grub*
drwx------. 2 root root 4096 31. kvě 22.30 /etc/grub.d
lrwxrwxrwx. 1 root root   22 31. kvě 22.26 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
-rw-------. 1 root root 6384  6. čen 00.21 /etc/grub2.cfg~

[root@localhost ~]# head /etc/grub2.*
==> /etc/grub2.cfg <==
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env

==> /etc/grub2.cfg~ <==
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env

[root@localhost ~]# ls -l /boot/
celkem 57192
-rw-r--r--. 1 root root   115168 22. kvě 00.38 config-3.3.7-1.fc17.x86_64
-rw-r--r--. 1 root root   116633  3. čen 08.52 config-3.4.0-1.fc17.x86_64
-rw-r--r--. 1 root root   116633  4. čen 22.23 config-3.4.1-1.fc17.x86_64                                                                                    
drwxr-xr-x. 2 root root     4096 31. kvě 22.19 grub                                                                                                          
drwxr-xr-x. 6 root root     4096  5. čen 23.15 grub2                                                                                                         
-rw-r--r--. 1 root root  4668955 31. kvě 21.50 initramfs-3.3.7-1.fc17.x86_64.img                                                                             
-rw-r--r--. 1 root root 16058773  5. čen 23.11 initramfs-3.4.0-1.fc17.x86_64.img                                                                             
-rw-r--r--. 1 root root 16058446  5. čen 23.15 initramfs-3.4.1-1.fc17.x86_64.img                                                                             
drwx------. 2 root root    16384 31. kvě 22.02 lost+found                                                                                                    
-rw-------. 1 root root  2412800 22. kvě 00.38 System.map-3.3.7-1.fc17.x86_64                                                                                
-rw-------. 1 root root  2440351  3. čen 08.52 System.map-3.4.0-1.fc17.x86_64                                                                                
-rw-------. 1 root root  2440289  4. čen 22.23 System.map-3.4.1-1.fc17.x86_64                                                                                
-rwxr-xr-x. 1 root root  4664016 22. kvě 00.38 vmlinuz-3.3.7-1.fc17.x86_64                                                                                   
-rwxr-xr-x. 1 root root  4710864  3. čen 08.52 vmlinuz-3.4.0-1.fc17.x86_64                                                                                   
-rwxr-xr-x. 1 root root  4710736  4. čen 22.23 vmlinuz-3.4.1-1.fc17.x86_64
Comment 5 Mads Kiilerich 2012-06-06 18:34:35 EDT
What do you get from
/sbin/new-kernel-pkg --package kernel-PAE --install 3.4.0-1.fc17.x86_64 -v
Comment 6 Martin Naď 2012-06-07 11:18:26 EDT
[root@localhost ~]# /sbin/new-kernel-pkg --package kernel-PAE --install 3.4.0-1.fc17.x86_64 -v
initrdfile is /boot/initrd-3.4.0-1.fc17.x86_64.img
/etc/grub.conf does not exist, not running grubby for grub 0.97
adding 3.4.0-1.fc17.x86_64 to /boot/grub2/grub.cfg
/etc/grub2-efi.cfg does not exist, not running grubby for grub 2 with UEFI
/etc/lilo.conf does not exist, not running grubby
/etc/extlinux.conf does not exist, not running grubby for extlinux

[root@localhost ~]# /sbin/new-kernel-pkg --package kernel --install 3.4.0-1.fc17.x86_64 -v
initrdfile is /boot/initrd-3.4.0-1.fc17.x86_64.img
making it the default based on config
/etc/grub.conf does not exist, not running grubby for grub 0.97
adding 3.4.0-1.fc17.x86_64 to /boot/grub2/grub.cfg
/etc/grub2-efi.cfg does not exist, not running grubby for grub 2 with UEFI
/etc/lilo.conf does not exist, not running grubby
/etc/extlinux.conf does not exist, not running grubby for extlinux
Comment 7 Mads Kiilerich 2012-06-07 17:54:41 EDT
Right; the -PAE was a cut'n'paste error.

That new-kernel-pkg command must be the one that caused the 'fatal' error and failed to update grub.cfg when the kernel was installed. Now it says it succeeded. Did it? Do you have a (partial and probably not yet fully working) entry in grub.cfg?

Can you try to reproduce the problem.
  rpm -e kernel-3.4.1-1.fc17.x86_64
- and verify that it removed the grub.cfg entry
  LANG=C yum update
- and verify that it installs the kernel again and see if that reproduce the problem.
Comment 8 Martin Naď 2012-12-16 10:13:07 EST
Hi,
Sorry for long delay,
Now I cant reproduce, works ok.

Note You need to log in before you can comment on or make changes to this bug.