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.

  • 1
    if you were running bcd (you can switch from grub to bcd with easybcd, you could use ireboot to select what OS to run from windows. Both programmes mentioned are at neosmart.net. Unfortunately, this won't help with grub, you could edit the grub config file each time you reboot, but thats unwealdy – Journeyman Geek May 19 '11 at 14:23
  • @Journey The problem comes in here: I use EXT4 and I'm not so willing to revert back to EXT3. Windows has no way to write to EXT4 ATM. – Jeff F. May 19 '11 at 14:27
  • sure it does. ext3fsd does ext4. – Journeyman Geek May 19 '11 at 23:29
  • I believe it can but this is very unreliable from what I understand. I'd rather not chance frying my partition. – Jeff F. May 20 '11 at 14:19
  • well, switching to BCD is the solution then - then you can use ireboot to select what you boot from - its a simple matter of running easybcd on your windows install, getting it to install BCD and chainload linux, and running ireboot to select which one you want. – Journeyman Geek May 20 '11 at 14:31

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 <bug-grub@gnu.org>.
$ 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.

  • Very cool and exactly what I needed. I wrote a small script and tossed it on my Ubuntu Desktop which reboots to Windows. Thanks! – Jeff F. Jan 5 '12 at 20:51

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.

  • I'm actually not looking to revert to EXT3 from EXT4, Thanks for the suggestion though. – Jeff F. May 19 '11 at 14:29

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.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.