You are not logged in.

#1 2025-11-29 00:08:26

ndgd
Member
Registered: 2025-11-28
Posts: 7

[Solved] Resume after Hibernating result in Failure to mount

I tried setting up hibernation following the wiki using a swapfile on Btrfs.
The system hibernates successfully, but during resume it drops into emergency mode with:

ERROR: Failed to mount 'PARTUUID=...' on real root

If I type exit:

ERROR: failed to mount the real root device.
Bailing out, you are on your own. Good luck.

Typing exit again results in a kernel panic.

System details

Bootloader: Limine
Filesystem: Btrfs with subvolumes
zram: enabled
Swapfile: stored on a mounted subvolume (@swap)


fstab

Static information about the filesystems.

UUID=6140f3f0-c056-4256-a912-196ac90ee90d / btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@ 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /home btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@home 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /.swap btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@swap 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /srv btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@srv 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/cache btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@cache 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/log btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@log 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/lib/machines btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@machines 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/lib/portables btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@portables 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/lib/containers btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@containers 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/lib/docker btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@docker 0 0
UUID=6140f3f0-c056-4256-a912-196ac90ee90d /var/lib/libvirt/images btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=/@libvirt_images 0 0

UUID=2ABA-CDE7 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2

/.swap/swapfile none swap defaults 0 0

Kernel command line (limine.conf)

root=PARTUUID=743efcd4-c1d5-4744-9ed6-61a819c5ce92
zswap.enabled=0
rootflags=subvol=@ rw
rootfstype=btrfs
intel_iommu=on iommu=pt
quiet loglevel=3 splash
nowatchdog nmi_watchdog=0
resume=/dev/sda2
resume_offset=12068096
hibernate.compressor=lz4

swap --show

NAME TYPE SIZE USED PRIO
/dev/zram0 partition 4G 0B 100
/.swap/swapfile file 18G 0B -2

What happens

  • []System hibernates normally.
    []On resume: emergency mode with “failed to mount <UUID> on real root”.

  • Typing exit repeats the error or leads to a kernel panic.

I suspect the problem is related to:

  • []the swapfile living on a mounted subvolume (@swap), or
    []something incorrect in my fstab or kernel command line.

Any insight appreciated.

Last edited by ndgd (2025-12-01 10:16:31)

Offline

#2 2025-11-29 16:31:50

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,088

Re: [Solved] Resume after Hibernating result in Failure to mount

ERROR: Failed to mount 'PARTUUID=...' on real root

And why did it fail?
Please provide the entire log leading up to this, in doubt link a photo of the monitor.

quiet loglevel=3 splash

and lose those, see https://wiki.archlinux.org/title/Genera … l_messages

resume=/dev/sda2

Don't reference those via the device node, if there's more than one SATA device this isn't deterministic.

resume_offset=12068096

Filesystem: Btrfs with subvolumes

You did NOT use filefrag to determine the offset?
https://wiki.archlinux.org/title/Power_ … ile_offset

Offline

#3 2025-11-30 23:10:22

ndgd
Member
Registered: 2025-11-28
Posts: 7

Re: [Solved] Resume after Hibernating result in Failure to mount

Thanks

I fixed it. I had two things wrong. The first was using /dev/sda2 for the resume target, which caused the “failed to mount real root” then kernel panic issue.

The second was that my UKI was being built without the resume hook, even though it was listed in mkinitcpio.conf.

After enabling more kernel debugging:

earlyprintk=tty loglevel=7 debug rd.debug

I ran:

sudo dmesg -T | rg resume

and sent the output to an LLM for interpretation.

[Sun Nov 30 22:29:57 2025] Kernel command line: root=PARTUUID=743efcd4-c1d5-4744-9ed6-61a819c5ce92 zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs intel_iommu=on iommu=pt earlyprintk=tty loglevel=7 debug rd.debug nowatchdog nmi_watchdog=0 resume=UUID=6140f3f0-c056-4256-a912-196ac90ee90d resume_offset=12068096 hibernate.compressor=lz4
[Sun Nov 30 22:30:02 2025] (sd-exec-[264]): About to execute /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator
[Sun Nov 30 22:30:02 2025] systemd-hibernate-resume-generator[273]: Not running in initrd, exiting.
[Sun Nov 30 22:30:02 2025] (sd-exec-[264]): /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator succeeded.
[Sun Nov 30 22:30:02 2025] (e-resume)[296]: systemd-hibernate-clear.service: Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
[Sun Nov 30 22:30:02 2025] (e-resume)[296]: systemd-hibernate-clear.service: Executing: /usr/lib/systemd/systemd-hibernate-resume --clear

The conclusion was that the resume hook wasn’t being included in the initrd at all.

I checked my linux.preset file and found the config lines commented out. After uncommenting them:

ALL_config="/etc/mkinitcpio.conf"
default_config="/etc/mkinitcpio.conf"
fallback_config="/etc/mkinitcpio.conf"

the UKI started building with the resume hook properly.

Offline

#4 2025-12-01 08:03:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,088

Re: [Solved] Resume after Hibernating result in Failure to mount

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2025-12-01 10:17:05

ndgd
Member
Registered: 2025-11-28
Posts: 7

Re: [Solved] Resume after Hibernating result in Failure to mount

Done. Thanks

Offline

Board footer

Powered by FluxBB