Bug 741046 - Feature Request for handling how grub default is set
Summary: Feature Request for handling how grub default is set
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 16
Hardware: Unspecified
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-24 17:02 UTC by Amir Hedayaty
Modified: 2011-10-05 22:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-05 18:10:35 UTC


Attachments (Terms of Use)

Description Amir Hedayaty 2011-09-24 17:02:44 UTC
The current default setting mechanism by setting a number is kind of broken,
if there are more than one kernel (which happens on updates) or rescue mode is added (which comes and goes!)

It would be awesome if there was a smarter mechanism either by specifying  the partition and saying the highest normal (not rescue) kernel in this partition
or even better looks for the title, and choose the one which has
 "Fedora 15" or "Windows" on the title (and is the latest
kernel)

Or any other method that works, instead of a simple number a more descriptive way to express the default

Thanks

Comment 1 Mads Kiilerich 2011-09-25 20:00:46 UTC
(In reply to comment #0)
> The current default setting mechanism by setting a number is kind of broken,
> if there are more than one kernel (which happens on updates) 

It works just fine for me.

In what way is it broken? What is the problem?

> or rescue mode is added (which comes and goes!)

What do you mean - when do they come and go? Isn't it just that the rescue entries are created initially (by grub2-mkconfig), but not by grubby when new kernels are installed?

> It would be awesome if there was a smarter mechanism either by specifying  the
> partition and saying the highest normal (not rescue) kernel in this partition
> or even better looks for the title, and choose the one which has
>  "Fedora 15" or "Windows" on the title (and is the latest
> kernel)
> 
> Or any other method that works, instead of a simple number a more descriptive
> way to express the default

You can specify a default name instead of number, but I agree that using a number is much simpler and works much better than using names.

The idea of having more "smarter" ways of specifying default is probably more relevant to discuss and implement upstream.

Comment 2 Amir Hedayaty 2011-10-05 18:10:35 UTC
My apologies! I should read the info page before reporting a bug!
Just a question, what happens if I have two kernels with the same title for example
I set the default to:
GRUB_DEFAULT="Fedora release 15 (Lovelock) (on /dev/sda3)"

and there are two kernels on Fedora 15 (which commonly happens to everyone until the old kernel is removed manually)

Which kernel is booted? Is there anywhere I can read about the mechanisms this default works? or what happens if I just write "Fedora 15" or "/dev/sda3"?

Thanks

Comment 3 Mads Kiilerich 2011-10-05 22:49:13 UTC
(In reply to comment #2)
> Just a question, what happens if I have two kernels with the same title

That is a good question, and that is one of the reasons this "feature" IMHO is a bad idea. Descriptive titles should never be used as keys.

I think you will have to read the source and/or do some testing to find out what happens in the cases you mention.


Note You need to log in before you can comment on or make changes to this bug.