Advertisement
Tritonio

Fixing initramfs initrd.img on Devuan

Oct 25th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. From a live CD as root, tested on Devuan:
  2.  
  3. #nvme0n1p3 is my LUKS encrypted root partition. It's not using LVM.
  4.  
  5. cryptsetup open /dev/nvme0n1p3 root_fs #or whatever name you see in your crypttab
  6.  
  7. mount /dev/mapper/root_fs /mnt
  8. mount --bind /dev /mnt/dev
  9. mount --bind /proc /mnt/proc
  10. mount --bind /sys /mnt/sys
  11. mount /dev/nvme0n1p2 #if you have a separate boot partition
  12. chroot /mnt
  13.  
  14. If your /etc/fsstab has wrong UUIDs fix them and then run update-grub.
  15.  
  16. mkinitramfs -o /boot/initrd.img-4.19.0-18-amd64 4.19.0-18-amd64
  17.  
  18. If the above throws any warning, /etc/cryptsetup-initramfs/conf-hook has a setting you can change to always include crypto capabilities in initrd.img. Change it and retry mkinitramfs.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement