Description of problem: Kernel updates do not update initrd.img symlink. The initrd-desktop.img is updated but not initrd.img After last update: lrwxrwxrwx 1 root root 32 Apr 16 00:03 initrd-desktop.img -> initrd-3.19.4-desktop-1.mga5.img lrwxrwxrwx 1 root root 32 Mar 27 22:00 initrd.img -> initrd-3.19.2-desktop-2.mga5.img -rw------- 1 root root 10013913 Jul 25 2013 initrd-sd.img When booting from another system's grub2 the initrd.img is used and an old kernel is run. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Reproducible: Steps to Reproduce:
Priority: Normal => release_blocker
So are you saying this only happens when using GRUB2? I can confirm that I haven't reproduced this issue on any systems running GRUB.
I have no real h/w systems using legacy, but I would not have related this to the bootloader, as in PC_BIOS machines grub is still installed by default irrespective of whether it is used. This is on a PC-BIOS machine. I have a second real test system that's not updated yet I will try to confirm on that one and in VMs time permitting. I also noticed this had happened in https://bugs.mageia.org/show_bug.cgi?id=15532
In my up-to-date cauldron system I just ran: dracut -f and it updated ONLY initrd-desktop.img lrwxrwxrwx 1 root root 32 Apr 16 00:03 /boot/initrd-desktop.img -> initrd-3.19.4-desktop-1.mga5.img lrwxrwxrwx 1 root root 32 Mar 27 22:00 /boot/initrd.img -> initrd-3.19.2-desktop-2.mga5.img
Blocks: (none) => 15532
Blocks: 15532 => (none)Source RPM: (none) => dracut
I have just updated another system (using grub2 on btrfs) and it seems that both initrd.img AND vmlinuz are updated incorrectly. Below is a diff of pre and post update, and whilst the *-desktop symlinks are updated correctly, initrd.img and vmlinuz are changed to more recent, but still old versions. --- ll_pre-update.txt 2015-04-16 11:51:35.280622442 +0100 +++ ll_post-update.txt 2015-04-16 12:09:52.077098688 +0100 @@ -1,34 +1,39 @@ -total 86692 +total 103556 -rw-r--r-- 1 root root 167785 Nov 4 00:32 config-3.17.2-desktop-3.mga5 -rw-r--r-- 1 root root 170054 Dec 15 21:46 config-3.18.1-desktop-1.mga5 -rw-r--r-- 1 root root 171245 Feb 26 20:31 config-3.19.0-desktop-4.mga5 -rw-r--r-- 1 root root 171245 Mar 14 22:29 config-3.19.1-desktop-2.mga5 -rw-r--r-- 1 root root 171245 Mar 18 21:02 config-3.19.2-desktop-1.mga5 -drwxr-xr-x 1 root root 0 Mar 23 23:31 dracut/ +-rw-r--r-- 1 root root 171245 Apr 14 18:47 config-3.19.4-desktop-1.mga5 +drwxr-xr-x 1 root root 0 Apr 6 21:30 dracut/ -rwxr-xr-x 1 root root 562176 Mar 18 15:38 gfxmenu* drwxr-xr-x 1 root root 32 Nov 5 21:52 grub/ -drwxr-xr-x 1 root root 124 Mar 24 14:51 grub2/ +drwxr-xr-x 1 root root 124 Apr 16 12:04 grub2/ -rw------- 1 root root 10962595 Nov 5 21:56 initrd-3.17.2-desktop-3.mga5.img -rw------- 1 root root 9443194 Dec 20 12:18 initrd-3.18.1-desktop-1.mga5.img -rw------- 1 root root 9515123 Feb 27 12:58 initrd-3.19.0-desktop-4.mga5.img -rw------- 1 root root 9283991 Mar 18 15:42 initrd-3.19.1-desktop-2.mga5.img -rw------- 1 root root 9284092 Mar 24 14:50 initrd-3.19.2-desktop-1.mga5.img -lrwxrwxrwx 1 root root 32 Mar 24 14:50 initrd-desktop.img -> initrd-3.19.2-desktop-1.mga5.img -lrwxrwxrwx 1 root root 32 Nov 5 21:56 initrd.img -> initrd-3.17.2-desktop-3.mga5.img +-rw------- 1 root root 9284602 Apr 16 12:05 initrd-3.19.4-desktop-1.mga5.img +lrwxrwxrwx 1 root root 32 Apr 16 12:05 initrd-desktop.img -> initrd-3.19.4-desktop-1.mga5.img +lrwxrwxrwx 1 root root 32 Apr 16 11:54 initrd.img -> initrd-3.19.2-desktop-1.mga5.img -rw-r--r-- 1 root root 241192 Nov 4 00:32 symvers-3.17.2-desktop-3.mga5.xz -rw-r--r-- 1 root root 242344 Dec 15 21:47 symvers-3.18.1-desktop-1.mga5.xz -rw-r--r-- 1 root root 245356 Feb 26 20:31 symvers-3.19.0-desktop-4.mga5.xz -rw-r--r-- 1 root root 245512 Mar 14 22:29 symvers-3.19.1-desktop-2.mga5.xz -rw-r--r-- 1 root root 245512 Mar 18 21:02 symvers-3.19.2-desktop-1.mga5.xz +-rw-r--r-- 1 root root 245460 Apr 14 18:47 symvers-3.19.4-desktop-1.mga5.xz -rw-r--r-- 1 root root 3165755 Nov 4 00:32 System.map-3.17.2-desktop-3.mga5 -rw-r--r-- 1 root root 3191226 Dec 15 21:46 System.map-3.18.1-desktop-1.mga5 -rw-r--r-- 1 root root 3222831 Feb 26 20:31 System.map-3.19.0-desktop-4.mga5 -rw-r--r-- 1 root root 3222968 Mar 14 22:29 System.map-3.19.1-desktop-2.mga5 -rw-r--r-- 1 root root 3222998 Mar 18 21:02 System.map-3.19.2-desktop-1.mga5 -lrwxrwxrwx 1 root root 29 Nov 5 21:56 vmlinuz -> vmlinuz-3.17.2-desktop-3.mga5 +-rw-r--r-- 1 root root 3223361 Apr 14 18:47 System.map-3.19.4-desktop-1.mga5 +lrwxrwxrwx 1 root root 29 Apr 16 11:54 vmlinuz -> vmlinuz-3.19.2-desktop-1.mga5 -rw-r--r-- 1 root root 4254000 Nov 4 00:32 vmlinuz-3.17.2-desktop-3.mga5 -rw-r--r-- 1 root root 4288816 Dec 15 21:47 vmlinuz-3.18.1-desktop-1.mga5 -rw-r--r-- 1 root root 4342976 Feb 26 20:31 vmlinuz-3.19.0-desktop-4.mga5 -rw-r--r-- 1 root root 4340928 Mar 14 22:29 vmlinuz-3.19.1-desktop-2.mga5 -rw-r--r-- 1 root root 4340928 Mar 18 21:02 vmlinuz-3.19.2-desktop-1.mga5 -lrwxrwxrwx 1 root root 29 Mar 24 14:50 vmlinuz-desktop -> vmlinuz-3.19.2-desktop-1.mga5 +-rw-r--r-- 1 root root 4338688 Apr 14 18:47 vmlinuz-3.19.4-desktop-1.mga5 +lrwxrwxrwx 1 root root 29 Apr 16 12:05 vmlinuz-desktop -> vmlinuz-3.19.4-desktop-1.mga5
Summary: Kernel updates do not update initrd.img => Kernel updates do not update initrd.img and vmlinuz correctly (dracut)
Ooh that is weird. I didn't think it was dracut's job to update these symlinks though, I thought that was the job of /sbin/installkernel (called in %posttrans by the kernel packages themselves) from bootloader-utils.
CC: (none) => mageia, shlomif, thierry.vignaud, tmb
It _is_ /sbin/installkernel through drakxtools-backend that takes care for the vmlinuz an initrd.img symlinks kernel %post takes care of vmlinuz-$flavour and initrd-$flavour.img symlinks
Thanks Thomas - I'm learning something here - removed 'dracut' from subject. So, when there are no flavourless kernels, why do we have initrd.img and vmlinuz that point to old versions, and are even updated to old versions? I have seen grub2/os-prober on other systems creating links to vmlinuz and initrd.img in this situation (but not always) resulting in the old kernel being run.
Source RPM: dracut => (none)Summary: Kernel updates do not update initrd.img and vmlinuz correctly (dracut) => Kernel updates do not update initrd.img and vmlinuz
They are supposed to be a link to latest installed core kernel, but there seems to still be a bug/check in drakx making it bail out before it changes the links. iirc the logic is supposed to be: - drakx get called from kernel %post with info that new kernel is installed and we want initrd + symlink change - drakx creates initrd - if initrd succeeded, change the symlinks So for some reason either initrd creation fails, or we fail to detect it geets created... One way to fix this is if we cant figure it out in drakx is to move the symlink change to kernel %post
All symlinks were created correctly on update to 3.19.4-desktop-2.mga5 :) -rw------- 1 root root 9201410 Apr 19 00:12 initrd-3.19.4-desktop-2.mga5.img lrwxrwxrwx 1 root root 32 Apr 19 00:12 initrd-desktop.img -> initrd-3.19.4-desktop-2.mga5.img lrwxrwxrwx 1 root root 32 Apr 19 00:12 initrd.img -> initrd-3.19.4-desktop-2.mga5.img lrwxrwxrwx 1 root root 29 Apr 19 00:12 vmlinuz -> vmlinuz-3.19.4-desktop-2.mga5 -rw-r--r-- 1 root root 4343296 Apr 17 22:51 vmlinuz-3.19.4-desktop-2.mga5 lrwxrwxrwx 1 root root 29 Apr 19 00:12 vmlinuz-desktop -> vmlinuz-3.19.4-desktop-2.mga5 I will check other systems later.
You should also check what are you settings in there? cat /etc/sysconfig/installkernel
CC: (none) => dirteat
@Colin: not using the blkid cache does hurt when there's quite a lot of partitions http://gitweb.mageia.org/software/drakx/commit/perl-install?id=ecd8db27c8ffb76ebf799e0de0dcf64c3ce256fe
Oops, wrong bug
(In reply to Chris Denice from comment #10) > You should also check what are you settings in there? > > cat /etc/sysconfig/installkernel Is that still used? sbin/installkernel:# deprecated /etc/sysconfig/installkernel variables
I hope it is, I hate having new entries with new kernels :) So far the NOENTRY seems to be used mine -----> # -*- Mode: shell-script -*- # $Id: installkernel.sysconfig 30419 2004-06-29 04:50:42Z prigaux $ # Configuration option when installing a kernel and initrscript. # Set this to yes if you never want link from /boot/vmlinuz to the # kernel. NOLINK="" # Set this to yes if you don't want to add entry to your bootloader NOENTRY="yes" # If you want to pass options to the "make-initrd" helper script you # can do it here. INITRDOPTS=""
(In reply to Barry Jackson from comment #13) > (In reply to Chris Denice from comment #10) > > You should also check what are you settings in there? > > > > cat /etc/sysconfig/installkernel > > Is that still used? > > sbin/installkernel:# deprecated /etc/sysconfig/installkernel variables You underquoted: # /etc/sysconfig/installkernel variables NOLINK="" NOENTRY="" INITRDOPTS="" # deprecated /etc/sysconfig/installkernel variables NOLAUNCH="" It's only referring to the NOLAUNCH variable. I think we should probably try to move away from our installkernel scripts however, as systemd ships with some that are quite nice and modular and have dropins provided by dracut and other tools that can trigger initrd regeneration etc. But time is always the enemy.
Ah yes, thanks Colin (grep found that, out of context)
ok so we are in RC now. What solution can we choose given the fact that we need to close the release?
CC: (none) => ennael1
Guys ?
Fix was provided by tmb since 3.19.4-2. Please reopen this bug if needed
Status: NEW => RESOLVEDResolution: (none) => FIXED