1

So I remote into my computer quite a bit, and I have a dual boot to Windows 10 and Ubuntu 20.04.1 with the grub menu set to default to last used.

I have seen posts suggestion to boot from Ubuntu to Windows by changing the default, but I don't want to update the grub menu every time and I need some way of rebooting from Windows into Ubuntu.

Is there any way you can somehow tell Grub to boot into a particular option on next reboot, but not change the default?

And if this is possible, has anyone written a script or program to do this from within Windows?

MicWit
  • 721
  • 2
  • 9
  • 21
  • 3
    Looks like this may be a duplicate of https://askubuntu.com/questions/635205/link-to-restart-from-windows-to-ubuntu, which seems to have some working answers. I've not tried any of the answers, but it looks possible. – KGIII Aug 10 '20 at 02:57
  • 2
    I have one here that I have been working on where if you have it default booting into Ubuntu, you can command line reboot it to Windows without modifying grub at all. https://askubuntu.com/a/1017464/231142 – Terrance Aug 10 '20 at 03:19
  • I haven't tried it yet, but the concept of grub-reboot looks good, however, I can't run grub reboot from Windows of course. I will investigate the concept of /boot/grub/grubenv and see if I can create something I can put as an answer here (that will be both Windows to Ubuntu AND Ubuntu to Windows, most questions/answers are only rebooting one way, this question will be for both ways). – MicWit Aug 11 '20 at 22:24
  • @MicWit My comment there is to have GRUB as the default loader that defaults to Ubuntu, that way you ssh to Ubuntu you can run the command that will have it reboot to Windows. When you're done and exit Windows and reboot the system, it will automatically go back to Ubuntu. I have not found a way to really edit the Windows BCD with a batch file or script very well. – Terrance Aug 14 '20 at 02:01
  • The issue with that is I would loose the ability to have grub boot last booted, so that won't work for me. When I get a bit more time I will look at the option of setting the file as in https://askubuntu.com/questions/635205/link-to-restart-from-windows-to-ubuntu and set up an ext4 driver on windows. At the moment I can't get Chrome remote desktop working in Ubuntu anyhow so need to fix that first. – MicWit Aug 14 '20 at 23:36

0 Answers0