How to Change Grub Boot Order "On Demand" (from running Windows)
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to Change Grub Boot Order "On Demand" (from running Windows)
The PC has ubuntu 12.04 LTS and WinXP installed. It is physically inaccessible. It is usually booted by WOL (wake-up over LAN). As it is, the preferred GRUB default is to boot XP. Question: Is there a way to initiate a Windows reboot, shut down Windows but then boot ubuntu instead? e.g. leave "something" somewhere for grub to see and boot ubuntu rather than the "hard-coded" default.
You could mount the boot partition ( with something like http://www.ext2fsd.com/ )
Edit the grub.cfg altering the default ( i'd use gvim for windows).
Umount /boot
You could then reboot and the new grub.cfg should 'kick in'
You could if you knew which menuentry Ubuntu was in its grub.cfg file. In all likelihood, it is the first. You would also need to know which entry xp is. You would also need a timeout set for Grub, the standard is usually 10 seconds. Then you could arrow up to the Ubuntu entry, hit the Enter key and have grub boot Ubuntu. If there is no timeout, this obviously won't work and you will have to get into something more complex.
I'm not sure why you would have the bootloader of one system default boot to another system which is incapable in a default installation of writing to the other system, or even reading or recognizing it. I've not used WOL but, from your post I expect you don't see any menu?
The suggestion above of editing the grub.cfg file should work but if you don't make the same edit in /etc/default/grub, it will be gone after a grub update. I guess that won't be a problem though if you can't boot it?
kinda strange to me in my experience grub/grub2 in dual boot scenarios has always defaulted to Ubuntu.
The Grub default boot entry will be the one from the system to which it is attached, in this case Ubuntu. The OP or someone obviously changed it although given the setup, I can't imagine why. Apparently not much thought was given to this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.