Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save asapdotid/f5a5e8397a4cb910fc3b509fc6491076 to your computer and use it in GitHub Desktop.

Select an option

Save asapdotid/f5a5e8397a4cb910fc3b509fc6491076 to your computer and use it in GitHub Desktop.
How to disable the "Please enter passphrase for disk…" line on the disk encryption screen

How to disable the promt text line on the disk encryption screen

As suggested on Red Hat Bugzilla, a configuration file could be set for the deleting the text on the Plymouth/LUKS screen.

Here is a step-by-step summary to ask for confirmation of someone more experienced than me than the correctness of all the steps:

  1. sudo touch /etc/plymouth/plymouth-populate-initrd.conf

  2. sudo nano /etc/plymouth/plymouth-populate-initrd.conf

  3. Insert the following content into the configuration file just created…

PLYMOUTH_DISABLE_LABEL_FREETYPE=1
  1. Save the file (Ctrl+O) and close it (Ctrl+X)

  2. Change the plymouth-populate-initrd script to let it read the new configuration variable…

    sudo nano /usr/libexec/plymouth/plymouth-populate-initrd

  3. Add the code to read the configuration file at the beginning of the script, after the first lines of comment…

# Source configuration file if it exists
if [ -f "/etc/plymouth/plymouth-populate-initrd.conf" ]; then
    . /etc/plymouth/plymouth-populate-initrd.conf
fi
  1. Find the corresponding code block and change the condition that includes label-freedype.so…
if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ] && [ "$PLYMOUTH_DISABLE_LABEL_FREETYPE" != "1" ]; then
     inst ${PLYMOUTH_PLUGIN_PATH}/label-freetype.so $INITRDDIR
     # The label-freetype plugin expects it at this location
     mkdir -p $INITRDDIR/usr/share/fonts
     [ ! -z "$DEFAULT_FONT" ] && ln -s "$DEFAULT_FONT" $INITRDDIR/usr/share/fonts/Plymouth.ttf
     [ ! -z "$DEFAULT_MONOSPACE_FONT" ] && ln -s "$DEFAULT_MONOSPACE_FONT" $INITRDDIR/usr/share/fonts/Plymouth-monospace.ttf
fi
  1. Regenerate the initramfs…

    sudo dracut --force

  2. Reboot

📖 Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment