Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i'm looking around, if anyone have a suggestion on how to switch from Ubuntu and windows 7 (and viceversa) while working remotely.

Actually, i'm using the windows loader (BCD) on MBR, and i have 2 choice: Windows 7 Ubuntu 14.04

If i'm working on WIndows 7 and want to boot to Ubuntu, its easy, because i set as default Ubuntu. So at restart, system go directly to GRUB (with timeout sets to "0") and Ubuntu is there.

But how i could get back to Windows again ? There is any chance ?

While typing i was wondering if i could solve this trouble Forcing Windows loader to Ubuntu and let GRUB2 to Choose from different systems.

Could be 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 at 8:14

1 Answer 1

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)


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

 SYNOPSIS
        grub-reboot [OPTION] MENU_ENTRY

 DESCRIPTION
        Set the default boot menu entry for GRUB,  for  the  next  boot
        only.

        [  ...  ]
        --boot-directory=DIR
               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 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 at 10:05
    
Look at the edit for an interesting update :) –  Volker Siegel Aug 22 at 10:27

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.