Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I currently dual boot Windows 7 and Fedora 14, using GRUB, with Windows 7 as my default. I know that from Fedora, I can set GRUB to boot into Fedora, overriding the default, on the next reboot. Is there a way to do this from Windows? That is, can I change the GRUB configuration permanently or semi-permanently from Windows so I don't have to be in front of my computer to boot into Fedora?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The hard part is editing your Linux filesystem from Windows. FS Driver supports writing ext2, but I don't know of any good tools for ext3 or 4 (and these SU and SF questions aren't encouraging), let alone any other filesystems you may have used on your boot partition

But if you do manage to get write support for your boot partition from Windows, actually changing the saved default is easy. First you need to do some prep work in /boot/grub.conf. Change default to saved, and add savedefault 0 (where 0 is Fedora's index in the GRUB configuration) to the Windows block so booting into Windows will reset the saved default back to Fedora

Then from Windows you can edit /boot/grub/default. Delete the line that's there (it'll be default or 0 most likely), and change it to 1 or whatever the index of your Windows install is. When you restart, GRUB will read that file (since your default is saved) and boot into Windows, and the savedefault line will change that file back to 0 for future boots

share|improve this answer
1  
Someone's written a GUI for that: grub-choose-default (Grub 1), grub-choose-default (Grub 2). –  Gilles Apr 16 '11 at 12:55
    
This worked for me. I had to set my /boot partition as ext2 (it was ext4) and my limited experience doing that made that process take longer than it should have. It looks like these instructions set Fedora as the default (which I don't really want, I just want the ability to control the next boot) so I didn't follow them to the letter, but being able to edit /boot/grub.conf is good enough. –  Jimmy Sawczuk Apr 16 '11 at 21:25
add comment

If you have a /boot partition formatted as FAT32, you'll be able to edit grub's config file from both OS(es).

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