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

[RFE] "die()" function doesn't let the user see what's wrong with dracut

    • anaconda-34.25.5.1-1.el9
    • Medium
    • rhel-sst-installer
    • ssg_front_door
    • 10
    • 2
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      The die() function halts the system on error:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      447 die() {
      :
      467 if [ -n "$DRACUT_SYSTEMD" ]; then
      468 systemctl --no-block --force halt
      469 fi
      470
      471 exit 1
      472 }
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Halting the system doesn't poweroff the system, which should let the user understand what's going on.
      Unfortunately, on many real hardware, including Lenovo T460s, it appears that as soon as the system is halted, the display is powered off, preventing the user from seeing the reason for dracut dying.

      This is particularly annoying when the user tries to boot a RHEL ISO which appears to be corrupted: the corruption is detected and immediately after the display goes blank.

      I'm proposing to add a 30 seconds delay before halting, which should be sufficient, something like this below:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      447 die() {
      448 {
      :
      467 if [ -n "$DRACUT_SYSTEMD" ]; then
      468 echo "<24>dracut: Halting the system in 30 seconds" > /dev/kmsg
      469 sleep 30
      470 echo "<24>dracut: Halting the system" > /dev/kmsg
      471 systemctl --no-block --force halt
      472 fi
      :
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      We could do better, such as asking the user to confirm through hitting Enter, but it's more complicated to implement, since it requires spawning a one-shot service that takes control of the console.

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

      dracut-057

      How reproducible:

      Always

      Steps to Reproduce:
      1. Corrupt a RHEL ISO

      1. dd if=/dev/zero of=/path/to/iso seek=200M count=10 bs=1 conv=notrunc

      2. Boot the ISO on real hardware (QEMU/KVM doesn't reproduce because the screen doesn't blank)

      It reproduces on Lenovo T460s, ASUS Chromebook C202S, ASUS M415U Notebook and HP envy360 at least.

      Actual results:

      Corruption detection message + screen blanking immediately after

      Expected results:

      Corruption detection message + screen not blanking

              jkonecny@redhat.com Jiri Konecny
              rhn-support-rmetrich Renaud Métrich
              anaconda-maint-list anaconda-maint-list
              Jan Stodola Jan Stodola
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: