Fedora Linux Support Community & Resources Center
  #1  
Old 29th November 2011, 07:11 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 278
linuxfirefox
just noticed...grub F16 doesn;t allow the grub default to be selected

just noticed...grub F16 doesn't allow the grub default to be selected

in the old grub, one could edit grub.conf and select a grub menu default to be loaded if no action taken)

now the grub.cfg file says "NOT TO EDIT"

another new event this morning:

the highlighted grub is 3.1.1 not 3.1.2

3.1.2 is the highest in the grub menu

I still cannot reach XP Prof and it is on the grub menu
Reply With Quote
  #2  
Old 29th November 2011, 07:20 PM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 14,546
windows_xp_2003chrome
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

http://docs.fedoraproject.org/en-US/..._Sysadmin.html
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #3  
Old 29th November 2011, 08:07 PM
AdamW Offline
Fedora QA Community Monkey
 
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 4,176
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

clarice: you can edit the file manually, and ignore the warning. the only problem is that if you ever run 'grub2-mkconfig' to regenerate the file, your changes will get overridden.
__________________
Adam Williamson | awilliam AT redhat DOT com
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
Reply With Quote
  #4  
Old 29th November 2011, 08:51 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 278
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

thanks OK but where in grub.cfg is the item to be edited

before I start looking!

---------- Post added at 12:51 PM ---------- Previous post was at 12:19 PM ----------

I don't know anaconda, but have a theory

the default is the previous selection.

Hence...select 3.1.2 and the default becomes 3.1.2 until something different is chosen

theory disproved! previous doesn't matter... 3.1.1 is always highlighted

Last edited by clariceoshea; 29th November 2011 at 10:53 PM.
Reply With Quote
  #5  
Old 29th November 2011, 08:53 PM
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,086
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

/etc/grub.d/
ah no, that was the templates..

thats the one you're looking for (grub2)
/boot/grub2/grub.cfg
__________________
Notebook: Samsung NC210/NC110 CPU: Intel 2*1600 Mhz RAM: 1024 MB DDR2 OS: Fedora 19 DE: Awesome
Laptop: Toshiba Satellite L670 CPU: Intel(r) 2*1872 Mhz RAM: 3072 MB DDR3 OS: Fedora 17 DE: Awesome
Fedora Manual (RTFM) | The Linux Documentation Project | Script-Tools
Reply With Quote
  #6  
Old 29th November 2011, 09:08 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 278
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Quote:
Originally Posted by glennzo View Post

GRUB user required...I did a preupgrade and few questions were asked

preupgrade required seconds of UI and hours of upgrading with no assistance required

---------- Post added at 01:08 PM ---------- Previous post was at 01:05 PM ----------

NOT I am using /boot/grub2/grub.cfg

I only mentioned /etc to refer to the line to be edited under the previous grub
Reply With Quote
  #7  
Old 30th November 2011, 02:23 AM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,272
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

In your /etc/default/grub file, find the line that starts with GRUB_DEFAULT=,
and add the title from the menu entry you want to be the default, in quotes if
it contains spaces.

Then run # grub2-mkconfig -o /boot/grub2/grub.cfg

This works best to make windows the default. With Fedora or other linux kernels
that get updated frequently, the default grub2 setup works better to boot the most
recent addition.

You can also make a menu number the default, but this is likely to get messed up
when new kernels are added to the list.
Reply With Quote
  #8  
Old 30th November 2011, 02:34 AM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,855
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Quote:
Originally Posted by sonoran
You can also make a menu number the default, but this is likely to get messed up
when new kernels are added to the list.
No, it won't get messed up with a new kernel update if the number is 0 (zero), first item in the list.
Code:
$ grep DEFAULT /etc/default/grub 
GRUB_DEFAULT=0
The "default" grub2 setup, if I recall correctly, is GRUB_DEFAULT="saved"
With that setting, after the first kernel update I got after installing F16, it booted to the "old" kernel, not the new one.

Last edited by PabloTwo; 30th November 2011 at 02:37 AM.
Reply With Quote
  #9  
Old 30th November 2011, 02:57 AM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,272
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Quote:
Originally Posted by PabloTwo View Post
No, it won't get messed up with a new kernel update if the number is 0 (zero), first item in the list.
That's true, but I meant it will get messed up if you change GRUB_DEFAULT to a number other than 0, like 1 or 2.

