PM: Hibernation image not present or could not be loaded
To elaborate @AdrianRatnapala's comment, you have to:
Find uuid of your swap partition. Suppose the partition is sdb3, then
$ ls -l /dev/disk/by-uuid/ | grep sdb3 lrwxrwxrwx 1 root root 10 окт. 9 08:59 1dd7e123-1f82-45f0-a202-0ff3ea6f081a -> ../../sdb3
Open
/etc/default/grub
, and find the line starting withGRUB_CMDLINE_LINUX_DEFAULT="
. Add there between the quotesresume=/dev/disk/by-uuid/your-swap-uuid
. As an example:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/1dd7e123-1f82-45f0-a202-0ff3ea6f081a"
- Run as a root
update-grub
- A reboot is needed to use the new kernel command-line.
Related videos on Youtube
![rubik](https://i.stack.imgur.com/BZtrd.png?s=256&g=1)
rubik
Code complexity and other software metrics for Python! Github project: https://github.com/rubik/radon My blog: https://signal-to-noise.xyz/
Updated on September 18, 2022Comments
-
rubik almost 2 years
After hibernating with
systemctl hibernate
, the system boots normally as if it had been shutdown. I have the resume parameter in the kernel line and the resume hook in mkinitcpio.confThese are the relevant kernel messages:
$ dmesg | grep -i swap [ 0.000000] Command line: initrd=\initramfs-linux.img root=/dev/sda2 rw resume=/dev/sda4 [ 0.000000] Kernel command line: initrd=\initramfs-linux.img root=/dev/sda2 rw resume=/dev/sda4 [ 0.350295] PM: Checking hibernation image partition /dev/sda4 [ 8.776686] Adding 8191996k swap on /dev/sda4. Priority:-1 extents:1 across:8191996k FS $ dmesg | grep -i hibern [ 0.350295] PM: Checking hibernation image partition /dev/sda4 [ 0.350301] PM: Hibernation image not present or could not be loaded.
So the only remaining possibility is that
systemctl
didn't write to disk. In fact, when I run the command, the screen first goes blank for a couple of seconds, then I can see my terminal again, and finally it shutdowns itself.I read that pm-utils do not work very well with systemd, so I wouldn't want to switch to those. Any suggestions?
Thanks!
-
rubik over 9 years@AdrianRatnapala: Thanks for the help! I'll try your solution.
-
frogatto about 9 yearsI have the same problem. Could you please share your solution here?
-
rubik about 9 years@abforce Following Adrian's solution worked for me. Replace normal paths with UUIDs in the kernel options.
-
-
rubik over 8 yearsI don't use Grub but the essence of the procedure is the same!
-
Petr over 8 yearsUUID of my swap changes every reboot so this doesn't work :(
-
Hi-Angel over 8 years@Petr this is weird… UUID should only change upon reformatting. I found alike bug-report though, but this is dated by 2008 year. Okay, just for the safe case try
sudo mkswap </dev/partition-name>
, then check its UUID withsudo blkid </dev/partition-name>
. If it still would change upon reboot, I'd suggest you to ask a question at unix.stackexchange.com -
Hi-Angel over 8 years@Petr ah, another thing to try before asking — you could manually set UUID of swap with
sudo swaplabel -U <NEW-UUID> </dev/partition-name>
. You could generate new UUID withuuidgen
utility. -
inta over 7 yearsI think it's easier and safer to get the UUID with
blkid
.ls -l /dev/disk/by-uuid/
won't give you a useful output if you are using lvm. -
vmassuchetto about 7 years
grub-mkconfig -o /boot/grub/grub.cfg
in Arch Linux. :) -
Philippe Gachoud over 6 yearsDid not work for me still getting
Jan 6 15:34:55 hostName kernel: [ 2.111487] PM: Checking hibernation image partition 86cfa90d-b28e-4915-8856-47750aac8903 Jan 6 15:34:55 hostName kernel: [ 2.165479] PM: Hibernation image not present or could not be loaded.
-
Gregor over 4 yearsThis answer provides some additional useful information that could be appended to the accepted answer. In particular, the need to reboot in order to use the new kernel command-line is obvious to experienced Linux users, but might trip up new users.