[Bug 554009] Re: Resume from disk (swapfile) fails
Moreno Bartalucci
moreno.bartalucci at tecnorama.it
Thu Apr 22 06:28:07 UTC 2010
Hi Scott,
my swapfile has been created once for all, so unless files are moving by themselves in the hard drive its offset should never change.
In any case, I checked it across reboots and it's always the same.
If I read a few sectors from the hard drive with 'dd' starting from that offset and then I run a 'file' command on the data I collected I get a swap signature, so I'm sure the offset is correct.
As I stated in my original bug report, resuming from swapfile used to work correctly on karmic: why do you say you don't support it? Do you mean: you don't support it anymore?
Somewhere, in one of the ubuntu documentation pages (sorry I don't have the link at hand), I read using swapfiles should be preferred instead of swap partitions: so, in my opinion, resuming from swapfiles *should* be supported.
At the end of the script '/usr/share/initramfs-tools/scripts/local-
premount/resume', you can find this:
SWAPTYPE=$(wait-for-root "${resume}" ${RESUMEDELAY:-5})
case "${SWAPTYPE}" in
swsuspend|s1suspend|s2suspend|ulsuspend|tuxonice)
if [ -x /bin/plymouth ] && plymouth --ping; then
plymouth message --text="Resuming from $resume"
fi
# hardcode path, uswsusp ships an resume binary too
if [ -n "${resume_offset}" ]; then
/bin/resume ${resume} ${resume_offset} >/dev/null 2>&1
else
/bin/resume ${resume} >/dev/null 2>&1
fi
;;
esac
So: 'wait-for-root' does *NOT* only wait for the partition to become active, it also detects *IF* any hybernation occurred and it decides the kind of hybernation data.
Question: if 'wait-for-root' doen't know about the offset of my swapfile, how can it know if my pc was hybernated or not?
The 'resume' program, in my case and in my opinion, is *NOT* executed at all, so it can't be its fault.
Thank you for your help on this matter, I really appreciate it!
--
Resume from disk (swapfile) fails
https://bugs.launchpad.net/bugs/554009
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to initramfs-tools in ubuntu.
More information about the kernel-bugs
mailing list