You are not logged in.

#1 2024-01-02 00:13:03

AshkanArabim
Member
Registered: 2024-01-01
Posts: 6

[SOLVED] ERROR: resume: no device specified for hibernation

I'm trying to get hibernation to work, but on every boot I get the message

ERROR: resume: no device specified for hibernation

and I get a fresh boot.

I have followed https://wiki.archlinux.org/title/Power_ … ibernation, made the modifications, and run

mkinitcpio -P

and

sudo grub-mkconfig -o /boot/grub/grub.cfg

Here's some info that could help

swapon
NAME           TYPE      SIZE USED PRIO
/dev/nvme0n1p2 partition  65G   0B   -2
cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p3
UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b	/boot     	ext4      	rw,relatime	0 2

# /dev/nvme0n1p2
UUID=7a26e106-00b2-4d34-b961-50028dcf0fca	none      	swap      	defaults  	0 0
cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems resume fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"
cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet resume=UUID=7a26e106-00b2-4d34-b961-50028dcf0fca"
# GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet resume=/dev/nvme0n1p2"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

Here, notice how the `resume` parameter doesn't appear in my boot params...

cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b rw loglevel=3 quiet

Last edited by AshkanArabim (2024-01-02 02:48:56)

Offline

#2 2024-01-02 01:23:10

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 633

Re: [SOLVED] ERROR: resume: no device specified for hibernation

My guess is that you are not booting from the grub.cfg that you added the resume partition info to.

Something like this...
https://bbs.archlinux.org/viewtopic.php?id=270188&p=2

Offline

#3 2024-01-02 02:33:06

AshkanArabim
Member
Registered: 2024-01-01
Posts: 6

Re: [SOLVED] ERROR: resume: no device specified for hibernation

some stuff I realized:

my boot is the same as my root:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0     4K  1 loop /var/lib/snapd/snap/bare/5
loop1         7:1    0  63.9M  1 loop /var/lib/snapd/snap/core20/2105
loop2         7:2    0 349.7M  1 loop /var/lib/snapd/snap/gnome-3-38-2004/143
loop3         7:3    0  91.7M  1 loop /var/lib/snapd/snap/gtk-common-themes/1535
loop4         7:4    0 142.9M  1 loop /var/lib/snapd/snap/poedit/73
loop5         7:5    0  40.9M  1 loop /var/lib/snapd/snap/snapd/20290
loop6         7:6    0 175.7M  1 loop /var/lib/snapd/snap/spotify/74
nvme0n1     259:0    0 931.5G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /efi
├─nvme0n1p2 259:2    0    65G  0 part [SWAP]
└─nvme0n1p3 259:3    0   866G  0 part /boot
                                      /

These are all files named "grub.cfg" on my system

$ sudo find . -iname "grub.cfg"
./efi/grub/grub.cfg
./home/ashkan/Documents/snapd/src/snapd-2.61/bootloader/assets/data/grub.cfg
./home/ashkan/Documents/snapd/src/snapd-2.61/tests/lib/snaps/test-snapd-remodel-pc-18/grub.cfg
./grub/grub.cfg
find: File system loop detected; ‘./boot’ is part of the same file system loop as ‘.’.

And it turns out "/efi/grub/grub.cfg" doesn't have my parameters:

[root@xps grub]# cat grub.cfg | grep loglevel
        linux   /vmlinuz-linux root=UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b rw  loglevel=3 quiet
                linux   /vmlinuz-linux root=UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b rw  loglevel=3 quiet
                linux   /vmlinuz-linux root=UUID=89dfb9fb-5ed3-49fc-9b9d-724290235e2b rw  loglevel=3 quiet

So I'll try writing to "/efi/grub/grub.cfg" by "sudo grub-mkconfig -o /efi/grub/grub.cfg". We'll see if it works.

-- edited wrong command --

Last edited by AshkanArabim (2024-01-02 02:34:38)

Offline

#4 2024-01-02 02:47:47

AshkanArabim
Member
Registered: 2024-01-01
Posts: 6

Re: [SOLVED] ERROR: resume: no device specified for hibernation

yep! it worked. I'll mark this thread as solved.

I don't understand though, why is my grub using "/efi/grub/grub.cfg"? Is there a way to change it so that it uses "/boot/grub/grub.cfg"?

Offline

#5 2024-01-02 02:49:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,253

Re: [SOLVED] ERROR: resume: no device specified for hibernation

That would happen when you had the partition that's now mounted at /efi mounted to /boot when you installed grub. grub-install hard-codes the location of the config file in the executable.

Online

Board footer

Powered by FluxBB