Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23rd February 2012, 11:56 AM
rgaelzer Offline
Registered User
 
Join Date: Oct 2005
Location: Rio Grande do Sul, Brazil
Posts: 135
linuxfirefox
Grub2: How to *REALLY* set the default OS

On my home desktop I have F16 (on sda) and Windows (on sdb) installed in separate hd's.
I want to configure grub2 to boot Windows by default because most of the folks here still follow Mr. Gates' path.

My current /etc/default/grub file is as follows:
================================
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DISABLE_RECOVERY="true"
GRUB_DEFAULT="Windows 7 (loader) (on /dev/sdb1)"
GRUB_CMDLINE_LINUX="rd.md=0 rd.dm=0 KEYTABLE=br-abnt2 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=vg_quasar/lv_swap rd.luks=0 rd.lvm.lv=vg_quasar/lv_root LANG=en_US.UTF-8"
====================================

Every time I run
grub2-mkconfig -o /boot/grub2/grub.cfg
as root and reboot, grub is set to boot Windows as desired.

However, as soon as a new kernel is installed, the default OS goes back to Fedora. It seems that when a new kernel is installed, rpm does not bother to check on the /etc/default/grub settings.

Is there a workaround that could fix this?
Thanks
__________________
Rudi Gaelzer
Registered Linux user # 153741
Reply With Quote
  #2  
Old 23rd February 2012, 01:21 PM
sea's Avatar
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,602
linuxfedorafirefox
Re: Grub2: How to *REALLY* set the default OS

Installing a kernel via updates, uses grubby to change grub settings.
So the only workaround i'm aware of is this, if the updates include kernel updates, run grub2-mkconfig -o /boot/grub2/grub.cfg right after the updates are done and before rebooting.

Not what you wanted to hear, sorry.
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb

Last edited by sea; 23rd February 2012 at 01:26 PM.
Reply With Quote
  #3  
Old 23rd February 2012, 02:14 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxchrome
Re: Grub2: How to *REALLY* set the default OS

You could try using the numerical menu entry order instead of the menu title.
Assuming you have 3 saved kernels and no "recovery" entries as per your grub file, making W7 the fourth menu entry,

GRUB_DEFAULT=3

Menu entries count from zero (0), so "3" would be the fourth menu entry item. Then run the "grub2-mkconfig -o /boot/grub2/grub.cfg" command again. You're next kernel update will tell if grubby behaves any better or not with this method.
Reply With Quote
  #4  
Old 26th May 2012, 01:31 PM
Gangrif Offline
Registered User
 
Join Date: Jun 2010
Posts: 14
windows_7firefox
Re: Grub2: How to *REALLY* set the default OS

So, maybe you've seen this already...
http://fedoraproject.org/wiki/GRUB_2

But it says that you're supposed to edit the default using grub-set-default.


That being said, i just spend half an hour trying to get their directions to work.... and failed. Not sure what i'm doing wrong.
Reply With Quote
  #5  
Old 26th May 2012, 01:37 PM
sea's Avatar
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,602
linuxfirefox
Re: Grub2: How to *REALLY* set the default OS

You'd probably have better chances to have changes work, while you edit /etc/default/grub directly.
(As long you have made a backup of that file before editing of course)
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb
Reply With Quote
  #6  
Old 29th May 2012, 10:21 PM
gr0undzer0 Offline
Registered User
 
Join Date: May 2012
Location: VA
Posts: 3
linuxchrome
Re: Grub2: How to *REALLY* set the default OS

You need to set the grub-default to saved. Then if you update the kernel run:

>os-prober
>grub2-mkconifg -o /boot/grub2/grub.cfg

that will put whatever submenu / entry settings you made before in. You may already know this and I may be answering a different question then your asking but that's as permanent as I've gotten it. The default doesn't change but the config needs to be run again.

---------- Post added at 09:21 PM ---------- Previous post was at 09:21 PM ----------

You need to set the grub-default to saved. Then if you update the kernel run:

>os-prober
>grub2-mkconifg -o /boot/grub2/grub.cfg

that will put whatever submenu / entry settings you made before in. You may already know this and I may be answering a different question then your asking but that's as permanent as I've gotten it. The default doesn't change but the config needs to be run again.
Reply With Quote
  #7  
Old 30th May 2012, 11:00 AM
errorxp's Avatar
errorxp Offline
Registered User
 
Join Date: Jul 2007
Posts: 371
windows_7firefox
Re: Grub2: How to *REALLY* set the default OS

Why was there a need to replace grub anyway? It didn't have problems like this and was much easier to edit.
Grub2 = Fail
__________________
these command lines are like casino slot machines, every time I input commands NOTHING HAPPENS
Reply With Quote
Reply

Tags
default, grub2, set

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO: remove GRUB2 booloader and recover windows default deathmood Guides & Solutions (No Questions) 4 18th March 2013 01:31 AM
How to set the default GRUB2 font and splash screen in Fedora plasmonics Guides & Solutions (No Questions) 16 8th June 2012 02:09 PM
Grub2 duke11235 Using Fedora 8 13th October 2009 02:14 PM
Grub2 as default in F12? Demz Fedora Focus 2 9th June 2009 06:12 AM
Default sink works, default source doesn't, Intel 845Gv2 Andy_Lapham Hardware & Laptops 1 1st April 2005 05:02 AM


Current GMT-time: 18:26 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat