Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

3 Answers

up vote 6 down vote accepted
+50

Not sure if I understand your question correctly, but 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. Would this be able to solve (some of) your problems?

I forgot if the number argument started to count at 0 or 1, but try them both and feel free to edit this post with the answer. Either way names are probably safer to use, as the grub menulist occasionally adds new items when you update your kernel.

share|improve this answer
    
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
add comment

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.

share|improve this answer
    
I'm actually not looking to revert to EXT3 from EXT4, Thanks for the suggestion though. –  Jeff F. May 19 '11 at 14:29
add comment

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.

share|improve this answer
    
That is not practical in my case, I use Windows for entertainment(Games). VMs are not practical for this case. –  Jeff F. May 20 '11 at 14:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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