You are not logged in.

#1 2020-10-05 17:19:28

fstabme
Member
Registered: 2020-10-05
Posts: 11

Problems hibernating to swap file "hibernation device not found"

Hi,

so I wanted to move my swapfile to a new hard drive I got (instead of writes to my SSD)

Everything hibernates fine, the swapfile is loaded properly when the system boots, however when attempting to resume from hibernation I get the error:

running hook [resume]
ERROR: resume: hibernation device '30c61075-eea4-4d7b-b0bc-f30a41310afb' not found


I followed the arch wiki: https://wiki.archlinux.org/index.php/swap#Swap_file


I started with:

sudo swapoff -a

to switch off my existing SSD swap partition

I have 64GB ram and I want to be able to hibernate so, I created a 69GB (noice) swap file on the mounted ext4 hard drive partition:

sudo dd if=/dev/zero of=/mnt/datahdd/swapfile bs=1024 count=72351740 

then

sudo mkswap /mnt/datahdd/swapfile
sudo chmod 600 /mnt/datahdd/swapfile
sudo swapon /mnt/datahdd/swapfile

then run:

$ swapon -s
Filename				Type		Size	Used	Priority
/mnt/datahdd/swapfile                  	file    	72351740	0	-2

then edited my fstab file:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p1 LABEL=main
UUID=bdfa2f36-d676-42e2-9ad0-8a58079b1b54       /               ext4            rw,relatime     0 1

# /dev/nvme0n1p3 LABEL=BOOT
UUID=6197-9EAE          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# /dev/nvme0n1p2
#UUID=f98f5c5b-ecb3-4c89-9969-72787662012a      none            swap            defaults        0 0

# /dev/sda2 LABEL=datahdd 2TB HDD
UUID=30c61075-eea4-4d7b-b0bc-f30a41310afb       /mnt/datahdd    ext4            defaults        0 1

# /dev/sda2 swapfile 2TB HDD
/mnt/datahdd/swapfile                           none            swap            defaults        0 0

then I used: https://wiki.archlinux.org/index.php/Po … _swap_file

used filefrag -v /mnt/datahdd/swapfile to get my swap_file_offset

also edited my /boot/refind_linux.conf kernel config:

"Boot with standard options" "root=PARTUUID=ffaca5a9-01 rw add_efi_memmap initrd=boot\amd-ucode.img initrd=boot\initramfs-linux.img resume=30c61075-eea4-4d7b-b0bc-f30a41310afb resume_offset=26542080"

I think it's something to do with my swapfile being on another drive and the way i've setup the fstab and kernel config but I just can't figure it out
I think it might be because of this entry in my kernel config:
"resume=30c61075-eea4-4d7b-b0bc-f30a41310afb" above

Last edited by fstabme (2020-10-05 17:20:21)

Offline

#2 2020-10-05 17:34:15

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Problems hibernating to swap file "hibernation device not found"

https://wiki.archlinux.org/index.php/Po … parameters

Notice the format of that parameter

Offline

#3 2020-10-05 17:43:18

fstabme
Member
Registered: 2020-10-05
Posts: 11

Re: Problems hibernating to swap file "hibernation device not found"

Scimmia wrote:

I didn't scroll up to swap partition section to see that!

thank you, everything works great now. Nice to know I was only a "UUID=" away from not posting on the forums smile


one final questions:

1.  Is it possible to make the hibernation process faster?

Offline

Board footer

Powered by FluxBB