[SOLVED] Want Windows 7 to boot first than Fedora 23
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed Fedora 23 on a separate partition a windows 7 system. Whenever, I start my system, it opens Fedora by default. How can I change it, so that windows 7 opens by default. I even made a change to the file /etc/default/grub by replacing GRUB_DEFAULT= saved to GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda1)". But it did not solve my problem.
Last edited by fabe856; 12-11-2015 at 10:40 AM.
Reason: No response
You need to change the GRUB DEFAULT to the correct number. If windows is on the first partition, you would simply enter a 0 (zero). Count down the menu entries to the windows and put that number there if it is not the first remembering that Grub counts from zero in this instance.
Where can I find the menu entry? My grb.cfg shows
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
set pager=1
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
source ${prefix}/user.cfg
if [ -n ${GRUB2_PASSWORD} ]; then
set superusers="root"
export superusers
password_pbkdf2 root ${GRUB2_PASSWORD}
fi
fi
### END /etc/grub.d/01_users ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora (4.2.3-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.2.3-300.fc23.x86_64-advanced-51417380-1146-41ee-8864-c37bc52b8ac5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 894fdbb4-b044-4a46-b05a-d9b9983a4b07
else
search --no-floppy --fs-uuid --set=root 894fdbb4-b044-4a46-b05a-d9b9983a4b07
fi
linux16 /vmlinuz-4.2.3-300.fc23.x86_64 root=/dev/mapper/fedora_host223-root ro rd.lvm.lv=fedora_host223/root rd.lvm.lv=fedora_host223/swap rhgb quiet
initrd16 /initramfs-4.2.3-300.fc23.x86_64.img
}
menuentry 'Fedora (0-rescue-6baab59859bc4b6486ae8773ff8787cc) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-6baab59859bc4b6486ae8773ff8787cc-advanced-51417380-1146-41ee-8864-c37bc52b8ac5' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 894fdbb4-b044-4a46-b05a-d9b9983a4b07
else
search --no-floppy --fs-uuid --set=root 894fdbb4-b044-4a46-b05a-d9b9983a4b07
fi
linux16 /vmlinuz-0-rescue-6baab59859bc4b6486ae8773ff8787cc root=/dev/mapper/fedora_host223-root ro rd.lvm.lv=fedora_host223/root rd.lvm.lv=fedora_host223/swap rhgb quiet
initrd16 /initramfs-0-rescue-6baab59859bc4b6486ae8773ff8787cc.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-84EE9735EE971F0C' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 84EE9735EE971F0C
else
search --no-floppy --fs-uuid --set=root 84EE9735EE971F0C
fi
parttool ${root} hidden-
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
The orthodox way to do this that (if I'm not mistaken) will be remember your defualt choice whenever the GRUB config is automatically updated again is to use the command grub2-set-default rather than grub.cfg (it's a bit trickier than the menu.lst days). I'd count which entry you want then run
Code:
grub2-set-default n
where n is the entry you want. Also, it might be grub-set-default in Fedora.
Based on the grub.cfg file you posted you would put the number 2 in that line as your windows entry is the 3rd entry in the list. Then run the grub-mkconfig script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.