Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

fedora boot order

Posted on 2013-11-25
13
729 Views
Last Modified: 2013-12-03
I installed fedora ( I think it's version 19 ) on two partitions of my laptop. I will use one to get emails and stuff, and the other for banking.
the problem is the install of fedora i want to be the default if not the default. /etc/default/grub looks like this.

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 vconsole.keymap=us $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

I have been googleing but can't find how to change the boot order. Or I should say, I have found a lot of "fixes" that aren't working.
anyone have a good step by step that changes the boot order for fedora 19?
0
Comment
Question by:JeffBeall
  • 6
  • 6
13 Comments
 
LVL 14

Assisted Solution

by:jb1dev
jb1dev earned 250 total points
ID: 39676558
You are saying you want to change the default highlighted selection?
If so, you should probably not be using
GRUB_DEFAULT=saved

http://members.iinet.net/~herman546/p20/GRUB2%20Configuration%20File%20Commands.html

Specify an index  e.g. 0 or 1 or 2, etc.

GRUB_DEFAULT=0
The number at the end of this line can be changed to make the highlight bar or selection bar in the GRUB Menu appear automatically on any GRUB Menu entry we like.
0 (zero) tells GRUB we want the first or top GRUB entry automatically selected unless we over ride that selection with our up or down arrow key during boot-up.
Any number greater than 0 (zero) will mean boot entries further down the GRUB Menu will be selected instead.

Also don't forget:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
0
 
LVL 62

Expert Comment

by:gheist
ID: 39676581
The problem is in the fact that fedora 19 started using grub2 and did not include the update-grub2
So you have to run
grub2-mkconfig > /boot/grub2/grub.cfg
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39677385
Ok, so at a terminal I did this
su
vi /etc/default/grub

changed

GRUB_DEFAULT=saved

to

GRUB_DEFAULT=2
( I actually want to 3rd line to be the default )

then ran

grub2-mkconfig > /boot/grub2/grub.cfg

but it's like it ignored the changes and the default is still the 1st line of
/etc/default/grub
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 62

Expert Comment

by:gheist
ID: 39677511
is it in 3rd line when you run grub2-mkconfig ?
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39677697
"is it in 3rd line when you run grub2-mkconfig ? "

sorry, I'm not sure what you mean. when i edit
/etc/default/grub
once I'm done I save the changes and exit. Then I run
grub2-mkconfig> /boot/grub2/grub.conf
0
 
LVL 62

Expert Comment

by:gheist
ID: 39678267
the destination file is grub.cfg not grub.conf (you know they save one byte)
while grub2-mkconfig > /boot/grub2/grub.cfg is running it displays couple of lines with all kernels you have installed. so number them from 0 and choose the right one you want to boot for the next try.
(to remove old kernels use yum upgrade as opposed to yum update)
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39679603
I don't know if I'm counting the lines wrong in grub.cfg, but no matter what number I put in
GRUB_DEFAULT=
after I run
grub2_mkconfig>/boot/grub2/grub.cfg
and reboot, the default doesn't change. This is what grub2_mkconfig looks like when it runs
# grub2-mkconfig>/boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.9-200.fc19.x86_64
Found initrd image: /boot/initramfs-3.11.9-200.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.11.8-200.fc19.x86_64
Found initrd image: /boot/initramfs-3.11.8-200.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64
Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-7725dfc225d14958a625ddaaaea5962b
Found initrd image: /boot/initramfs-0-rescue-7725dfc225d14958a625ddaaaea5962b.img
Found Fedora release 19 (Schrödinger’s Cat) on /dev/mapper/fedora00-root
done
any idea what number goes in
GRUB_DEFAULT?
or would it be
GRUB_DEFAULT= /dev/mapper/fedora00-root
0
 
LVL 62

Accepted Solution

by:
gheist earned 250 total points
ID: 39679911
If you want to boot kernel 3.9,5 by default you must
Set GRUB_DEFAULT=2 in /etc/default/grub
Run grub2-mkcoonfig > /boot/grub2/grub.cfg
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39680892
oh, I'll try that. Up to this point I would put

GRUB_DEFAULT=2

without all the other stuff.
0
 
LVL 62

Expert Comment

by:gheist
ID: 39681545
I can confirm that it works on Ubuntu like you typed.
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39682787
"Set GRUB_DEFAULT=2 in /etc/default/grub"

I thought you meant literally to put

2 in /etc/default/grub

but I realized to put

GRUB_DEFAULT=2

in the file called grub at /etc/default

the thing is I already tried that and it didn't work. In fact I've tried several things at

GRUB_DEFAULT=

and it seems like it just ignores whatever I put there, even though I run

 grub2-mkcoonfig > /boot/grub2/grub.cfg

after each change, then I reboot
0
 
LVL 62

Expert Comment

by:gheist
ID: 39682995
Weird. It mus have some other place it reads real settings...
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 39694403
thank you
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question