Bug 829068 - grub.cfg not updated on kernel installation
Summary: grub.cfg not updated on kernel installation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 17
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-05 21:32 UTC by Martin Naď
Modified: 2012-12-16 15:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-16 15:13:07 UTC
Type: Bug
Embargoed:


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

Description Martin Naď 2012-06-05 21:32:15 UTC
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 21:34:58 UTC
system ugrade with preupgrade from f16 and I have some manual change in grub.cfg

Comment 2 Martin Naď 2012-06-05 21:39:58 UTC
Created attachment 589650 [details]
grub.cfg

Comment 3 Mads Kiilerich 2012-06-05 22:03:03 UTC
What is the output of 
  ls -ld /etc/grub*
  head /etc/grub*
  ls -l /boot/

Comment 4 Martin Naď 2012-06-06 15:40:34 UTC
[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 22:34:35 UTC
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 15:18:26 UTC
[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 21:54:41 UTC
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 15:13:07 UTC
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.