Am Dienstag, 23. April 2024, 22:26:17 CEST schrieb Richard:
Hi Richard,
this is, what I am doing when this happens:
1. booting into a live system (any new is working, I prefer kali-linux)
2. If you are using encrypted filesystems, open it. But you have to name it like it is named in /etc/crypttab of the defective system
3. Now mount the device with root-filesystem to /mnt
4. If you have /boot as a separated partition, mount it to /mnt/boot
5. Now mount needed system directories to /mnt
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
6. If everything is mounted correct, you can chroot into the mounted system
chroot /mnt
7. Now you can create a new initrd
update-initramfs -u
8. exit the chroot and reboot.
Note:
1. if you have encrypted filesystems, check in the chroot the files
/etc/crypttab
/etc/cryptsetup-initramfs/conf-hook
In conf-hook check the last line, the parm "ASKPASS=Y" should be commented out.
2. You can check the UUID of every partition with the command
blkid /dev/sda1
and compare it with the entries in /etc/fstab, /etc/crypttab and everywhere else it is used.
3. In chroot, you can of course also create a new initrd, using
update-initramfs -c -k all
4. Please remember, when you have encrypted partitions, then the UUID of the device is other, than the partitions, you later mount. Example:
blkid /dev/sda3
UUID=1234556-dfre-3456.............
Now
cryptsetup luksOpen /dev/sda3 crypt_sda3
blkid /dev/mapper/crypt_sda3
UUID=9876g54-765g-87hg............
Watch this, when changing any UUIDs in /etc/fstab or anywhere else.
Last but not least: Hope this helps, good luck!
Best
Hans