[Bug 14908] Re: [Bug 14908] Re: swsusp fails after automatic kernel upgrade
Matt Zimmerman
mdz at ubuntu.com
Mon Apr 10 17:30:25 UTC 2006
On Mon, Apr 10, 2006 at 01:35:30PM -0000, John Cooper wrote:
> At first glance I added this to the top of /etc/acpi/hibernate.sh.
>
> grubkern=`awk 'BEGIN { kern=0 } {if ( $1 == "default" ) f=$2; if ( $1 == "kernel" ) if ( f == kern ) { gsub(".*z-","",$2 ) ;print $2 ; ( kern = kern + 1 ) } }' /boot/grub/menu.lst`
>
> if [ $grubkern != `uname -r` ] ; then exit 1 ; fi
>
> It just checks the default kernel is the same as the running one. Pretty hacky but it works! Might be nice if it could return a messages to the user somehow rather than just quitting.
>
> In the end I thought that maybe grub-update should perhaps write out a file when it notices a change in default kernel.
That looks like it would only work in the case of a kernel ABI change, since
the filename doesn't change otherwise (though hibernation resume would still
fail).
Perhaps we should arrange for newly-installed kernels to always drop/touch a
file, and on reboot, remove it. That would provide a reliable test.
Matthew, what do you think?
--
- mdz
--
swsusp fails after automatic kernel upgrade
https://launchpad.net/malone/bugs/14908
More information about the kernel-team
mailing list