Booting another system after suspending to disk ?

Hi !
i’m using the suspend to disk feature, but when we reboot after suspending to disk, grub automatically boots openSuse again …

I have a multiboot with windows xp, and i would like to quickly switch between the 2 systems, by using suspend to disk on both.

Is it possible to prevent the automatic boot of openSuse after it suspends to disk ?

thanks

up,
thanks

plz if you know how to tweak the s2disk behaviour …

I’ve also looked a long time for this feature and found finally a workaround.

Note: it may be dangerous!

  1. when you suspend to disk your current memory image is fully saved into your swap disk; if by error or mistake you reuse your swap by other OS - your initial resume will be broken and you may lose a part of your data!

  2. to prevent this possible mistake, hibernate procedure before suspend will update your GRUB setting in way when you power-on your desktop you go directly to resume and not leave you any other choice…

The workaround: just to disable this last step (leave GRUB as it).

All you need is to open as ‘root’ user the ‘/usr/lib/pm-utils/sleep.d/99Zgrub’ file, go to the end of the file, and put comments before ‘prepare-grub’ and ‘grub-once-restore’:


###### main()

case $1 in
        hibernate)
                prepare-grub
                ;;
        thaw)
                grub-once-restore
                ;;
esac

Change to:


###### main()

case $1 in
        hibernate)
####                prepare-grub
                ;;
        thaw)
####                grub-once-restore
                ;;
esac

And enjoy :slight_smile:

Rgds,
-dim

On Fri, 22 Aug 2008 10:26:01 GMT
dim7 <dim7@no-mx.forums.opensuse.org> wrote:

>
> I’ve also looked a long time for this feature and found finally a
> workaround.
>
> Note: it may be dangerous!
>
> 1. when you suspend to disk your current memory image is fully saved
> into your swap disk; if by error or mistake you reuse your swap by other
> OS - your initial resume will be broken and you may lose a part of your
> data!

Wouldn’t it be easier to just not share the swap partition between operating
systems? Give each operating system it’s own swap partition, then you can
hibernate/suspend each one, and ‘pop’ into another OS quickly as it restores
from it’s own saved state.

Loni


L R Nix
lornix@lornix.com
But it was RIGHT here…!

Wouldn’t it be easier to just not share the swap partition between operating
systems? Give each operating system it’s own swap partition, then you can
hibernate/suspend each one, and ‘pop’ into another OS quickly as it restores
from it’s own saved state.

It’s what I always do :slight_smile:
I never seen such behavior before move to openSUSE :slight_smile:

Probably such solution was applied due numerous user errors? - I don’t know, and, honestly - I’ll prefere to have a checkbox during hibernate and just to say want you boot or not another OS on resume…

But well, until you know what you’re doing - you’ll always find a workaround :slight_smile:

Rgds,
-dim

I’ve added all this info into wiki: Suspend to disk - openSUSE

I’ve found another point why there is no GRUB menu after hibernate: by default SUSE is not taking care about any mounted partitions!