LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-11-2015, 09:26 AM   #1
fabe856
Member
 
Registered: Apr 2012
Posts: 109

Rep: Reputation: Disabled
Want Windows 7 to boot first than Fedora 23


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
 
Old 12-11-2015, 11:42 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,029

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
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.
 
Old 12-11-2015, 12:00 PM   #3
fabe856
Member
 
Registered: Apr 2012
Posts: 109

Original Poster
Rep: Reputation: Disabled
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 ###

Last edited by fabe856; 12-11-2015 at 12:15 PM.
 
Old 12-11-2015, 02:15 PM   #4
wagscat123
Member
 
Registered: Jan 2009
Location: Maryland-Pennsylvania border, USA
Distribution: openSUSE 42.2, Tumbleweed, OS X 10.10, Ubuntu 16.10, and Linux Mint 17.3/18.1
Posts: 598
Blog Entries: 9

Rep: Reputation: 71
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.
 
Old 12-11-2015, 03:58 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,029

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
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.

Last edited by yancek; 12-11-2015 at 07:30 PM.
 
Old 12-11-2015, 05:49 PM   #6
Doug G
Member
 
Registered: Jul 2013
Posts: 669

Rep: Reputation: Disabled
In fedora 23, just use the grub2-set-default script.

You may have to re-run after any dnf kernel upgrades.

Last edited by Doug G; 12-11-2015 at 05:50 PM.
 
Old 12-11-2015, 09:05 PM   #7
fabe856
Member
 
Registered: Apr 2012
Posts: 109

Original Poster
Rep: Reputation: Disabled
Thanks for the help. It is done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
EFI boot manager: making it the default (NOT a dual boot issue) Something Else Linux - Software 1 05-15-2013 11:12 AM
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
[SOLVED] Making windows7 default boot moonmoth Linux - General 2 07-12-2011 03:04 PM
Setting Windows XP to boot by default on Fedora 7 abhaybits Fedora 2 08-24-2007 07:45 AM
Making Fluxbox the Default Display Manager in Fedora Core II pcflight Linux - Software 3 09-29-2004 10:20 AM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration