Solved

fedora boot order

Posted on 2013-11-25
13
716 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 61

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

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 61

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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 61

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 61

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 61

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now