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:
- Windows 7
- Ubuntu 14.04 (Trusty Tahr)
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?
Best Answer
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
:Run
man -k grub
for a list of related command - eg.grub-set-default
may help you too.