25

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?

mattdm
  • 40,245
  • This is a thanks to Michael and an extension. There is a free driver by Paragon in public interest, which can access (with read and write permissions) to Ext2, Ext3, Ext4 partitions from Windows: https://www.paragon-software.com/home/extfs-windows/ –  Apr 23 '15 at 09:49

6 Answers6

7

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

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
6

You can use Grub2Win or other similar programs as listed here. They offer an easy user interface.

You could also completly remove Grub and boot both systems from the Windows bootloader. In order to do so you need to use tools such as EasyBCD.

skan
  • 161
4

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

forcefsck
  • 7,964
4

Mixing different hints:

  1. Under Ubuntu I changed GRUB_DEFAULT=0 to GRUB_DEFAULT=saved and ran update-grub, thus making GRUB use /boot/grub/grubenv file, but I am not setting GRUB_SAVEDEFAULT=true (as it serves another purpose)
  2. I checked available GRUB entries using this command: awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg
  3. Later I ran grub-editenv - set saved_entry="Windows 10 (on /dev/sdb1)" choosing one of the available options, so I made Windows start next time as default
  4. Under Windows I mounted Linux (ext4) filesystem using Ext2Fsd
  5. I edited /boot/grub/grubenv manually, commented out with # the previously created line # saved_entry=Windows 10 (on /dev/sdb1) and added a new one saved_entry=Ubuntu.
  6. Under Ubuntu I do it vice-versa, switching between the settings, commenting out the respective line.

I think it's a neater solution than manually editing grub.cfg file directly and menu.lst has been deprecated already some time ago.

olin000
  • 159
  • 1
    this worked fine for me except the Ext2Fsd with my Ext4 partition. I installed the 0.70 beta 3 Ext4 filesystem driver for Windows from http://www.accum.se/~bosse/, enabled the testsigned driver, rebooted windows and boom: read/write Ext4 access. :) – István Siroki Apr 26 '23 at 21:01
1

Find the 'grub' folder in the hard disk and then open menu.lst with notepad now edit default=0 to default=x, where x is one less than the position of the os you want to make default. For Ex. there are three os in a system and you wanted to make the third in the list as default so you will edit it as default=2, as 3-1=2. For second os, default=1.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
0

I created a /boot device and selected it as Device for boot loader installation and it worked.

Mohsen
  • 101