Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I switch from Ubuntu and Windows 7 (and vice versa) while working remotely?

Actually, I'm using the Windows loader (BCD) on MBR, and I have two choices:

If I'm working on Windows 7 and want to boot to Ubuntu, it's easy, because I set Ubuntu as default. So at restart, the system goes directly to GRUB (with timeout sets to "0") and Ubuntu is there.

But how could I get back to Windows again? Is there a chance?

While typing I was wondering if I could solve this trouble forcing the Windows loader to Ubuntu and let GRUB2 to choose from different systems.

Could it work?

share|improve this question
I expected the system to just stay running, assuming it's a server, because it's remote. But if not, it should be possible to wake it up with wake on lan (WOL), booting the system you configured before shutdown. – Volker Siegel Aug 22 '14 at 8:14

Good that you already solved the part of switching from Windows to Linux. The other direction is not that hard:

There is the command grub-reboot that does just what you need - see below for detais:

If your grub menu entry for the system you want to boot is "Windows", you would just do:

$ grub-reboot Windows

If you configure the hardware to boot after a power failure, I see no reason the computer could not just stay running.

But if not, it should be possible to wake it up with wake on lan (WOL), booting the system you configured before shutdown. The WOL works with "special" network packages that can not be routed outside the local network, so there is a device needed in that network, like a some DSL router or any computer.

From man 8 grub-reboot:

 GRUB-REBOOT(8)     System Administration Utilities      GRUB-REBOOT(8)

        grub-reboot - set the default boot entry for GRUB, for the next
        boot only

        grub-reboot [OPTION] MENU_ENTRY

        Set the default boot menu entry for GRUB,  for  the  next  boot

        [  ...  ]
               expect  GRUB images under the directory DIR/grub instead
               of the /boot/grub directory

        MENU_ENTRY is a number, a menu item title or a menu item  iden‐
        tifier. Please note that menu items in submenus or sub-submenus
        require specifying the submenu components  and  then  the  menu
        item  component.  The  titles  should  be  separated  using the
        greater-than character (>) with no extra spaces.  Depending  on
        your  shell some characters including > may need escaping. More
        information about this is available in the GRUB Manual  in  the
        section about the 'default' command.
        [  ...  ]

Run man -k grub for a list of related command - eg. grub-set-default may help you too.

share|improve this answer
With the option boot the system for the menu entry number n would it still be possible to boot to Linux from Win? I guess that the grub would load the n'th record every time. Thus preventing you from switching to Linux. – jnovacho Aug 22 '14 at 10:03
Good point! Yes, I think there is an option to make that work only for one time booting. Also, you can compine it with the normal menu timeout. – Volker Siegel Aug 22 '14 at 10:05
Look at the edit for an interesting update :) – Volker Siegel Aug 22 '14 at 10:27

Your Answer


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.