[mkinitcpio] Add hook for unlocking root account (original) (raw)
Description:
Right now the root account is locked in the initramfs. Locking root makes sense in most situations, but when working on early boot code like initramfs hooks, it prevents access to the emergency shell and therefore helpful logs.
Attached you will find a patch that adds a `shadow` hook that overwrites the `/etc/shadow` file in the initramfs with the one from the actual main OS, effectively unlocking the root account with the same password as the main OS. This hook should only be enabled when debugging other initramfs hooks, and should otherwise remain disabled.