Bug 2173984 - depmod: WARNING: could not open modules.order at /lib/modules/6.2.0-63.fc38.x86_64
Summary: depmod: WARNING: could not open modules.order at /lib/modules/6.2.0-63.fc38.x...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-28 15:10 UTC by Ralf Corsepius
Modified: 2023-08-13 05:01 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ralf Corsepius 2023-02-28 15:10:48 UTC
1. Please describe the problem:

# dnf reinstall 'kernel-core*'
Last metadata expiration check: 0:02:11 ago on Tue 28 Feb 2023 03:52:35 PM CET.
Dependencies resolved.
==================================================================================================================================================================
 Package                                 Architecture                       Version                                      Repository                          Size
==================================================================================================================================================================
Reinstalling:
 kernel-core                             x86_64                             6.2.0-63.fc38                                fedora                              16 M

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

Total download size: 16 M
Installed size: 64 M
Is this ok [y/N]: y
Downloading Packages:
kernel-core-6.2.0-63.fc38.x86_64.rpm                                                                                               12 MB/s |  16 MB     00:01    
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                             8.1 MB/s |  16 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                          1/1 
  Reinstalling     : kernel-core-6.2.0-63.fc38.x86_64                                                                                                         1/2 
  Running scriptlet: kernel-core-6.2.0-63.fc38.x86_64                                                                                                         1/2 
  Running scriptlet: kernel-core-6.2.0-63.fc38.x86_64                                                                                                         2/2 
  Cleanup          : kernel-core-6.2.0-63.fc38.x86_64                                                                                                         2/2 
  Running scriptlet: kernel-core-6.2.0-63.fc38.x86_64                                                                                                         2/2 
depmod: WARNING: could not open modules.order at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.order at /var/tmp/dracut.bYXLUO/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.bYXLUO/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /var/tmp/dracut.bYXLUO/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory

  Verifying        : kernel-core-6.2.0-63.fc38.x86_64                                                                                                         1/2 
  Verifying        : kernel-core-6.2.0-63.fc38.x86_64                                                                                                         2/2 

Reinstalled:
  kernel-core-6.2.0-63.fc38.x86_64                                                                                                                                

Complete!


2. What is the Version-Release number of the kernel:
kernel-6.2.0-63.fc38.x86_64 

Additional info:
The files being complained above exist in older kernels but do not exist in 6.2.0-63.

I don't know if it's related to this issue, but kernel-6.2.0-63.fc38.x86_64 fails to boot for me.

Comment 1 Justin M. Forbes 2023-02-28 15:37:10 UTC
This might make sense as installing kernel-core does not install a single module. you also need kernel-modules-core most likely.

Comment 2 Ralf Corsepius 2023-02-28 15:52:43 UTC
Same warnings with kernel-modules-core.

Comment 3 Ralf Corsepius 2023-02-28 15:55:19 UTC
# dnf reinstall kernel*6.2.0-63.fc38.x86_64
...
  Running scriptlet: kernel-modules-core-6.2.0-63.fc38.x86_64                                                                                                 8/8 
depmod: WARNING: could not open modules.order at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory

  Running scriptlet: kernel-core-6.2.0-63.fc38.x86_64                                                                                                         8/8 
depmod: WARNING: could not open modules.order at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.order at /var/tmp/dracut.4w4vkF/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.4w4vkF/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /var/tmp/dracut.4w4vkF/initramfs/lib/modules/6.2.0-63.fc38.x86_64: No such file or directory
...

Comment 4 Vladislav Grigoryev 2023-03-29 12:39:46 UTC
I confirm the issue.
Reinstalling the `kernel-modules-core` package removes a number of files and fails to re-create them.
The following attempts to reinstall the package do not resolve the issue.
A manual action is required to restore the missing files.
The issue is 100% reproducible on Fedora 37 with the latest kernel.

Involved components:
kernel-modules-core-6.2.8-200.fc37.x86_64

