LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 11-25-2007, 06:37 AM   #1
bussardvago
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
linux "suspend to disc" then restart into windows partition, not working?


hello,

i am using windows xp and suse 10.2 with dual boot via grub loader on my computer.

under linux there is a option "suspend to disc", so that i can switch off the computer and start working at the same position after a restart.
my problem is, i want to use this option for conveniency to switch to windows system.

this is so far not possible, since after "suspend to disc", the computer automatically boot into linux partition, without ask me for the selection of the OS.
i can see the first two lines of grub loader, but then the computer directly starts linux.

how can i solve this problem?

thanks for answers.

bussard
 
Old 11-26-2007, 08:02 AM   #2
Findus
Member
 
Registered: Nov 2006
Distribution: Fedora 8
Posts: 64

Rep: Reputation: 15
I don't think you can. My Fedora 7 box does this too. I think the only thing you can do, if you want to be able to start Windows the next time you boot your computer is to shut it down completely. I am not sure about this, though, someone might have a solution for you, that actually allows you to use both suspend to disk and allows you to choose OS at boot time.

In the mean time you could set KDE to restore previous session under Control panel --> KDE components --> session manager. If suse has some kind of special control panel, either find your way around that by your self, or start the KDEs standard one with alt+f2 and the command
$ kcontrol

- Findus
 
Old 11-26-2007, 08:34 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
It seems to me that "suspend to disc" is intended to save your environment so that you can go back to it later. This has no value or meaning if you are going to go back to Windows--or even to another Linux distro.

If you tell us what you are trying to do, then there might be another solution.

Note that SUSE has an option in the shutdown menu to automatically restart in other OSes.
 
Old 11-26-2007, 11:14 AM   #4
google01103
Member
 
Registered: May 2006
Distribution: Suse 10.2 x64
Posts: 247

Rep: Reputation: 31
I think the reason for this behavior (you should Google) is that the "state" of your system is saved to your /swap partition (by default) and since other distros might be installed and they would use the same swap partition this behavior keeps the "saved to disc" image from being over-written if one of the other distros were loaded. That you want to load Windows which is not using /swap is not handled by grub.
 
Old 01-07-2008, 07:12 PM   #5
vicere
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 0
Lightbulb A possible solution

Hi bussard vago,

I concur with you that being able to suspend to disk in Linux and reboot in another operating system is important!

And I claim it is easily possible and safe.

The reason why by default it does not work is that the pm-utils utilities modify the GRUB loader upon suspension, in order to have the suspended system rebooted automatically the next time.

This is done by a script that can be modified.

Here is the procedure
  • Become super-user.
  • Go to the directory /usr/lib/pm-utils/sleep.d
  • Locate a file called something like 99Zgrub
  • Make a copy of this file for security, NOT in the same directory.
  • Edit the file and locate in it the function
    grub-once()
    {
    ....
    }
  • Comment all the code of the function using # characters
  • Write below another grub-once() function as follows:
    grub-once()
    {
    echo -e "savedefault --stage2=/boot/grub/stage2 --default=$1 --once\nquit" | grub --batch
    }
  • Save the file.

You can now suspend to disk. Upon reboot, you will be offered the GRUB menu and be able to choose Linux again (and the system will resume from disk) or to choose another operating system.

Disclaimer: I tested this solution under OpenSuse 10.3; I am not sure it works also under version 10.2; but it should.

Cheers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"service __ restart" bash command isn't working case1984 Linux - Newbie 9 04-10-2008 02:35 PM
Lost "Shutdown" and "Restart" From system menu in FC6 Nader1 Linux - Software 3 02-12-2007 04:40 PM
"Shutdown" and "Restart" option missing after upgrade hansalfredche Mandriva 8 11-02-2006 07:23 AM
difference between "suspend to standby" and "suspend to ram" nappaji Linux - Hardware 1 08-23-2006 08:17 PM
FC3 rescue disc won't mount "Linux LVM" partition anymore. coolingtower Linux - General 0 01-23-2005 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration