View previous topic :: View next topic |
Author |
Message |
AprilGrimoire n00b
Joined: 05 Jun 2020 Posts: 57
|
Posted: Fri Sep 06, 2024 12:55 am Post subject: initramfs generated by dracut hangs after 'startup finished' |
|
|
EDIT4: new image
Hi! I've added a new SSD and trying to extend my LVM on LUKS system over it, and messed around my dracut config. Now initramfs generated by dracut hangs after 'startup finished': see this image.
Another weird phenomenon: Code: | A start job is running for /dev/disk/by-uuid/1067c868-4852-4495-af22-600cdfe01a92 | hangs for 2 minutes and timeout, which is my swap partition.
I'm using a LVM on LUKS system, with two LUKS partitions on two disks:
Code: |
08:47:31 |base|april@AprilGrimoire-Mechrevo ~ → lsblk -o NAME,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINT,LABEL,UUID
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT LABEL UUID
nvme0n1
259:0 0 1.8T 0 disk
└─nvme0n1p1
259:1 0 1.4T 0 part 188c0d5e-4344-42cd-9b99-b9a581fab427
└─luks-188c0d5e-4344-42cd-9b99-b9a581fab427
252:0 0 1.4T 0 crypt
nvme1n1
259:2 0 953.9G 0 disk
├─nvme1n1p1
│ 259:3 0 100M 0 part E03F-FD6D
├─nvme1n1p2
│ 259:4 0 16M 0 part
├─nvme1n1p3
│ 259:5 0 200G 0 part 60A2414CA241283C
├─nvme1n1p4
│ 259:6 0 245.1G 0 part 762241E82241ADC5
├─nvme1n1p5
│ 259:7 0 900M 0 part 82904209904203DF
├─nvme1n1p6
│ 259:8 0 9.8G 0 part /boot/efi AAF6-94FE
├─nvme1n1p7
│ 259:9 0 478.5G 0 part b02398b6-9c80-4ea2-a188-76d6c3fc2a3b
│ └─luks-b02398b6-9c80-4ea2-a188-76d6c3fc2a3b
│ 252:1 0 478.5G 0 crypt oPHuoW-kgpR-OdTY-8DwA-IWFr-kuzK-8ASNau
│ ├─vg0-homevol
│ │ 252:2 0 200G 0 lvm /home e9342c94-f8b6-4581-991b-722e6790dcef
│ ├─vg0-swapvol
│ │ 252:3 0 48G 0 lvm 1067c868-4852-4495-af22-600cdfe01a92
│ ├─vg0-gentoo--rootvol
│ │ 252:4 0 50G 0 lvm / 778ffb43-269a-4ac3-8786-ccddcfbe8140
│ └─vg0-gentoo--usrvol
│ 252:5 0 100G 0 lvm /usr e4f22ae8-c5d5-4c6f-b42e-d927a979a764
└─nvme1n1p8
259:10 0 4.9G 0 part /boot gentoo-boot 3558e895-d6f4-4172-8ff8-83c18c51527a
|
Now that scheme works fine. However, during boot time, I need to type in the passphrase two times. In order to avoid that trouble, I set the same passphrase for the two LUKS partitions, and tried to configure dracut to use systemd to manage cryptsetup, so I could use systemd's passphrase cache. (I will configure dracut to clear the cache after initramfs has done its job, to improve security.)
The usage of systemd in dracut resulted in system not booting. Here's my dracut config:
Code: |
08:53:17 |base|april@AprilGrimoire-Mechrevo ~ → cat /etc/dracut.conf.d/01.conf dracutmodules+=" btrfs resume bash kernel-modules rootfs-block udev-rules usrmount base fs-lib shutdown crypt lvm systemd "
add_device+=" /dev/nvme0n1p7 "
|
If I remove systemd from the config, everything works fine except I need to enter the same passphrase (not short) twice each time when booting. Currently the new LUKS partition is empty, hence its absence in add_device shouldn't cause issues.
I understand this is not a 'installing gentoo' question, but I think most people encounter initramfs issues at installation, so I decided to post it here anyway. Any clues? Thanks!
EDIT: I think I have some clue. systemd is trying to access the swap to determine if it needs to resume from suspension. However, my swap is inside a LVM on LUKS partition, and systemd is trying to access it before decrypting the LUKS partition. Why?
EDIT2: After adding systemd-cryptsetup to dracut config, now I'm asked for decryption key. However the swap partition still fails to load: see the image.
EDIT3: After removing the 'resume' option from dracut config, now systemd is no longer trying to load the swap partition. However the system still hangs after multi-user.target.
EDIT4: After following https://bbs.archlinux.org/viewtopic.php?id=198017, now almost all the error info disappear. However, systemd still hangs after 'startup finished': see the image on top.
Last edited by AprilGrimoire on Fri Sep 06, 2024 2:13 pm; edited 1 time in total |
|
Back to top |
|
|
Kethreveris n00b
Joined: 16 Feb 2009 Posts: 20 Location: Rethwallen
|
Posted: Fri Sep 06, 2024 9:18 am Post subject: |
|
|
Did you update "dracut"?
I found out during my last Portage update that "dracut" now defaults to ZSTD compression which is not built into my kernel. So the server would not boot. Easy fix to force "dracut" to use a supported compression method, like "gzip".
One way to tell, was during initial RAM disk creation, it mentions "zstd" which mine never did before. _________________ Kethreveris, (aka Kethrery) |
|
Back to top |
|
|
AprilGrimoire n00b
Joined: 05 Jun 2020 Posts: 57
|
Posted: Fri Sep 06, 2024 1:21 pm Post subject: |
|
|
Kethreveris wrote: | Did you update "dracut"?
I found out during my last Portage update that "dracut" now defaults to ZSTD compression which is not built into my kernel. So the server would not boot. Easy fix to force "dracut" to use a supported compression method, like "gzip".
One way to tell, was during initial RAM disk creation, it mentions "zstd" which mine never did before. |
Hi, thanks for helping!
I think that's not the issue, since the latest dracut without systemd setting would produce a functioning image. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|