Your message dated Mon, 13 Nov 2023 18:55:56 +0300
with message-id <9a2028ef-55db-4f09-992b-454cb6d0e...@tls.msk.ru>
and subject line Re: Bug#984816: busybox resume fails to resume with swap file
after hibernation
has caused the Debian Bug report #984816,
regarding busybox resume fails to resume with swap file after hibernation
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
984816: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984816
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: busybox-static
Version: 1:1.30.1-6
Hi.
I wasn't able to figure out all the details yet and likely won't get to
that in the next few weeks. However, I tried getting hibernation to work on
a machine with only a swap file.
This failed miserably (machine appeared to hibernate properly, but on
reboot, the script in the initrd (local-premount/resume, from
initramfs-tools) did call /usr/bin/resume properly (I added some echo/sleep
commands to see what happens), but that just terminated apparently, without
any error message or similar.
Reproduction (on ext4, btrfs needs more involved procedure for offset):
1) create a sufficiently large file /swap
2) mkswap /swap
3) Add swap to /etc/fstab
4) Figure out parameters for resume/resume_offset, /sys/power/resume_offset
and /sys/power/resume
resume=$(findmnt -no SOURCE -T /swap)
findmnt -no MAJ:MIN -T /swap > /sys/power/resume
resume_offset=$(debugfs -R 'bmap /swap 0' $resume 2>/dev/null)
cat > /etc/initramfs-tools/conf.d/resume <<EOF
RESUME=$resume
resume_offset=$resume_offset
EOF
echo resume_offset > /sys/power/resume_offset
(Note the different capitalization for conf.d/resume - it is needed this
way)
Run 'update-initramfs -k all -u'
Now you should be ready to hibernate (NOTE: Unless the bug is fixed or you
configured initramfs-tools to _not_ use busybox, this will potentially lead
to data loss, close all programs)
echo shutdown > /sys/power/disk
echo disk > /sys/power/state
your system should now suspend to disk and power off.
On power-on, the expected state would be that the machine resumes.
The actual state is that the machine does a fresh boot (after running
/usr/bin/resume $resume $resume_offset though).
Cross-check:
Modify /usr/share/initramfstools/hooks/klibc-utils by adding:
rm "$DESTDIR/bin/resume"
cp -pL /usr/lib/klibc/bin/resume "$DESTDIR/bin/resume"
Re-run the steps from "resume=" above.
The system properly resumes from hibernation.
I know that the "resume" tool in busybox originates from the code in
klibc-utils, but right now, the one in busybox doesn't work in this
scenario while the one from klibc-utils does.
Cheers,
Sven
--- End Message ---
--- Begin Message ---
Version: 1.35.0-1
On Fri, 19 Mar 2021 09:29:48 +0100 Sven Mueller <sven.muelle...@gmail.com>
wrote:
Tags 984816 + patch upstream
Severity 984816 important
This is https://bugs.busybox.net/show_bug.cgi?id=12006 - which also has a
patch which wasn't adopted yet (but is straight from klibc-utils, so really
should get adopted).
This has been fixed in upstream 1.33 version, and in debian 1.35.0-1.
Closing this bugreport now.
Thanks,
/mjt
--- End Message ---