Ask Your Question

Switch between Windows 10 and Fedora 23 before reboot.

asked 2016-03-03 21:01:24 -0500

Svelah_Kaldra gravatar image

updated 2016-03-04 11:42:42 -0500

I was wondering if there was any way to reboot directly to Fedora or Windows and bypass the boot-loader. So rather than just rebooting and selecting what OS to boot I could select the OS I want before rebooting (defaulting to the same OS preferably) and have it skip the boot-loader. Anyone know of a way to do this or is it not really possible?

Edit I have done what Aeyoun suggested I've yet to test it but I believe that will work for defaulting to reboot to the same OS.

I have also attempted to make a script from what Isatenstein sugest but can't get it to work. I'm getting the error "line 16: syntax error: unexpected end of file" Here is the code:

until [ $keyPress = "w" ] || [ $keyPress = "f" ]
    echo "To boot windows press w ; to boot fedora press f"
    keyPress=$(read -n  1 -s);
    if [ "$keyPress" = "w" ]
        grub-set-default "Windows Boot Manager (on /dev/sda2)"
    if [ "$keyPress" = "f" ]
        grub-set-default "Fedora (4.2.3-300.fc23.x86_64) 23 (Workstation Edition)"
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-03-04 08:46:20 -0500

Aeyoun gravatar image

Grub can be configured to remember the last choice you made and use that choice the next time you boot. So you could run Windows Update or Fedora Update and have it restart two–ten times as needed while it installs updates without having to sit there and wait to make the right choice in grub. You only need to interact with grub when you want to change what system you boot into.

Add these two lines to the bottom of /etc/default/grub:


Then rebuild your grub configuration, but the exact instructions differ for legacy BIOS and EFI systems.

edit flag offensive delete link more

answered 2016-03-04 07:19:57 -0500

lsatenstein gravatar image

READ the Man pages for grub2-set-default.

With grub2-set-default you can choose the default operating system or version that will be rebooted.

Run that command before you reboot, or put it into a script file.

edit flag offensive delete link more

Question Tools


Asked: 2016-03-03 21:01:24 -0500

Seen: 327 times

Last updated: Mar 04 '16