Bug 1271368 - kernel-install fails to add entry to grub.cfg
kernel-install fails to add entry to grub.cfg
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: grubby (Show other bugs)
22
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-13 14:45 EDT by sean darcy
Modified: 2016-07-19 14:12 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 14:12:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sean darcy 2015-10-13 14:45:07 EDT
Description of problem:

installing (and reinstallng)kernel-core-4.1.10-200.fc22.x86_64.rpm doesn't and the new entry to grub.cfg 

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

systemd-219-24

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
No entry for new kernel

Expected results:


Additional info:

I ran the kernel-install script by itself:
# /bin/kernel-install add 4.1.10-200.fc22.x86_64 /boot/vmlinuz-4.1.10-200.fc22.x86_64

no error, but no entry in grub.cfg.

The kernel files are in /boot:

ls /boot/*200*
/boot/config-4.1.10-200.fc22.x86_64
/boot/initramfs-4.1.10-200.fc22.x86_64.img
/boot/System.map-4.1.10-200.fc22.x86_64
/boot/vmlinuz-4.1.10-200.fc22.x86_64
Comment 1 sean darcy 2015-10-16 16:46:43 EDT
On today's upgrade to kernel-4.2.3-200 , same problem.

grep  -B 1 -A 5 kernel.x86_64\ 4.2.3-200.fc22  /var/log/dnf.log | grep -v DEBUG
--
Installed:
  kernel.x86_64 4.2.3-200.fc22                                                  
  kernel-core.x86_64 4.2.3-200.fc22                                             
  kernel-devel.x86_64 4.2.3-200.fc22                                            
  kernel-modules.x86_64 4.2.3-200.fc22                                          
  kernel-modules-extra.x86_64 4.2.3-200.fc22 

# grep 4.2.3  /boot/grub2/grub.cfg
# 

FWIW:

cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=1
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd.luks=0 LANG=en_US.UTF-8"
Comment 2 Jóhann B. Guðmundsson 2015-10-21 15:11:02 EDT
kernel-install does not support create/generating grub configuration files. 

It only supports creating a boot loader entry's in accordance with the boot loader specification which in turn should be usable by bootloaders that confirm with that specification.

Fedora carry's downstream hack [1] that just calls /sbin/new-kernel-pkg which in turn generates those grub entries so a) you dont have grubby package installed or b) grubby/new-kernel-pkg is not generating those boot entries

Re-assigning to correct component.

1. http://pkgs.fedoraproject.org/cgit/systemd.git/tree/kernel-install-grubby.patch
Comment 3 reescf 2016-01-11 14:18:57 EST
This didn't work in Fedora 21 and doesn't work in Fedora 23 either. It *does* work on a system I configured to use EFI booting, but it does not work on a system using BIOS booting. 

grubby seems to update a config file in /etc, but does not touch the config file in /boot/grub2, and does not seem to use information from /etc/default/grub or /etc/grub.d effectively. (So the config file it creates in /etc wouldn't boot the system even if it were accessible on first booting, which it isn't.)
Comment 4 reescf 2016-01-12 11:33:36 EST
As far as I can tell, on my system the problem is that

readlink -f /etc/grub2.cfg

returns /etc/grub2.cfg. It does not return /boot/grub2/grub.cfg. Hence, grubby is only ever going to update the former, which is useless. It never touches the latter.
Comment 5 Fedora End Of Life 2016-07-19 14:12:48 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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
bug.

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

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