Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently installed Windows alongside my OpenSuse installation. Now I have a plan for quick booting and switching of OS's, but I need someone to tell me if this is indeed possible.

1- How do I go about optimizing the boot up speed of OpenSuse AND Windows? I've looked at e4rat for linux and think this might be a good place to start. Is there something similar for windows?

2- Is it possible to send information to GRUB from OpenSuse or Windows? This is what I'm trying to do:

  • Be in OpenSuse environment, open up a shell and type some command or run some script to tell my computer to restart and to tell GRUB to boot windows instead of asking me.
  • Do some stuff in windows then run something to reboot and tell grub to boot OpenSuse without asking.

My goal here is achieving a very short OS switch, so I can change on the fly. Am I dreaming?

share|improve this question
1  
Have you considered running one of the Operating Systems in a virtual machine? –  cularis May 15 '11 at 13:01
    
Yes and I decided that I would rather run it physically. I am using windows for gaming and if I was to virtualize and cut ressources it would hinder the speed of the games. –  MaxMackie May 15 '11 at 13:06

1 Answer 1

up vote 3 down vote accepted

Don't know about speeding up the boot, but have a look at GrubChooseDefault if you're lucky enough to have a modern grub version.

You still need the partition that holds your grub configuration to be visible from windows (the link above has pointers for that), so it's not ideal.

The info below assumes your grub files are in /boot/grub, and that it is mounted.


If your 'primary' OS is OpenSuse, and only occasionally boot into Windows, you could do a simple trick like this in grub.conf (or menu.lst):

default saved

title OpenSuse
....
savedefault 0

title Windows
....
savedefault 0

This will make the default revert back to OpenSuse all the time. For a one-shot boot to Windows, you could use a script like this:

#! /bin/bash
grub-set-default 1
reboot

from OpenSuse. The next boot will go to Windows, a reboot after that will go back to OpenSuse.


If your grub.conf is visible from windows, you can do something more normal:

default saved

title OpenSuse
....
savedefault

title Windows
....
savedefault

Then do this:

grub-set-default 1
cp /boot/grub/default /boot/grub/default.windows
grub-set-default 0              # unless you want to boot to windows next

(Edit the paths to match your install of course.)

From linux, you can use the previous script to boot back to Windows. From Windows, assuming that partition is mounted on x:, write a script to do:

copy /y x:\boot\grub\default.windows x:\boot\grub\default
shutdown /r

(see here for a PowerShell version on shutdown)

Call that script when you want to boot back to OpenSuse.

share|improve this answer
    
Amazing answer! +1000 if I could –  MaxMackie May 15 '11 at 14:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.