Hi. On 08/04/10 05:52, Richard Zidlicky wrote:
Hi,trying to fix this crash situation: /boot/vmlinuz-XXX exists and is the currently running kernel, I decide to reconfigure and recompile it, overwrite /boot/vmlinuz-XXX and hit pm-hibernate. Currently 01grub does not recognize that the kernel image vmlinuz-XXX is not identical with that of the running kernel and will suspend. Resume fails with "version mismatch". I have cooked up this patch as a fix to avoid the problem. It would be nice to do something more sophisticated but I do not know how to figure out the exact version from the saved image in a portable way without draging in exotic dependencies. Another option would be to compare the date stamp with uptime if boot.log is something distribution specific - slightly more difficult scripting-wise and not sure if it is needed. Supposed to work on Fedora but not really tested yet. --- 01grub.rz 2010-04-07 19:52:02.000000000 +0200 +++ 01grub 2010-04-07 21:22:30.000000000 +0200 @@ -15,6 +15,7 @@ [ -x /sbin/grubby -a -x /sbin/grub ] || return $NA [ -e "/boot/vmlinuz-$(uname -r)" ] || return 1 + [ /var/log/boot.log -ot "/boot/vmlinuz-$(uname -r)" ]&& return $NA out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index) [ -n "${out}" ] || return 1 current=${out#index=}
With anything relatively recent (post about 2.6.27 IIRC), this should be unnecessary. Code has been added so that you can hibernate with one kernel and resume with another.
Regards, Nigel _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
