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

boot get stuck if root is r/o and empty

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • rhel-10.0
    • dracut
    • None
    • No
    • None
    • rhel-bootloader
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      In RHEL 10, systemd-repart is capable of creating the root disk partition if missing. It only needs /usr and the right cmdline to mount it as /sysusr.

      However, the newly created root is empty. It is up to systemd to populate it with the basic folders.

      In RHEL 10, something weird happens though: A VM with a freshly created root keeps looping in the boot logs, till it starts the dracut emergency console. If nothing is done and the dracut console is exited, it keeps looping until it re-enters it.

      The only solution I could find was to mount /sysroot as r/w when inside the emergency console: 

      mount -o remount,rw /sysroot

      If added, the system proceeds to switch root and works fine.

      Steps to reproduce:

      • RHEL 10 with /usr as separate partition (assume is vda3 part)
      • mount.usr=/dev/vda3  in kernel cmdline
      • systemd-repart is loaded in initramfs, and also /usr/sbin/mkfs.ext4. In dracut config, add
        dracutmodules+=" systemd-repart "
        install_items+=" /usr/sbin/mkfs.ext4 " (being fixed in  https://issues.redhat.com/browse/RHEL-103385)
      • repart config in /usr/lib/repart.d:

      echo "[Partition]
      Type=root
      Label=new-root
      Format=ext4
      MakeDirectories=/usr
      SizeMinBytes=64M" > /usr/lib/repart.d/10-root.conf

      • root (vda2) is deleted
      • reboot

      Expected result:

      boot without issues

      Actual result:

      boot loops infinitely

              bootloader-eng-team bootloader -eng-team
              eesposit@redhat.com Emanuele Giuseppe Esposito
              bootloader -eng-team bootloader -eng-team
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: