 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

29th November 2011, 07:11 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

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

29th November 2011, 07:20 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930

|
|
|
Re: just noticed...grub F16 doesn;t allow the grub default to be selected
__________________
Glenn
The Bassinator © ®
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
|

29th November 2011, 08:07 PM
|
 |
Fedora QA Community Monkey
|
|
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 3,764

|
|
|
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.
|

29th November 2011, 08:51 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
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.
|

29th November 2011, 08:53 PM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,602

|
|
|
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
__________________
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
|

29th November 2011, 09:08 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
Re: just noticed...grub F16 doesn;t allow the grub default to be selected
Quote:
Originally Posted by glennzo
|
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
|

30th November 2011, 02:23 AM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,103

|
|
|
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.
|

30th November 2011, 02:34 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126

|
|
|
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.
|

30th November 2011, 02:57 AM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,103

|
|
|
Re: just noticed...grub F16 doesn;t allow the grub default to be selected
Quote:
Originally Posted by PabloTwo
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.
|

30th November 2011, 03:10 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126

|
|
|
Re: just noticed...grub F16 doesn;t allow the grub default to be selected
Quote:
Originally Posted by sonoran
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.
|

30th November 2011, 03:20 AM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,103

|
|
|
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...
|

30th November 2011, 03:58 AM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

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

30th November 2011, 04:11 AM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,612

|
|
|
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.
|

30th November 2011, 05:04 AM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,103

|
|
|
Re: just noticed...grub F16 doesn;t allow the grub default to be selected
Quote:
Originally Posted by clariceoshea
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 08:26 (Wednesday, 22-05-2013)
|
|
 |
 |
 |
 |
|
|