On Thu, Apr 13, 2006 at 10:22:02PM +0200, Luka Renko wrote: > Hi! > > I have some strange reports where booting with grub fails after sucessful > suspend to disk/resume on Kubuntu Dapper. Boot fails with "error 15 : file > not found " and by investigating further, it looks like this is caused > by "savedefault" directive that wants to write to > non-existing /boot/grub/default file. > > When I investigated further, it looks like this is caused by the code in > sleep_helper_functions file in functions grub-once() and grub-once-restore(). > Problem is that Ubuntu does not have "grubeonce" utility (not sure why), > therefore grub handling of powersave is not possible.
ok. i did obviously not think of this case. > I think the proper fix for this problem would be to move the "rm" command > inside "if" statement in order to get it executed only when the original copy > was saved in grub-once(). Or even better, remove "rm" completely and add "-f" > option to "mv" command. > I have attached proposed patch. This is correct if you do not have grubonce, but not if you have it, because grubonce creates a /boot/grub/default if it does not exist, so i need to remove it afterwards if suspend fails. Scenario with your fix: - no /boot/grub/default exists - start suspend - nothing there -> nothing saved - grubonce creates .../default - suspend fails - nothing saved -> .../default not removed - next boot: no menu. I'll fix this, but i am on vacation for a week now. Please just keep your patch until i have fixed this, i will do this soon after i am back at work. (i'll just record the state of /boot/grub/default in /var/lib/suspend2ram-state and decide on resume if it needs to be removed or not). Sorry for the inconvenience. -- Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen _______________________________________________ powersave-devel mailing list powersave-devel@forge.novell.com http://forge.novell.com/mailman/listinfo/powersave-devel