Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-mini-2024-07-18· OpenAIAi2 WildChat-4.8M (AI2)

Why every single system service (script) think that there is kernel 6.8, while it…

  1. User

    Why every single system service (script) think that there is kernel 6.8, while it actually 6.12??? And, of course, it couldn't find any modules... How to fix this?

    root@mint:/# dracut --force dracut[F]: Cannot find module directory /lib/modules/6.8.0-51-generic/ dracut[F]: and --no-kernel was not specified root@mint:/# ls /lib/modules/6.8.0-51-generic/ ls: cannot access '/lib/modules/6.8.0-51-generic/': No such file or directory root@mint:/# ls /lib/modules/ 6.11.3-200.fc40.x86_64 6.12.11-100.fc40.x86_64 root@mint:/#

  2. Assistant

    It seems like your system is misconfigured regarding the kernel version, and various scripts are looking for modules in a directory that doesn't exist. The message indicates that something is still referencing an older kernel version (6.8.0-51-generic) that's not currently installed on your system.

    Here are some steps you can take to troubleshoot and fix this issue:

    1. Update GRUB Configuration:

      • Ensure the grub configuration is pointing to the correct kernel version. Update GRUB by running:
        sudo update-grub
        
      • Check your GRUB configuration file (usually located at /boot/grub/grub.cfg) to ensure it lists the correct kernel version.
    2. Check Installed Kernels:

      • List the installed kernels:
        dpkg --list | grep linux-image
        
      • If you see some old kernel versions listed (like 6.8.0-51-generic), you may consider removing them to avoid confusion.
      • You can remove the old kernel using:
        sudo apt remove linux-image-6.8.0-51-generic
        
      • Confirm if the kernel is listed correctly again by checking the output of the above command.
    3. Rebuild Initramfs:

      • If the kernel version is correctly set and you still encounter problems, you may need to rebuild the initramfs for the current kernel:
        sudo update-initramfs -u -k all
        
    4. Check System Configuration:

      • Verify whether configuration files (like /etc/lsb-release or /etc/os-release) were modified and could be causing issues with the version number.
    5. Regenerate Dracut Config (If using Dracut):

      • If you are using dracut, you may need to regenerate a new initramfs:
        dracut --force
        
    6. Review /lib/modules Directory:

      • Make sure that your /lib/modules directory is populated with the correct versions. If the correct modules for your current kernel (6.12.11-100.fc40.x86_64) are not present, you may have to reinstall the kernels.
    7. Reinstall the Current Kernel:

      • In case the kernel modules are not present, reinstalling the current kernel might help. For example, for a Debian or Ubuntu-based system:
        sudo apt install --reinstall linux-image-6.12.11-100.fc40.x86_64
        
    8. Reboot:

      • Finally, reboot your system, and check if the issue is resolved and the correct kernel modules are being used:
        uname -r
        

    If, after following these steps, the problem persists, additional troubleshooting or investigation into logs might be necessary to find other underlying causes.

  3. User

    I am using fedora, not debian

  4. Assistant

    Thank you for the clarification. Here’s how to troubleshoot and fix the kernel module issue on Fedora:

    Steps to Resolve Kernel Module Issues on Fedora:

    1. Check Installed Kernels:

      • First, check which kernels are currently installed:
        rpm -q kernel
        
    2. Verify the Current Running Kernel:

      • Use the following command to see the kernel you are currently running:
        uname -r
        
    3. Remove Old Kernels:

      • If you see older kernels (like 6.8.0-51-generic), you may want to clean them up. You can remove older kernels using the following command:
        sudo dnf remove kernel-<old_version>
        
      • Replace <old_version> with the version you want to remove (e.g., kernel-6.8.0-51-generic).
    4. Regenerate Initramfs:

      • You might need to regenerate the initramfs for the current kernel:
        sudo dracut --force
        
    5. Install Kernel Development Packages:

      • Ensure that you have the necessary kernel development packages installed for the currently running kernel:
        sudo dnf install kernel-devel kernel-headers
        
    6. Update GRUB:

      • Update the bootloader to properly configure it with the existing kernels:
        sudo grub2-mkconfig -o /boot/grub2/grub.cfg
        
    7. Reboot:

      • After making these changes, reboot your system:
        sudo reboot
        
    8. Check Module Directory Again:

      • After rebooting, verify whether the module directory structure is correctly set:
        ls /lib/modules/
        
      • Confirm that there is a directory matching your currently running kernel version.
    9. If the Problem Persists:

      • If you’re still encountering issues, you might consider reinstalling the current kernel:
        sudo dnf reinstall kernel-core kernel-modules
        
    10. Check Logs:

      • Review system logs for any errors related to kernel loading or modules:
        journalctl -xe
        

    Following these steps should help resolve the issues related to kernel modules on Fedora. If the problem persists after trying all of the above, it might be worth checking Fedora forums or specific documentation for any related bugs or system configurations that could be affecting your setup.