Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing hook for resume #92

Open
utzer opened this issue Jan 4, 2020 · 2 comments
Open

Missing hook for resume #92

utzer opened this issue Jan 4, 2020 · 2 comments

Comments

@utzer
Copy link

utzer commented Jan 4, 2020

I installed a system with archfi and found the following problem, there is a kernel parameter and a hook missing for hibernation to work.

What I did to fix it:
use "ls -l /dev/disk/by-uuid" to find the UUID of the SWAP device, it is a symlink to /dev/sdx, where sdx is the one where "[SWAP]" is stated behind in the output of "lsblk".
This has to be added to the kernel parameters in /etc/default/grub in the line:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/8a3d46d1-985e-4661-a771-50c880f08db7:root resume=UUID=d816e356-bd5e-4881-b9fb-7c1690da2e40"

So the UUID above is the one from "ls -l /dev/disk/by-uuid".

And also the hook "resume" has to be added, so my hooks now look like this:
"HOOKS=(base udev autodetect modconf block keymap encrypt filesystems resume keyboard fsck)"
The file for this is: /etc/mkinitcpio.conf
I already had to add the "keyboard" hook, which is helpful to have the right keyboard layout for the cryptsetup password dialog during boot.

After both changes those commands have to be run:
grub-mkconfig -o /boot/grub/grub.cfg
and
mkinitcpio -p linux

Warning, this might expose the SWAP data to third parties, it would be better to have the SWAP in a LUKS/LVM I think, then the UUID above has to be the one of the LVM partition with the SWAP.

I looked at those pages for the solution:
https://wiki.archlinux.org/index.php/kernel_parameters#GRUB
https://wiki.archlinux.org/index.php/Kernel_parameters
https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation

This only applies to GRUB systems.

I hope that someone can pick up my suggestions and implement it in the script, I think I am bit to inexperienced to do it myself.

Thanks for the work, I love Arch and you guys help me a lot as a user.

@MatMoul
Copy link
Owner

MatMoul commented Jan 11, 2020

Thanks for your feedback...
The keyboard hook seem a very good idea...
For the hibernation, it's not implemented now.
I've some idea for a new solution to partition your disk but I need time...

@utzer
Copy link
Author

utzer commented Mar 31, 2021

@MatMoul did you ever have a chance to implement this?

Edit: Answered my question by looking here, I think not implemented yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants