Ask Your Question

How to change GRUB 2 boot order?

asked 2013-06-23 10:40:09 -0500

Bucic gravatar image

updated 2013-07-03 14:09:53 -0500

Oddly, I haven't found similar question through the search function. This didn't help me either as the cat command return is not so similar.

Disk partition table type: GPT
No separate boot partition.

My current default entry is:

# grub2-editenv list
saved_entry=Fedora release 18 (Spherical Cow)

I have two Fedora installs currently, and only Fedora. No other systems:

cat /boot/grub2/grub.cfg |grep Fedora
menuentry 'Fedora (3.9.6-200.fc18.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d84f38a2-2292-4733-895b-ee4664fb8106' {
    echo 'Loading Fedora (3.9.6-200.fc18.x86_64)'
menuentry 'Fedora (3.9.5-201.fc18.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d84f38a2-2292-4733-895b-ee4664fb8106' {
    echo 'Loading Fedora (3.9.5-201.fc18.x86_64)'
menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d84f38a2-2292-4733-895b-ee4664fb8106' {
submenu 'Advanced options for Fedora' $menuentry_id_option 'gnulinux-advanced-d84f38a2-2292-4733-895b-ee4664fb8106' {
    menuentry 'Fedora, with Linux fedup' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-fedup-advanced-d84f38a2-2292-4733-895b-ee4664fb8106' {
    menuentry 'Fedora, with Linux 3.9.4-200.fc18.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.9.4-200.fc18.x86_64-advanced-d84f38a2-2292-4733-895b-ee4664fb8106' {
menuentry 'Fedora GNU/Linux, with tboot 1.7.0 and Linux 3.9.4-200.fc18.x86_64' --class fedora --class gnu-linux --class gnu --class os --class tboot {
menuentry 'Fedora GNU/Linux, with tboot 1.7.0 and Linux 3.9.3-201.fc18.x86_64' --class fedora --class gnu-linux --class gnu --class os --class tboot {
menuentry 'Fedora GNU/Linux, with tboot 1.7.0 and Linux 3.8.11-200.fc18.x86_64' --class fedora --class gnu-linux --class gnu --class os --class tboot {
menuentry 'Fedora release 18 (Spherical Cow)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {
submenu 'Advanced options for Fedora release 18 (Spherical Cow)' $menuentry_id_option 'osprober-gnulinux-advanced-ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {
    menuentry 'Fedora (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.9.4-200.fc18.x86_64--ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {
    menuentry 'Fedora, with Linux 3.9.4-200.fc18.x86_64 (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.9.4-200.fc18.x86_64--ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {
    menuentry 'Fedora, with Linux 3.9.2-200.fc18.x86_64 (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.9.2-200.fc18.x86_64--ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {
    menuentry 'Fedora release 18 (Spherical Cow) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.9.4-200.fc18.x86_64--ec3d5bbf-4b5e-435c-9e51-09443d969ea1' {

Contents of /etc/default/grub:

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX=" rd.lvm=0 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.keymap=pl2 rhgb quiet"

Complete /boot/grub2/grub.cfg (latest)

~$ sudo fedup --clean
~$ sudo fedup --resetbootloader

~$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    [sudo] password for hg1: 
    Generating grub.cfg ...
    Found theme: /boot/grub2/themes/system/theme.txt
    Found linux image: /boot/vmlinuz-3.9.6-200.fc18.x86_64
    Found initrd image: /boot/initramfs-3.9.6-200.fc18.x86_64.img
    Found linux image: /boot/vmlinuz-3 ...
edit retag flag offensive close merge delete



What do you want to do exactly? Do you want to change the default OS selected in Grub2 (what is actually described in the link you posted), or you want to change the order of OSes listed in Grub2 menu?

hedayat gravatar imagehedayat ( 2013-06-23 14:16:49 -0500 )edit

@hedayat I'd like to change the default system. I've asked the question poorly which is also the reason why I couldn't find any related questions on ask fedora. BUT! As you see in my question my grub menu entries list is a mess so I don't know how to proceed, neither per the instructions linked in my question nor per Once I get it sorted out I'll decide whether to edit my question title or to merge it with the exisiting one OR close it.

Bucic gravatar imageBucic ( 2013-06-24 04:37:43 -0500 )edit

And what should become the default OS? Fedora or something else?

hedayat gravatar imagehedayat ( 2013-06-24 06:01:31 -0500 )edit

@hedayat'Fedora release 18 (Spherical Cow)' on sda2. As you can see sda2 is not even mentioned in the return. Do I get this weird return because, probably unlike most people, I use GPT (GUUID Partition Table)?

Bucic gravatar imageBucic ( 2013-06-24 07:04:19 -0500 )edit

And what is your default OS right now? How many Fedora installations do you have (more than one)? what is on your /dev/sda3? Do you use separate /boot partitions?

hedayat gravatar imagehedayat ( 2013-06-24 11:39:03 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2013-06-25 13:50:10 -0500

hedayat gravatar image

Well, if I have understood correctly, you want to boot your Fedora 18 installation on sda2. And, there is no sign that you do NOT want to boot the latest kernel. Therefore, I think you should boot the first entry(Fedora (3.9.6-200.fc18.x86_64)) rather than Fedora release 18 (Spherical Cow). And simply keep the first entry as the default one, because it is always the latest kernel for your Fedora 18 on sda2. If you set the default to Fedora release 18 (Spherical Cow), you won't be using latest kernels because they have a different title by default. Or you should manually change the title after kernel updates.

It is absolutely not important that /dev/sda2 doesn't appear in the labels. It is just a label. Initial entries doesn't contain the partition because they are generated for the main OS (the OS which the installed boot loader comes from).

Entries for Fedora on /dev/sda3 contain the partition name since they are generated using os-prober for 'other OSes'.

edit flag offensive delete link more


Yes, I'd like to always boot to the latest kernel and to avoid any need for intervention after future kernel updates. Yes, I'm after the Fedora install on sda2. Notably NO entry anywhere in my GRUB 2 menus state 3.9.6, nor I got it indicated as available as an update, even after doing yum clean all prior to yum update.

Bucic gravatar imageBucic ( 2013-06-27 08:48:01 -0500 )edit

?! But according to the first line of your output, the first menu entry should be for booting Fedora 3.6.9. Maybe you should post your complete grub.cfg or at least the first menuentry option in grub.cfg.

hedayat gravatar imagehedayat ( 2013-06-30 10:16:12 -0500 )edit

I've updated my question with all the details. Also please take a look at

Bucic gravatar imageBucic ( 2013-06-30 10:54:04 -0500 )edit

It seems that you've run fedup but not completed the update process. And the output of your grep command doesn't match the content of grub.cfg you've uploaded. You should be able to boot your latest kernel by selecting "Advanced options for Fedora" and then "Fedora, with Linux 3.9.6-200.fc18.x86_64". However, your grub.cfg is dirty. If you don't need fedup entries, remove files /boot/initramfs-fedup.img and /boot/initramfs-fedup.img and then run grub2-mkconfg -o /boot/grub2/grub.cfg. You might prefer to backup your current grub.cfg before running the command though.

hedayat gravatar imagehedayat ( 2013-06-30 17:24:42 -0500 )edit

Cleaning after fedup didn't solve anything. Please see the updated question.

Bucic gravatar imageBucic ( 2013-07-01 17:27:00 -0500 )edit

answered 2013-06-30 15:47:19 -0500

Dave Light gravatar image

I don't know if Grub Customizer will work on Fedora Linux (I'm having installation problems). But I have used it with Ubuntu. The only problem I have sometimes is the MBR on sda boot disk (dual boot windows/Linux) will crap out requiring a windows boot repair, booting from DVD. Google Grub Customizer or try this link Good luck!

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-06-23 10:40:09 -0500

Seen: 22,952 times

Last updated: Jun 05 '15