Skip to content

dracut-ng: enhance rd.cmdline=ask prompt visibility and robustness - #2312

Draft
xosevp wants to merge 1 commit into
dracut-ng:mainfrom
xosevp:xosevp1
Draft

dracut-ng: enhance rd.cmdline=ask prompt visibility and robustness#2312
xosevp wants to merge 1 commit into
dracut-ng:mainfrom
xosevp:xosevp1

Conversation

@xosevp

@xosevp xosevp commented Mar 19, 2026

Copy link
Copy Markdown

The current "rd.cmdline=ask" prompt is very easy to miss during the boot process, as it's just a single line of text that often gets buried among other kernel messages.

It improves the user experience by:

  • Adding a high-visibility 80-column ASCII banner to clearly signal that input is required.
  • Refining the text to clarify that both kernel and install program parameters are accepted.
  • Implementing a temporary 'trap' for SIGINT (Ctrl+c). Since the 'd' key is physically close to 'c' on most layouts, it's easy to accidentally kill the script when trying to send EOF (Ctrl+d).
  • Using shorter, consistent sleep intervals for a smoother rendering of the banner.

Old prompt:
Enter additional kernel command line parameter (end with ctrl-d or .)

New prompt:

    ========================================================================
(o<                                                                          >o)
//\                        INPUT REQUIRED !!!                                /\\
V_/_                                                                        _\_V
    ========================================================================

 Enter additional kernel command line, or install program, parameters.
 End with a period "." or Ctrl+d in a new line:

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

The current "rd.cmdline=ask" prompt is very easy to miss during the boot
process, as it's just a single line of text that often gets buried among
other kernel messages.

It improves the user experience by:
- Adding a high-visibility 80-column ASCII banner to clearly signal that
  input is required.
- Refining the text to clarify that both kernel and install program parameters
  are accepted.
- Implementing a temporary 'trap' for SIGINT (Ctrl+c). Since the 'd' key is
  physically close to 'c' on most layouts, it's easy to accidentally kill
  the script when trying to send EOF (Ctrl+d).
- Using shorter, consistent sleep intervals for a smoother rendering of the
  banner.

Old prompt:
Enter additional kernel command line parameter (end with ctrl-d or .)

New prompt:
    ========================================================================
(o<                                                                          >o)
//\                        INPUT REQUIRED !!!                                /\\
V_/_                                                                        _\_V
    ========================================================================

 Enter additional kernel command line, or install program, parameters.
 End with a period "." or Ctrl+d in a new line:

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
@xosevp
xosevp requested a review from a team as a code owner March 19, 2026 21:18
@github-actions github-actions Bot added modules Issue tracker for all modules dracut-systemd Issues related to the dracut-systemd module base Issues related to the base module labels Mar 19, 2026
sleep 0.25
echo '(o< >o)'
sleep 0.25
echo '//\ INPUT REQUIRED !!! /\\'

Check warning

Code scanning / shellcheck

SC2028 Warning

echo may not expand escape sequences. Use printf.
sleep 0.25
echo '(o< >o)'
sleep 0.25
echo '//\ INPUT REQUIRED !!! /\\'

Check warning

Code scanning / shellcheck

SC1003 Warning

Want to escape a single quote? echo 'This is how it'''s done'.
sleep 0.25

# Ignore Ctrl+c (the d key is too close to c)
trap '' SIGINT

Check warning

Code scanning / shellcheck

SC3048 Warning

In POSIX sh, prefixing signal names with 'SIG' is undefined.
done

# Restore Ctrl+c
trap 'exit 2;' SIGINT

Check warning

Code scanning / shellcheck

SC3048 Warning

In POSIX sh, prefixing signal names with 'SIG' is undefined.
Comment thread modules.d/80base/init.sh
sleep 0.25
echo '(o< >o)'
sleep 0.25
echo '//\ INPUT REQUIRED !!! /\\'

Check warning

Code scanning / shellcheck

SC2028 Warning

echo may not expand escape sequences. Use printf.
Comment thread modules.d/80base/init.sh
sleep 0.25
echo '(o< >o)'
sleep 0.25
echo '//\ INPUT REQUIRED !!! /\\'

Check warning

Code scanning / shellcheck

SC1003 Warning

Want to escape a single quote? echo 'This is how it'''s done'.
Comment thread modules.d/80base/init.sh
sleep 0.25

# Ignore Ctrl+c (the d key is too close to c)
trap '' SIGINT

Check warning

Code scanning / shellcheck

SC3048 Warning

In POSIX sh, prefixing signal names with 'SIG' is undefined.
Comment thread modules.d/80base/init.sh
done

# Restore Ctrl+c
trap 'exit 2;' SIGINT

Check warning

Code scanning / shellcheck

SC3048 Warning

In POSIX sh, prefixing signal names with 'SIG' is undefined.
@devkontrol

Copy link
Copy Markdown
Collaborator

In POSIX sh, prefixing signal names with 'SIG' is undefined.

Please resolve this and other shellcheck warnings . Marking it draft to take it out from the review queue.

@devkontrol
devkontrol marked this pull request as draft August 10, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base Issues related to the base module dracut-systemd Issues related to the dracut-systemd module modules Issue tracker for all modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants