random-archer / mkinitcpio-systemd-tool

Provisioning tool for systemd in initramfs (systemd-tool)
https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/
Other
113 stars 27 forks source link

plymouth support #59

Closed shelaf closed 4 years ago

shelaf commented 4 years ago

I'm trying to make mkinitcpio-systemd-tool work with plymouth.

I have confirmed that it can be unlocked locally and remotely without plymouth and remotely with plymouth, but not locally with plymouth. When the plymouth splash screen appears, I am unable to enter my luks passphrase. Is there a good way? lightdm with plymouth ``` systemctl enable lightdm-plymouth.service ``` /etc/mkinitcpio.conf ``` HOOKS=(base systemd sd-plymouth autodetect keyboard sd-vconsole modconf block sd-encrypt filesystems fsck btrfs systemd-tool) ``` /etc/mkinitcpio-systemd-tool/config/crypttab ``` cryptroot UUID=e4e424bd-7a2a-49c6-9cdb-b79db1555c3a none luks,discard ``` /etc/mkinitcpio-systemd-tool/config/fstab is empty. All necessary mount information is in /etc/fstab.
Andrei-Pozolotin commented 4 years ago
  1. this hook was never tested with plymouth
  2. I am willing to add plymouth support only if you promise to test it "till it works" :-)
shelaf commented 4 years ago

I'll willing to try ;)

Andrei-Pozolotin commented 4 years ago

ok, deal. lets try with #60:

there are 2 new units: * [initrd-plymouth.path](https://github.com/random-archer/mkinitcpio-systemd-tool/blob/2fb738eabec61f10441d8bfb56ca33d56018f0a7/src/initrd-plymouth.path) * [initrd-plymouth.service](https://github.com/random-archer/mkinitcpio-systemd-tool/blob/2fb738eabec61f10441d8bfb56ca33d56018f0a7/src/initrd-plymouth.service) how to test: 1. make sure you can recover the system https://github.com/random-archer/mkinitcpio-systemd-tool/wiki/System-Recovery 2. install hook development version from #60 ``` cd /tmp git clone git@github.com:random-archer/mkinitcpio-systemd-tool.git cd mkinitcpio-systemd-tool git fetch origin pull/60/head:dev-plymouth git checkout dev-plymouth ls -las ./PKGBUILD.sh ``` 3. configure `/etc/mkinitcpio.conf` `HOOKS="base ... systemd sd-plymouth systemd-tool"` (remove `sd-encrypt`) 4. enable/disable services (replace `initrd-cryptsetup.path` -> `initrd-plymouth.path`) ``` edit /etc/mkinitcpio-systemd-tool/config/crypttab edit /etc/mkinitcpio-systemd-tool/config/fstab systemctl enable initrd-plymouth.path systemctl enable initrd-tinysshd.service systemctl enable initrd-debug-progs.service systemctl enable initrd-sysroot-mount.service ``` 5. build image, review build log, review image content, and finally reboot: ``` mkinitcpio -Pvvv > build.log lsinitcpio -x /boot/initramfs-linux.img systemctl reboot ``` how to debug: * https://wiki.archlinux.org/index.php/plymouth * https://github.com/freedesktop/plymouth/blob/master/docs/development.txt
shelaf commented 4 years ago

I tried.

With sh-encrypt hook, unlock works fine locally and remotely! Perfect! But, without sd-encrypt hook, plymouth pass-field was not showed. Therefore, I could not enter the passphrase. ![plymouth](https://user-images.githubusercontent.com/980272/79681058-9612d580-8251-11ea-9b4e-410b4cde424a.png) Connect with ssh, the following prompt was displayed. ``` $ ssh -i ssh_host_ed25519_key root@192.168.186.100 select: a) secret agent s) sys shell r) reboot q) quit ?> ```
Andrei-Pozolotin commented 4 years ago
  1. thank you for testing
  2. it seems we need more users to test this
  3. I will release #60, but mark it "experimental"
Andrei-Pozolotin commented 4 years ago

@shelaf please:

  1. confirm v32 works for you https://github.com/random-archer/mkinitcpio-systemd-tool/releases/tag/v32 https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/

  2. document your setup as "new user story" on the following wiki page: https://github.com/random-archer/mkinitcpio-systemd-tool/wiki/Case:-Plymouth here is an example of similar user wiki page created by another user for btrfs setup: https://github.com/random-archer/mkinitcpio-systemd-tool/wiki/Case:-Sysroot-on-Btrfs

shelaf commented 4 years ago
  1. v32 works.
  2. It will take some time. My concern is issue #62.
Andrei-Pozolotin commented 4 years ago

v32 works

good, thank you

It will take some time

no problem, looking forward to it

My concern is issue #62

great,

that means that there are now at least 3 people: @fredleb @shelaf @lachesis who can join forces to have "sysroot on btrfs" resolved

please continue "sysroot on btrfs" conversation in #62 thread

Andrei-Pozolotin commented 4 years ago
  1. I will close this issue for now

  2. please drop a note here when your user-case wiki page is ready for review

shelaf commented 4 years ago

I wroted https://github.com/random-archer/mkinitcpio-systemd-tool/wiki/Case:-Plymouth.

Andrei-Pozolotin commented 4 years ago

Looks good, thank you very much. I am sure many people will find this helpful.