Steps to reproduce:
sudo dnf -y reinstall kernel-modules-core

Actual results:
...
depmod: WARNING: could not open modules.order at /lib/modules/6.2.8-200.fc37.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.2.8-200.fc37.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.2.8-200.fc37.x86_64: No such file or directory
...

Workaround to restore the missing files:
sudo dnf download kernel-modules-core
sudo rpm --force -i kernel-modules-core-*.rpm

Comment 5 yuk 2023-06-26 09:19:38 UTC
The same on RHEL 9.2

Comment 6 Cristian Ciupitu 2023-07-12 20:22:52 UTC
I'm getting something similar:

# dnf -y erase kernel-core-6.3.11-200.fc38.x86_64
Dependencies resolved.
=======================================================================================
 Package                      Architecture  Version           Repository          Size
=======================================================================================
Removing:
 kernel-core                  x86_64        6.3.11-200.fc38   @updates-testing    65 M
Removing dependent packages:
 kernel                       x86_64        6.3.11-200.fc38   @updates-testing     0  
 kernel-modules               x86_64        6.3.11-200.fc38   @updates-testing    54 M
 kernel-modules-core          x86_64        6.3.11-200.fc38   @updates-testing    29 M
 kernel-modules-extra         x86_64        6.3.11-200.fc38   @updates-testing   2.4 M

Transaction Summary
=======================================================================================
Remove  5 Packages

Freed space: 150 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                  1/1 
  Erasing          : kernel-modules-extra-6.3.11-200.fc38.x86_64      1/5 
  Running scriptlet: kernel-modules-extra-6.3.11-200.fc38.x86_64      1/5 
  Erasing          : kernel-6.3.11-200.fc38.x86_64                    2/5 
  Running scriptlet: kernel-6.3.11-200.fc38.x86_64                    2/5 
  Erasing          : kernel-modules-6.3.11-200.fc38.x86_64            3/5 
  Running scriptlet: kernel-modules-6.3.11-200.fc38.x86_64            3/5 
  Erasing          : kernel-modules-core-6.3.11-200.fc38.x86_64       4/5 
  Running scriptlet: kernel-modules-core-6.3.11-200.fc38.x86_64       4/5 
  Running scriptlet: kernel-core-6.3.11-200.fc38.x86_64               5/5 
  Erasing          : kernel-core-6.3.11-200.fc38.x86_64               5/5 
warning: file modules.builtin.modinfo: remove failed: No such file or
warning: file modules.builtin: remove failed: No such file or directo

  Running scriptlet: kernel-core-6.3.11-200.fc38.x86_64               5/5 
  Verifying        : kernel-6.3.11-200.fc38.x86_64                    1/5 
  Verifying        : kernel-core-6.3.11-200.fc38.x86_64               2/5 
  Verifying        : kernel-modules-6.3.11-200.fc38.x86_64            3/5 
  Verifying        : kernel-modules-core-6.3.11-200.fc38.x86_64       4/5 
  Verifying        : kernel-modules-extra-6.3.11-200.fc38.x86_64      5/5 

Removed:
  kernel-6.3.11-200.fc38.x86_64
  kernel-core-6.3.11-200.fc38.x86_64
  kernel-modules-6.3.11-200.fc38.x86_64
  kernel-modules-core-6.3.11-200.fc38.x86_64       
  kernel-modules-extra-6.3.11-200.fc38.x86_64       

Complete!

Comment 7 Vladislav Grigoryev 2023-08-13 05:01:37 UTC
It appears to be fixed here:
https://src.fedoraproject.org/rpms/kernel/c/05344083c3335a010ac0ca4bd9f3f222750cfa05
> * Wed Jul 19 2023 Justin M. Forbes <jforbes> [6.4.4-0]
> - move ownership of /lib/modules/<ver>/ to kernel-core (Thorsten Leemhuis)
> - Let kernel-modules-core own the files depmod generates. (Thorsten Leemhuis)


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