Bug 966971 - dracut generates useless names for rescue kernel
dracut generates useless names for rescue kernel
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-24 08:18 EDT by Jan Sedlák
Modified: 2013-08-20 09:01 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-20 09:01:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Grub (892.65 KB, image/jpeg)
2013-05-24 08:18 EDT, Jan Sedlák
no flags Details

  None (edit)
Description Jan Sedlák 2013-05-24 08:18:17 EDT
Created attachment 752580 [details]
Grub

Description of problem:
After kernel update, dracut generated weird name for rescue kernel. It doesn't include kernel version, only some hash. Now it isn't possible to find out which kernel version it belongs to.

How reproducible:
Always.

Steps to Reproduce:
1. Install older release of F19 beta.
2. Update kernel.
3. Reboot.

Actual results:
It shows weird name for rescue kernel.

Expected results:
It should show kernel version.

Additional info:
See attached screenshot.
Comment 1 Kamil Páral 2013-05-24 08:40:30 EDT
On a different system I saw two different rescue menu items. It looked like this:

0-rescue-hashFoo
0-rescue-hashBar

Because there is no kernel version, it's impossible to say which rescue item is a newer one and you have to pick randomly.
Comment 2 Kay Sievers 2013-05-26 20:40:25 EDT
The rescue initrd is *machine* specific and not *kernel* specific.

It is intentionally not updated at kernel install and it belongs to the
*machine* not to the *kernel*.

The "weird" name is the machine id, and not weird for how things are
supposed to work. See man machine-id.

It seems all as it should be.
Comment 3 Kamil Páral 2013-05-27 06:38:46 EDT
Kay, is it expected to have several rescue items in GRUB, or there's supposed to be just one? If only one, why do we need to have the machine id mentioned in grub at all?

What is the behavior if several Fedora's are installed on the same system in dual-boot? How should you distinguish which rescue item is relevant to which system?
Comment 4 Harald Hoyer 2013-05-28 09:55:44 EDT
(In reply to Kamil Páral from comment #3)
> Kay, is it expected to have several rescue items in GRUB, or there's
> supposed to be just one? If only one, why do we need to have the machine id
> mentioned in grub at all?
> 
> What is the behavior if several Fedora's are installed on the same system in
> dual-boot? How should you distinguish which rescue item is relevant to which
> system?

One rescue kernel per "machine" / "linux installation"
Comment 5 Kamil Páral 2013-05-29 04:46:09 EDT
(In reply to Harald Hoyer from comment #4)
> One rescue kernel per "machine" / "linux installation"

In that case my questions in comment 3 still apply. Can we improve the format to clearly distinguish different rescue items related to different Fedora installations? And does the machine id help anything at all?
Comment 6 Harald Hoyer 2013-05-29 06:17:56 EDT
(In reply to Kamil Páral from comment #5)
> (In reply to Harald Hoyer from comment #4)
> > One rescue kernel per "machine" / "linux installation"
> 
> In that case my questions in comment 3 still apply. Can we improve the
> format to clearly distinguish different rescue items related to different
> Fedora installations? And does the machine id help anything at all?

I am open to suggestions.. How should the entry be named?

Currently I am calling new-kernel-pkg with:

--banner "$NAME $VERSION_ID Rescue $MACHINE_ID"

which should result to "Fedora 19 Rescue $MACHINE_ID"
Comment 7 Kamil Páral 2013-05-29 06:56:55 EDT
new-kernel-pkg will be used just in F20, right?

The format looks good (much better than the current one), except for the $machine_id. I don't see too much benefit in it. We can distinguish different installed distributions by "Fedora" prefix. We can distinguish different installed Fedora versions by "19" number. And yes, $machine_id helps distinguish different installations of the same Fedora, but it's very unclear which is which, just according to same hash.

Maybe it would be better to replace $machine_id with a grub-like identifier of the /boot partition used? Something like:

"Fedora 19 Rescue (hd0,1)"
"Fedora 19 Rescue (hd1,1)"

What do you think? I think it is much clearer than:

"Fedora 19 Rescue d35vjk5f3h"
"Fedora 19 Rescue e84mfkvhe3"
Comment 8 Harald Hoyer 2013-05-29 08:09:04 EDT
(In reply to Kamil Páral from comment #7)
> new-kernel-pkg will be used just in F20, right?
> 
> The format looks good (much better than the current one), except for the
> $machine_id. I don't see too much benefit in it. We can distinguish
> different installed distributions by "Fedora" prefix. We can distinguish
> different installed Fedora versions by "19" number. And yes, $machine_id
> helps distinguish different installations of the same Fedora, but it's very
> unclear which is which, just according to same hash.
> 
> Maybe it would be better to replace $machine_id with a grub-like identifier
> of the /boot partition used? Something like:
> 
> "Fedora 19 Rescue (hd0,1)"
> "Fedora 19 Rescue (hd1,1)"
> 
> What do you think? I think it is much clearer than:
> 
> "Fedora 19 Rescue d35vjk5f3h"
> "Fedora 19 Rescue e84mfkvhe3"

dracut does not know about the grub naming scheme nor do we want to get into that.

Also the /boot parition is not the key here, but the root partition.
Maybe we use the root partition LABEL or the UUID.
Comment 9 Kamil Páral 2013-05-29 10:33:36 EDT
Well it was just an example, it doesn't have to be "(hd0,1)", it can be "sda1" or similar. I think the physical disk layout identifier helps here more than UUID (similarly confusing to machine ID) or LABEL (that would be the same for multiple default installations).

Just a thought.
Comment 10 Harald Hoyer 2013-05-29 11:24:34 EDT
(In reply to Kamil Páral from comment #9)
> Well it was just an example, it doesn't have to be "(hd0,1)", it can be
> "sda1" or similar. I think the physical disk layout identifier helps here
> more than UUID (similarly confusing to machine ID) or LABEL (that would be
> the same for multiple default installations).
> 
> Just a thought.

Well the partition layout and the numbering can change after repartitioning.

And how to name lvm, mdraid, dmraid, btrfs volumes?
Comment 11 Kamil Páral 2013-05-29 12:13:51 EDT
Hmm, yeah, that's tough. Ideally this should be solved generally on a grub level, because currently not even the main boot menu items can distinguish two different installations of the same Fedora.

However, maybe simply getting rid of the $machine_id would be cleaner, although not that precise. For the usual situations it's totally sufficient. For the tricky situations, so you might peek into the menu item details to see which partition gets mounted ($machine_id wouldn't help you here anyway). And you don't need to use rescue modes often anyway.

But, enough of my babbling. The labels look well enough for F20. If it is also improved in F19, even better. Either way I think we can close this, we didn't understand the topic properly when we were reporting it.

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