Bug 1271368 - kernel-install fails to add entry to grub.cfg
Summary: kernel-install fails to add entry to grub.cfg
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 18:45 UTC by sean darcy
Modified: 2016-07-19 18:12 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:12:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description sean darcy 2015-10-13 18:45:07 UTC
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 20:46:43 UTC
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 19:11:02 UTC
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 19:18:57 UTC
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 16:33:36 UTC
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 18:12:48 UTC
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.