LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-12-2014, 07:18 PM   #1
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Rep: Reputation: 59
Fedora 20 - how to change default boot order


Hello All,
Fedora 20 on a UEFI motherboard.
For some reason I now have linux rescue as the default boot, instead of the latest kernel.
How can I restore the normal boot order, which used to put linux rescue after the kernels?

Cheers,
Terry
 
Old 06-12-2014, 08:20 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
So the "rescue" option is actually listed first ?.

Normally I'd just say run grub2-mkconfig and see if that fixes things, then hack GRUB_DEFAULT in /etc/default/grub and try the mkconfig again. But according to this wiki article things have moved, so you'd need to be careful where you direct the output of the mkconfig.
I did have a UEFI fedora system for a while, but it kept messing with my (firmware) boot entries so I trashed it, hence I can't go look/play for myself.
 
Old 06-12-2014, 08:52 PM   #3
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by syg00 View Post
So the "rescue" option is actually listed first ?.
yes, and blowed if I know how that happened as I haven't been monkeying with anything related.

Quote:
Normally I'd just say run grub2-mkconfig and see if that fixes things, then hack GRUB_DEFAULT in /etc/default/grub and try the mkconfig again. But according to this wiki article things have moved, so you'd need to be careful where you direct the output of the mkconfig.
According to that link it looks to me as though the output of grub2-mkconfig should be directed to /boot/efi/EFI/fedora/grub.cfg.

I'm unclear as to what I need to do to GRUB_DEFAULT in /etc/default/grub. Here is what is currently in that file...

Code:
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="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
Cheers,
Terry
 
Old 06-12-2014, 09:18 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
GRUB_DEFAULT is zero-based, so if the kernel you want is (always) the second "menuentry", set GRUB_DEFAULT=1.
This will of course rely on future updates keeping the wanted kernel second - easy to re-fix if needed.

Also keep in mind you may lose your change at any time if grub is re-shipped.
See my sigline before you start.
 
Old 06-12-2014, 10:35 PM   #5
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
I set GRUB_DEFAULT=1, didn't do anything else, and it has no effect.
I am not at all confident about running grub2-mkconfig, as it now isn't clear where the output should be directed.
Some stuff I've read says use "grub2-mkconfig -o /boot/grub2/grub.cfg", but other stuff suggests "grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg"
I currently do not have a "/boot/grub2/grub.cfg". There is a "/boot/grub2/" but it only contains "themes' (a dir) and file "grubenv".
There is a "/boot/efi/EFI/fedora/grub.cfg", and that would suggest that is where the output of grub2-mkconfig should go, but blowed if I can see that anywhere in Fedora docs.

Cheers,
Terry
 
Old 06-12-2014, 10:43 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Correct - the mkconfig uses the /etc/default/grub to help build the grub.cfg - the change does nothing by itself.
All the /boot/grub[2]/grub.cfg references you are finding are non-UEFI (i.e. historical BIOS/MBR) systems - that was everyone until quite recently. You need to build /boot/efi/EFI/fedora/grub.cfg

If I get bored watching the world cup over the weekend, I might re-build a F20 on UEFI.
 
Old 06-12-2014, 11:24 PM   #7
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by syg00 View Post
Correct - the mkconfig uses the /etc/default/grub to help build the grub.cfg - the change does nothing by itself.
All the /boot/grub[2]/grub.cfg references you are finding are non-UEFI (i.e. historical BIOS/MBR) systems - that was everyone until quite recently. You need to build /boot/efi/EFI/fedora/grub.cfg
OK...done, done and All done!
Running "grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg" has done the trick.
The linux rescue versions are now relegated to the bottom of the heap, where they usually (and should) reside.
No need to fiddle with "/etc/default/grub".
Thanks for your help.

Cheers,
Terry
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant change boot order in fedora ndaka123488 Linux - Software 7 09-05-2011 04:08 AM
change boot order kottana.swarnakumar Linux - Newbie 2 04-14-2009 06:26 AM
change grub boot order, all instructions say change default, but I don't see default mhg Linux - Newbie 5 11-09-2008 10:01 AM
Have to change boot order in BIOS to boot ubuntu/winxp Minn3h Linux - Software 7 04-01-2006 05:17 PM
how to change boot order Boomba Linux - Newbie 2 01-23-2004 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration