[Bug 554009] Re: Resume from disk (swapfile) fails

Chow Loong Jin hyperair at ubuntu.com
Fri Apr 30 08:50:17 UTC 2010


Okay, so I've been taking a look into this as well in order to fix
hibernation on my system which uses TuxOnIce. My issue seems to be
related to the wait-for-root check returning "swap" rather than
"tuxonice" despite there being a tuxonice signature on it. Digging
further, this would appear to be blkid (from util-linux)'s fault, which
I am now downloading debugging symbols to check.

Further investigation has shown me that initramfs-tools has worked
previously because the resume was attempted unconditionally, but now it
is bound by a userspace swap signature check (which fails miserably).

Now, it seems that wait-for-root does two things:
1. Wait for device
2. Check for signature
3. Return the swap type (swap|s1suspend|tuxonice|.... )

However, the signature checked in #2 is actually checked in fixed
locations, i.e. the superblock of the swap. Since you use resume_offset,
the signature is no longer in the said superblock of the file passed in
resume=. For my case, the check against the TuxOnIce signature is
failing for some mysterious reason or other, which I am yet to find out.

That basically defines the whole problem, as I understand it right now. From here on, I see two possible solutions to fix this:
1. Improve wait-for-root, udev, and blkid to be able to check for signatures even with resume_offset. This will not be easy, and will result in lots of code changes. TuxOnIce detection will also be needed, of course.

2. Bring back the previous behaviour, i.e. tell the splash that it's
attempting to resume, attempt to resume, and if resume failed, update
the splash and go along its merry way. This is the easiest path, and
will definitely not result in false negatives.


For method #1, I think the *real* method to fix this would be to somehow hook up to the signature-detecting logic within the kernel, to avoid duplication of this code. The current solution duplicates the kernel checks, and badly, hence resulting in this bug.

For method #2, we'll have to worry about the UI, since the resume text
will now appear on plymouth. Alternatively we could just remove it
altogether, or like the patch Moreno attached, just try resuming anyway
in the event that blkid reports a negative, so that we can catch false
negative cases.

If possible, I'd like like this as a SRU.

-- 
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