Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-102591

Just upgraded system to RHEL10 crashes because initramfs was not generated

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • leapp-repository-0.23.0-1.el9
    • No
    • Low
    • rhel-upgrades
    • 26
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Unspecified Release Note Type - Unknown
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      When upgrading from RHEL8 to RHEL9, then RHEL9 to RHEL10, the upgrade to RHEL10 fails to reboot on the RHEL10 kernel once upgrade is complete because there is no initramfs being generated.
      Grub reports:

        Booting `Red Hat Enterprise Linux (6.12.0-55.20.1.el10_0.x86_64) 10.0
      (Coughlan)'
      
      error: ../../grub-core/fs/fshelp.c:257:file
      `/initramfs-6.12.0-55.20.1.el10_0.x86_64.img
      ' not found.
      
      Press any key to continue...
      

      The reason for this is the initial RHEL8 system may have been installed with an older release of RHEL8 (up to 8.3), which used network-legacy dracut module.
      After updating the system, the network-legacy module was kept in the dracut configuration through creating the following snippet:

      # cat /etc/dracut.conf.d/50-network-legacy.conf 
      # Since rhel-8.3 dracut moved to use NetworkManager
      # On existing installations we want to preserve the old scripts
      add_dracutmodules+=" network-legacy "
      

      This is not an issue with RHEL9 because network-legacy is still shipped, but it isn't in RHEL10 anymore, causing the rebuild of the initramfs during upgrade phase to fail:

      [  120.891189] dracut[13552] Executing: /usr/bin/dracut -f --kernel-image /lib/modules/6.12.0-55.20.1.el10_0.x86_64/vmlinuz  --kver 6.12.0-55.20.1.el10_0.x86_64 /boot/initramfs-6.12.0-55.20.1.el10_0.x86_64.img
      [  121.216556] dracut[13552] 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
      [  121.521759] dracut[13552] Module 'network-legacy' cannot be found.
      

      Note that the error is not "detected" by leapp, it prints success:

      [  166.988636] upgrade[882]: ============================================================
      [  166.989117] upgrade[882]:                       REPORT OVERVIEW
      [  166.989474] upgrade[882]: ============================================================
      [  166.989932] upgrade[882]: HIGH and MEDIUM severity reports:
      [  166.990273] upgrade[882]:     1. Using repository not supported by Red Hat
      [  166.990674] upgrade[882]:     2. GRUB2 core will be automatically updated during the upgrade
      [  166.991171] upgrade[882]:     3. Some RHEL packages have not been upgraded
      [  166.991556] upgrade[882]:     4. Berkeley DB (libdb) has been detected on your system
      [  166.991984] upgrade[882]: Reports summary:
      [  166.992267] upgrade[882]:     Errors:                      0
      [  166.992617] upgrade[882]:     Inhibitors:                  0
      [  166.992948] upgrade[882]:     HIGH severity reports:       3
      [  166.993303] upgrade[882]:     MEDIUM severity reports:     1
      [  166.993627] upgrade[882]:     LOW severity reports:        3
      [  166.993969] upgrade[882]:     INFO severity reports:       3
      

      What needs to be done

      IMHO what needs to be done is:

      1. detect the presence of /etc/dracut.conf.d/50-network-legacy.conf file when upgrading from RHEL9 to RHEL10 as an inhibitor
      2. update RHEL9 Post-Upgrade documentation to indicate the customers they have to remove this file and rebuild the all the initramfs files (using network-legacy on RHEL9 is not recommended)

              mhecko@redhat.com Michal Hecko
              rhn-support-rmetrich Renaud Métrich
              leapp-notifications leapp-notifications
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: