Bug 26439

Summary: "dnf -y reinstall kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64" gives an unusable kernel installation
Product: Mageia Reporter: Shlomi Fish <shlomif>
Component: RPM PackagesAssignee: Neal Gompa <ngompa13>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: dnf-4.2.19-1.mga8.src.rpm CVE:
Status comment:

Description Shlomi Fish 2020-04-05 17:21:32 CEST
Description of problem:

On my mageia v8 x64 box:

```
[shlomif@telaviv1 ~]$ sudo dnf -y reinstall kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64
Last metadata expiration check: 0:18:37 ago on Sun 05 Apr 2020 16:07:15 IDT.
Dependencies resolved.
=================================================================================
 Package                         Arch      Version      Repository          Size
=================================================================================
Reinstalling:
 kernel-desktop-5.5.15-3.mga8    x86_64    1-1.mga8     cauldron-x86_64     62 M

Transaction Summary
=================================================================================

Total download size: 62 M
Installed size: 70 M
Downloading Packages:
kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64.rpm 8.4 MB/s |  62 MB     00:07
---------------------------------------------------------------------------------
Total                                            8.4 MB/s |  62 MB     00:07
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                         1/1
  Reinstalling     : kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64            1/2
  Cleanup          : kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64            2/2
  Running scriptlet: kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64            2/2
Cannot find a boot loader installed. Only taking care of initrd

ln: failed to create symbolic link '/lib/modules/5.5.15-desktop-3.mga8/build': No such file or directory
ln: failed to create symbolic link '/lib/modules/5.5.15-desktop-3.mga8/source': No such file or directory

virtualbox (6.1.4-1.mga8): Installing module.
  Kernel devel files for 5.5.15-desktop-3.mga8 not installed.  Cannot install this module.
Cannot find a boot loader installed. Only taking care of initrd
modprobe: FATAL: Module loop not found in directory /lib/modules/5.5.15-desktop-3.mga8
modprobe: FATAL: Module loop not found in directory /lib/modules/5.5.15-desktop-3.mga8
Creating: target|kernel|dracut args|basicmodules
mkinitrd failed:
(mkinitrd -f /boot/initrd-5.5.15-desktop-3.mga8.img 5.5.15-desktop-3.mga8)
Error: dracut: Cannot find module directory /lib/modules/5.5.15-desktop-3.mga8/
dracut: and --no-kernel was not specified

  Verifying        : kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64            1/2
  Verifying        : kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64            2/2

Reinstalled:
  kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64

Complete!
[shlomif@telaviv1 ~]$ rpm -ql kernel-desktop-5.5.15-3.mga8-1-1.mga8 | grep xfs | xargs ls
ls: cannot access '/lib/modules/5.5.15-desktop-3.mga8/kernel/fs/freevxfs': No such file or directory
ls: cannot access '/lib/modules/5.5.15-desktop-3.mga8/kernel/fs/freevxfs/freevxfs.ko.xz': No such file or directory
ls: cannot access '/lib/modules/5.5.15-desktop-3.mga8/kernel/fs/xfs': No such file or directory
ls: cannot access '/lib/modules/5.5.15-desktop-3.mga8/kernel/fs/xfs/xfs.ko.xz': No such file or directory
[shlomif@telaviv1 ~]$

```

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

Cauldron.

How reproducible:

Always

Steps to Reproduce:
1. sudo dnf -y reinstall kernel-desktop-5.5.15-3.mga8-1-1.mga8.x86_64
2.
3.
Comment 1 Shlomi Fish 2020-04-05 17:24:19 CEST
Note that it is a followup for this previous bug: https://bugs.mageia.org/show_bug.cgi?id=26427 . Also: "dnf remove" followed by "dnf install" seems to work fine.
Comment 2 Thomas Backlund 2020-04-05 18:11:16 CEST
Something wrong on that system...

Are you running out of disk space, or...

does it work with urpmi ?

CC: (none) => tmb

Comment 3 Thomas Backlund 2020-04-05 18:15:34 CEST
Ah, you are trying to reinstall the kernel on top of itself.
That wont work.

the kernel postun scripts forcefully removes anything that might have been left in kernel tree by some dkms modules or other stuff, in order to keep the system clean
Comment 4 Lewis Smith 2020-04-10 09:29:33 CEST
Can this bug be closed now?

CC: (none) => lewyssmith

Comment 5 Shlomi Fish 2020-04-10 10:33:37 CEST
(In reply to Lewis Smith from comment #4)
> Can this bug be closed now?

Well, there was a different scenario when I used "dnf upgrade --refresh" or similar which resulted in the same problem of an unbootable kernel. I wonder how can it be reproduced...
Comment 6 Lewis Smith 2020-04-11 20:25:10 CEST
Assigning to Neal for DNF; tmb is already CC'd.

CC: lewyssmith => (none)
Assignee: bugsquad => ngompa13

Comment 7 Neal Gompa 2020-04-13 21:56:00 CEST
This is not a DNF-specific issue. tmb has already pointed out why this doesn't work in comment 3.

If we want to fix this, that would require significant rework of kernel packaging.

Resolution: (none) => INVALID
Status: NEW => RESOLVED