You are not logged in.
Pages: 1
Hello everyone,
NOTE: My ArchLinux is in an encrypted partition (LVM on LUKS) and I use efibootmgr to boot into my system.
I would like to use hibernation on my computer.
In order to do so, I first created a swap file:
dd if=/dev/zero/ of=/swapfile bs=1M count=8192
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap defaults 0 0" >> /etc/fstabThen, as I went through the ArchWiki, I learned I must use "High Level Interfaces" such as systemd to hibernate. Thus, to do so, I just have to type:
sudo systemctl hibernateThe last thing to do is to modify the kernel parameters in order to tell the system to boot from the swapfile.
Using
filefrag -v /swapfile | awk '{ if($1=="0:"){print $4} }', I determined the value of the resume_offnet parameter, and I used
findmnt -no UUID -T /swapfile to know the UUID of my swapfile.
Here’s the command I typed to add the ArchLinux boot entry:
efibootmgr --disk /dev/sda --part 1 --create --label "ArchLinux" --loader /vmlinuz-linux --unicode "cryptdevice=UUID=0d46f41d-6858-4cf0-8d9f-50de85af1bb2:cryptlvm root=/dev/ArchLinux/root resume=UUID=93e2002c-0a6f-4151-873b-3e01277dcab7 resume_offset=776192 quiet initrd=\intel-ucode.img initrd=\initramfs-linux.img" --verboseI also added the resume hook and regenerated the initramfs.
The problem is I always get an error on startup ("ERROR: resume: no device specified for hibernation"). I tried to change the value of the resume parameter to /dev/ArchLinux/root, but this changed nothing.
Thanks in advance for helping me solve this problem!
Last edited by Math3mat1x (2020-07-30 07:48:53)
Offline
I found a solution to my problem.
I deleted my swap file and created a swap partition of the size of my RAM. I then put in the resume kernel parameter the location of this partition.
Offline
Pages: 1