Linux (Fedora): enabling suspend-to-disk feature (hibernation)
Linux (Fedora): enabling suspend-to-disk feature (hibernation)
Long ago I transferred hard drives from my desktop to a server, but hibernation stopped working since the swap file used for hibernation was on those drives. There wasn’t enough space for a big enough swap partition on the others. Eventually I resolved it by adding spare disks that allowed room for a swap file. Here’s my guide on the process. This might help others too: * Set up Hibernate (Suspend to Disk) ** grub GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rd.md.uuid=30514238:5cb54a7b:09544176:54139545 rd.md.uuid=b9efaf9e:32051c91:be6bf7b4:fda6c12b nmi_watchdog=0 resume=UUID=55e19965-e0d0-46e5-89af-5a47c5f63043 * dracut rd.md.uuid=30514238:5cb54a7b:09544176:54139545 rd.md.uuid=b9efaf9e:32051c91:be6bf7b4:fda6c12b dracut parameter rd.md.uuid see man dracut.conf bring up only the device, specifically multiple times as needed ** resume resume=UUID=55e19965-e0d0-46e5-89af-5a47c5f63043 the device to hold the image and to restart from there ** configure dracut Files reside in /etc/dracut.conf.d: 10-resume.conf and 20-resume.conf Add device to /dev/md0 using its UUID as shown. Resuming comes from the swap file on the device, not directly from the device itself. * Adjust image_size in /sys/power/image_size to 0 for minimal disk usage. You can automate this with a unit file or command.* This can be useful: the image_size setting affects how much space is written to storage. If unsure, check the documentation or try running the commands again. * I tried to hibernation from a system that uses NFS for /home, but got stuck. I’m still figuring it out. For more details, see the links provided.*