 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

23rd January 2013, 05:16 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6

|
|
|
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
|

23rd January 2013, 06:44 AM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708

|
|
|
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
|

23rd January 2013, 11:19 AM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 9

|
|
|
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.
|

23rd January 2013, 12:37 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6

|
|
|
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.
|

23rd January 2013, 12:59 PM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708

|
|
|
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
|

23rd January 2013, 06:08 PM
|
 |
Registered User
|
|
Join Date: Jun 2012
Location: PNW
Posts: 103

|
|
|
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>
|

24th January 2013, 12:12 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6

|
|
|
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.
|

24th January 2013, 08:18 AM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708

|
|
|
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
|

24th January 2013, 11:30 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6

|
|
|
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.
|

24th January 2013, 11:59 AM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708

|
|
|
Re: Changing default boot Fedora 18
Quote:
Originally Posted by sslb lihou
Quote:
Originally Posted by tho.mei
Edit the folowing line:
|
Quote:
Originally Posted by tho.mei
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
|

27th January 2013, 04:06 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Toronto,ON, Canada
Posts: 6

|
|
|
Re: Changing default boot Fedora 18
Quote:
Originally Posted by tho.mei
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
Save the file after the edition with the editor and reboot.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 15:03 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|