No kernel or os position in the list of menu entries is guaranteed to stay the same. 0 will be the newest kernel but it won't necessarily be the same kernel over time/updates.

So the way to make a specific kernel or os the default, other than the newest kernel, is to use the title option.
Reply With Quote
  #10  
Old 30th November 2011, 03:10 AM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,855
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Quote:
Originally Posted by sonoran View Post
That's true, but I meant it will get messed up if you change GRUB_DEFAULT to a number other than 0, like 1 or 2.

No kernel or os position in the list of menu entries is guaranteed to stay the same. 0 will be the newest kernel but it won't necessarily be the same kernel over time/updates.

So the way to make a specific kernel or os the default, other than the newest kernel, is to use the title option.
Noted and agreed. But I think the OP's reason for posting was that after a kernel upgrade grub defaulted to booting the previous kernel and he wanted to know how to change that so it would boot the new kernel as default. Thus, if his goal is to have the default always be the newest kernel installed, then GRUB_DEFAULT=0 is what he wants.
Reply With Quote
  #11  
Old 30th November 2011, 03:20 AM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,272
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Maybe I misinterpreted her post. I thought she wanted to know how to make an entry other
than 0 the default.

I see what you mean, though. Farther down she mentions the latest kernel not being default.
Once you start playing with grub2's config files that's easy to arrange. I don't know exactly how
I did it but mine is now booting whatever kernel I previously selected. Back to info grub2...
Reply With Quote
  #12  
Old 30th November 2011, 03:58 AM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 278
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

I tried /etc/default/grub
GRUB_DEFAULT=0
with no effect...second from the top grub entry was booted

OR do I use : ????
GRUB_DEFAULT=3.1.2-1.fc16.i686

Problem is that to keep booting the top entry, I'd have to modify this file every time

don't know anaconda but the code may suggest that the intent of the author was to

always offer the entry last chosen

I think we need help from the authors to correct the code

or I need to become a grub/anaconda expert and I don't have time
Reply With Quote
  #13  
Old 30th November 2011, 04:11 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,318
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

you have to run

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

after making changes to /etc/default/grub

You can manually edit the /boot/grub2/grub.cfg and change the line that has set default="0"

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"                                                          <<<<----- Line to change for default entry to boot
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi
As AdamW mentioned above, though. If you manually edit the /boot/grub2/grub.cfg file, then any manual edits will be overwritten if you run grub2-mkconfig


Edit:

There was also some problems with grubby when you update a kernel. It doesn't replace the Loading Linux 3.1.2-1.fc16.x86_64 ... message with the correct kernel version and kept the old kernel version in it. It booted the proper kernel, but just the message had the wrong kernel version in it.

Could that be what you are seeing instead of it booting the wrong kernel?

Last edited by DBelton; 30th November 2011 at 04:14 AM.
Reply With Quote
  #14  
Old 30th November 2011, 05:04 AM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,272
linuxfirefox
Re: just noticed...grub F16 doesn;t allow the grub default to be selected

Quote:
Originally Posted by clariceoshea View Post
I tried /etc/default/grub
GRUB_DEFAULT=0
with no effect...second from the top grub entry was booted
I managed to get grub2 back to booting the most recent kernel with the following:
In /etc/default/grub, made GRUB_DEFAULT=saved
Ran
Code:
# grub2-set-default 0
# grub2-mkconfig -o /boot/grub2/grub.cfg
Now it always boots the most recent kernel, even if I booted an older kernel previously.

************************************************** *******************************************

But my grub.cfg is different than DBelton's:

Code:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi
I followed this page: https://fedoraproject.org/wiki/Grub2

My /boot/grub2/grubenv has:
Code:
saved_entry=0
default=0

Last edited by sonoran; 30th November 2011 at 05:16 AM.
Reply With Quote
Reply

Tags
default, f16, grub, noticedgrub, selected

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
Is that hideous GRUB splash screen the current GRUB default? Mariusz W Reviews, Rants & Things That Make You Scream 10 29th May 2011 01:29 AM
[SOLVED] Grub boots Win7 but doesn´t Fedora 13 x64 rafa1981 Installation, Upgrades and Live Media 4 8th June 2010 09:26 PM


Current GMT-time: 01:12 (Thursday, 24-04-2014)

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