3 ms·
Frustrated with my Fedora Linux configuration, I recently got hibernate to work with my Gentoo Linux system. I have a LUKS (but not LVM) encrypted root and swa
by hobonate 6y ago
Frustrated with my Fedora Linux configuration, I recently got hibernate to work with my Gentoo Linux system.
I have a LUKS (but not LVM) encrypted root and swap partition on /dev/sda3 and /dev/sda4 respectively.
I use the command "su && mount /boot && genkernel --luks initramfs" to generate the initramfs.
I give the initramfs the following parameters: "crypt_root=/dev/sda3 root=/dev/mapper/root crypt_swap=/dev/sda4 resume=/dev/mapper/swap". This makes my initramfs ask for my password for the partitions, then decrypt the partition, then mount them and resume from hibernation if possible.
I add this parameter by setting GRUB_CMDLINE_LINUX in /etc/default/grub, and then running "grub-mkconfig -o /boot/grub".
When I want to hibernate I use the following command: "exec loginctl hibernate". My window managers let me bind this to a keyboard combination.
I am using openrc as my init system (with elogind), and sway/GNOME as my window manager. The computer uses legacy BIOS (SeaBIOS) and the storage uses GUID partition table with the grub bootloader. Hope this helps.
- ka0lin 6y agoYou should add this to the Gentoo Wiki.