Fedora Linux Support Community & Resources Center
  #1  
Old 23rd January 2013, 05:16 AM
sslb lihou Offline
Registered User
 
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6
windows_7ie
Changing default boot Fedora 18

Hi.
I've read everything relevant to this on previous threads, still unable to change my boot sequence.
Need to know how to find the boot entries, how to change default boot, how to save and modify the bootloader after.
Appreciate some instruction at this point. Thanks
Reply With Quote
  #2  
Old 23rd January 2013, 06:44 AM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 710
windows_7ie
Re: Changing default boot Fedora 18

Hallo

the settings of the boot loader (grub2) are saved in /boot/grub2/grub.cfg

If you are logedin as root you are able to edit the settings.
The line set default="0" sets the default boot entry. Zero means the first entry below.
Each block with the word menuentry singes the beginning of a line in the boot menu. Below that, between the {} are the boot options of this line.

About grub2, read more: http://www.dedoimedo.com/computers/grub-2.html
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #3  
Old 23rd January 2013, 11:19 AM
Browser Offline
Registered User
 
Join Date: Dec 2009
Posts: 9
linuxfirefox
Re: Changing default boot Fedora 18

Hi sslb lihou,

Your default boot option should be listed first under the line "### BEGIN /etc/grub.d/10_linux ###"
in the file: /boot/grub2/grub.cfg.

If Fedora 18 is your default boot option Change the default boot option 'menuentry' to something
like 'Fedora 18 GNU/Linux.', instead of 'Fedora, with Linux 3.6.10-4.fc18.x86_64'

The second boot option immediatly follows the closing brace '}' of the first (default) option.
The third boot option ...

Code:
how to save and modify the bootloader after.
Just save the file /boot/grub2/grub.cfg after you have finished editing it.
Reboot to check it.

Regards,
Browser.
Reply With Quote
  #4  
Old 23rd January 2013, 12:37 PM
sslb lihou Offline
Registered User
 
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6
linuxfirefox
Re: Changing default boot Fedora 18

Okay. Thanks for the responses.

I got to the menu entry like this:

[root@localhost ~]# grep menuentry /boot/grub2/grub.cfg
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
menuentry_id_option=""
export menuentry_id_option
menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
submenu 'Advanced options for Fedora' $menuentry_id_option 'gnulinux-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
menuentry 'Fedora, with Linux 3.7.2-204.fc18.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2-204.fc18.i686-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
menuentry 'Fedora, with Linux 3.6.0-0.rc2.git2.1.fc18.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.6.0-0.rc2.git2.1.fc18.i686-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-180A67860A675FAC' {

Now how do I get to the bootloader settings to modify them?

This did not work:

[root@localhost ~]# /boot/grub2/grub.cfg.
-bash: /boot/grub2/grub.cfg.: No such file or directory

[root@localhost ~]# /etc/default/grub
-bash: /etc/default/grub: Permission denied

So I'm stuck.
Reply With Quote
  #5  
Old 23rd January 2013, 12:59 PM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 710
windows_7ie
Re: Changing default boot Fedora 18

Hallo

If you like to get more precise answers, pleas post the result of

su -c 'cat /boot/grub2/grub.cfg'

May you need to enter the root password.


To edit the Configuration file use:

su -c 'gedit /boot/grub2/grub.cfg'
or
su -c 'kwrite /boot/grub2/grub.cfg'
or
su -c 'vi /boot/grub2/grub.cfg'
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #6  
Old 23rd January 2013, 06:08 PM
jonnycat Online
Registered User
 
Join Date: Jun 2012
Location: PNW
Posts: 187
linuxfirefox
Re: Changing default boot Fedora 18

Remember that grub.cfg is overwritten whenever you run grub2-mkconfig. To have the default choice remain constant after a grub2-mkconfig, you would edit the /etc/default/grub file. Change the "GRUB_DEFAULT=" line to the OS you would like to set as the default, then regenerate your grub.cfg with grub2-mkconfig:

Code:
 
grub2-mkconfig -o /boot/grub2/grub.cfg
Note: OS listings start at 0.

Additionally, If you want to change the default on the next boot only, you use the following command, where <OS listing number> is the OS listing number, starting at 0:

Code:
grub2-reboot <OS listing number>
Reply With Quote
  #7  
Old 24th January 2013, 12:12 AM
sslb lihou Offline
Registered User
 
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6
linuxfirefox
Re: Changing default boot Fedora 18

[QUOTE=tho.mei;1628337]Hallo

If you like to get more precise answers, pleas post the result of

su -c 'cat /boot/grub2/grub.cfg'

You sure? OK

[root@localhost ~]# su -c ‘cat /boot/grub2/grub.cfg'
#
# 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 ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="${saved_entry}”

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
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6‘
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6' 6c728dae-ff99-4a69-bd57-8ee4424d84d6
else
search --no-floppy --fs-uuid --set=root 6c728dae-ff99-4a69-bd57-8ee4424d84d6
fi
font="/usr/share/grub/unicode.pf2“
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
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' a2033fb1-1f90-497b-ac3a-07e6e70021cd
else
search --no-floppy --fs-uuid --set=root a2033fb1-1f90-497b-ac3a-07e6e70021cd
fi
insmod gfxmenu
loadfont ($root)/grub2/themes/system/DejaVuSans-10.pf2
loadfont ($root)/grub2/themes/system/DejaVuSans-12.pf2
loadfont ($root)/grub2/themes/system/DejaVuSans-Bold-14.pf2
loadfont ($root)/grub2/fonts/unicode.pf2
insmod png
set theme=($root)/grub2/themes/system/theme.txt
export theme
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry ‘Fedora’ --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-simple-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
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' a2033fb1-1f90-497b-ac3a-07e6e70021cd
else
search --no-floppy --fs-uuid --set=root a2033fb1-1f90-497b-ac3a-07e6e70021cd
fi
echo ‘Loading Linux 3.7.2-204.fc18.i686 ...’
linux /vmlinuz-3.7.2-204.fc18.i686 root=UUID=6c728dae-ff99-4a69-bd57-8ee4424d84d6 ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 rhgb quiet
echo ‘Loading initial ramdisk ...’
initrd /initramfs-3.7.2-204.fc18.i686.img
}
submenu ‘Advanced options for Fedora’ $menuentry_id_option ‘gnulinux-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
menuentry ‘Fedora, with Linux 3.7.2-204.fc18.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.7.2-204.fc18.i686-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
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' a2033fb1-1f90-497b-ac3a-07e6e70021cd
else
search --no-floppy --fs-uuid --set=root a2033fb1-1f90-497b-ac3a-07e6e70021cd
fi
echo ‘Loading Linux 3.7.2-204.fc18.i686 ...’
linux /vmlinuz-3.7.2-204.fc18.i686 root=UUID=6c728dae-ff99-4a69-bd57-8ee4424d84d6 ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 rhgb quiet
echo ‘Loading initial ramdisk ...’
initrd /initramfs-3.7.2-204.fc18.i686.img
}
menuentry ‘Fedora, with Linux 3.6.0-0.rc2.git2.1.fc18.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.6.0-0.rc2.git2.1.fc18.i686-advanced-6c728dae-ff99-4a69-bd57-8ee4424d84d6' {
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' a2033fb1-1f90-497b-ac3a-07e6e70021cd
else
search --no-floppy --fs-uuid --set=root a2033fb1-1f90-497b-ac3a-07e6e70021cd
fi
echo ‘Loading Linux 3.6.0-0.rc2.git2.1.fc18.i686 ...’
linux /vmlinuz-3.6.0-0.rc2.git2.1.fc18.i686 root=UUID=6c728dae-ff99-4a69-bd57-8ee4424d84d6 ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 rhgb quiet
echo ‘Loading initial ramdisk ...’
initrd /initramfs-3.6.0-0.rc2.git2.1.fc18.i686.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-180A67860A675FAC’ {
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' 180A67860A675FAC
else
search --no-floppy --fs-uuid --set=root 180A67860A675FAC
fi
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 ###

Still trying to figure out what file to edit.
Reply With Quote
  #8  
Old 24th January 2013, 08:18 AM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 710
windows_7ie
Re: Changing default boot Fedora 18

Edit the folowing line:
set default="${saved_entry}”

change it to the folowing to start Fedora kernel 3.7.2-204.fc18.i686 by default:
set default=0

change it to the folowing to start Fedora kernel 3.6.0-0.rc2.git2.1.fc18.i686 by default:
set default=1

change it to the folowing to start Windows by default:
set default=2
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #9  
Old 24th January 2013, 11:30 AM
sslb lihou Offline
Registered User
 
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6
linuxfirefox
Re: Changing default boot Fedora 18

[QUOTE=tho.mei;1628579]Edit the folowing line:
set default="${saved_entry}”

Which file do I edit, and which command displays this file?
What do I do after the edit, and how do I do it?
This is new to me. I need precise instruction.
Thank you.
Reply With Quote
  #10  
Old 24th January 2013, 11:59 AM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 710
windows_7ie
Re: Changing default boot Fedora 18

Quote:
Originally Posted by sslb lihou View Post
Quote:
Originally Posted by tho.mei View Post
Edit the folowing line:
Quote:
Originally Posted by tho.mei View Post
set default="${saved_entry}”
Which file do I edit, and which command displays this file?
What do I do after the edit, and how do I do it?
This is new to me. I need precise instruction.
Thank you.
You nee to edit the file /boot/grub2/grub.cfg

To edit this configuration file:

The following commands will each open an editor. Tray just one. My you need to enter the root password.

If you use Gnome:
su -c 'gedit /boot/grub2/grub.cfg'

or, if you use KDE:
su -c 'kwrite /boot/grub2/grub.cfg'

or, if you don't use a grafical intrafce:
su -c 'vi /boot/grub2/grub.cfg'


Save the file after the edition with the editor and reboot.
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #11  
Old 27th January 2013, 04:06 AM
sslb lihou Offline
Registered User
 
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6
linuxfirefox
Re: Changing default boot Fedora 18

Quote:
Originally Posted by tho.mei View Post
You nee to edit the file /boot/grub2/grub.cfg
To edit this configuration file:
if you don't use a grafical intrafce:
su -c 'vi /boot/grub2/grub.cfg'

Done.
Thank you. Now, how do I do this?

Quote:
Originally Posted by tho.mei View Post

Save the file after the edition with the editor and reboot.
Reply With Quote
Reply

Tags
boot, changing, default, fedora

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remotely Changing Default Boot OS? zerogspacecow Using Fedora 17 16th September 2010 04:16 AM
Changing Default OS on boot nealec Mac Chat 9 2nd May 2007 08:23 PM
Changing the default op sys at boot jwong78 Installation, Upgrades and Live Media 4 5th February 2005 01:23 PM


Current GMT-time: 18:59 (Thursday, 24-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat