Boot to Windows once from Grub then back to Ubuntu on next boot

I do a lot of remote work on computers and my home comptuer has 2 OSes: Ubuntu and Windows 7. I would like to be able to switch to Windows occasionally but this is impossible without losing my ability to boot back to Ubuntu later.

Essentially I'd like to be able to boot once to Windows then on next reboot go back to Ubuntu, is there any way to do this?

Edit: I am currently using EXT4, I do not want to revert to EXT3.

5

3 Answers

From Ubuntu you can call grub-reboot

$ grub-reboot --help
Usage: /usr/sbin/grub-reboot [OPTION] entry
Set the default boot entry for GRUB, for the next boot only. -h, --help print this message and exit -v, --version print the version information and exit --root-directory=DIR expect GRUB images under the directory DIR instead of the root directory
ENTRY is a number or a menu item title.
Report bugs to <>.
$ grub-reboot 12

to boot to Grub option 12 once on the next boot, after which it will revert back to the default.

The first entry will be 0. Names, however, are probably safer to use, as the grub menulist occasionally adds new items when you update your kernel.

1

The only way I could think of of is to mount the boot partition of ubuntu under windows 7, therefore it must be ext 3 or 2, and edit the grub boot file. Same thing when you want to do it the other way around, which is simpler.

1

Not exactly an answer to your question, but if you need Windows just once in a while, you could consider running it in a virtual machine, e.g. KVM or Virtualbox. Then you don't have to reboot your computer.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like