Bug 1654036 - Bootloader installed in BLS config but with no BLS entries if grubby-deprecated is included in install package set (unbootable system)
Summary: Bootloader installed in BLS config but with no BLS entries if grubby-deprecat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-27 21:31 UTC by Adam Williamson
Modified: 2019-01-29 10:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-29 10:12:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2018-11-27 21:31:53 UTC
On install of Fedora-Rawhide-20181127.n.0 DVD or netinst (Server or minimal package sets behave the same), it seems that no BLS loader entries are produced. The installed system then boots to the grub rescue shell. Live install tests seem to have passed.

If I run 'new-kernel-pkg --mkinitrd --dracut --depmod --update 4.20.0-0.rc4.git0.1.fc30.x86_64' - the same command anaconda runs in post-install - in the installed system chroot, I see these errors:

rpm-sort: Invalid input
The param  is incorrect

but I think they're a consequence (rather than a cause) of /boot/loader/entries being empty.

I'm guessing this is somehow related to the installed package set, but still trying to figure it out.

Comment 1 Javier Martinez Canillas 2018-11-28 12:21:39 UTC
(In reply to Adam Williamson from comment #0)
> On install of Fedora-Rawhide-20181127.n.0 DVD or netinst (Server or minimal
> package sets behave the same), it seems that no BLS loader entries are
> produced. The installed system then boots to the grub rescue shell. Live
> install tests seem to have passed.
>
> If I run 'new-kernel-pkg --mkinitrd --dracut --depmod --update
> 4.20.0-0.rc4.git0.1.fc30.x86_64' - the same command anaconda runs in
> post-install - in the installed system chroot, I see these errors:
>
> rpm-sort: Invalid input
> The param  is incorrect
> 
> but I think they're a consequence (rather than a cause) of
> /boot/loader/entries being empty.
>
> I'm guessing this is somehow related to the installed package set, but still
> trying to figure it out.

Yes, this is caused by the grubby-deprecated package being installed:

# rpm -qa | grep grubby
grubby-8.40-21.fc30.x86_64
grubby-deprecated-8.40-21.fc30.x86_64

This package is just for cases where a BLS setup won't be used and the old grubby tool is needed.

Since new-kernel-pkg is installed by grubby-deprecated, the kernel-install scripts install the kernel the old way without adding BLS entries to /boot/loader/entries.

Comment 2 Javier Martinez Canillas 2018-11-28 12:48:03 UTC
It's caused by this commit:

https://pagure.io/fedora-comps/c/299cd1d5e3fa38c367bc0ba263189ce24678c20d?branch=master

Comment 3 Adam Williamson 2018-11-28 16:44:00 UTC
"Since new-kernel-pkg is installed by grubby-deprecated, the kernel-install scripts install the kernel the old way without adding BLS entries to /boot/loader/entries."

That must have changed at some point, though. We are actually expressly running 'new-kernel-pkg' during anaconda post install in order to *get BLS entries created*, in the live image case - see https://bugzilla.redhat.com/show_bug.cgi?id=1648472 . What else has changed here?

Comment 4 Javier Martinez Canillas 2018-11-28 16:49:04 UTC
(In reply to Adam Williamson from comment #3)
> "Since new-kernel-pkg is installed by grubby-deprecated, the kernel-install
> scripts install the kernel the old way without adding BLS entries to
> /boot/loader/entries."
> 
> That must have changed at some point, though. We are actually expressly
> running 'new-kernel-pkg' during anaconda post install in order to *get BLS
> entries created*, in the live image case - see
> https://bugzilla.redhat.com/show_bug.cgi?id=1648472 . What else has changed
> here?

No, we are running "kernel-install" as the workaround made in commit https://github.com/rhinstaller/anaconda/pull/1688/commits/e5619c9d0948.

What changed is what I mentioned in Comment 2, that grubby-deprecated was added in the core group.

Comment 5 Adam Williamson 2018-11-28 23:57:54 UTC
OK. I forgot that change was specific to the live payload, yeah. So, we can try to figure out a different way to achieve what peter wanted to achieve with the comps change...still, it seems worrying that just the presence of grubby-deprecated in the install package set makes the system unbootable. Is it possible to change that?

Comment 6 Adam Williamson 2018-11-29 01:09:37 UTC
I'd suggest we move the entries to anaconda-tools . I think being in that group would ensure the packages get into at least the Workstation and Server trees. Is that sufficient, or where else do they need to get to?

Comment 7 Adam Williamson 2018-11-29 03:05:13 UTC
For now I've tried moving them to @arm-tools:

https://pagure.io/fedora-comps/c/4c2694e1d8b349e6f2c00f8c1fc27102e9471435?branch=master

Let's see how that goes. Please let me know if it turns out not to do the job you were trying to do by adding them to @core...

Comment 8 Javier Martinez Canillas 2018-11-29 13:50:34 UTC
(In reply to Adam Williamson from comment #5)
> OK. I forgot that change was specific to the live payload, yeah. So, we can
> try to figure out a different way to achieve what peter wanted to achieve

I think moving grubby-deprecated to @arm-tools makes sense, but grubby should be available for the other arches. So I've proposed to move to @standard as you suggested:

https://pagure.io/fedora-comps/c/f74c7196dcb

> with the comps change...still, it seems worrying that just the presence of
> grubby-deprecated in the install package set makes the system unbootable. Is
> it possible to change that?

Yes, I agree with you. Specially since nothing prevents a user to install grubby-deprecated using a custom kickstart file.

So I've proposed the following change for Anaconda, to disable BLS if new-kernel-pkg was installed:

https://github.com/rhinstaller/anaconda/pull/1708

Comment 9 Adam Williamson 2018-11-30 01:45:37 UTC
As the comps changes are merged now, setting MODIFIED. Next time we get a compose we'll see how things stand. The last couple of attempts failed due to unrelated dependency issues.

Comment 10 Javier Martinez Canillas 2018-11-30 10:27:58 UTC
(In reply to Adam Williamson from comment #9)
> As the comps changes are merged now, setting MODIFIED. Next time we get a
> compose we'll see how things stand. The last couple of attempts failed due
> to unrelated dependency issues.

I don't think we can set it to modified yet, since this will only be partially solved in the compose. The problem could still be triggered by adding a grubby-deprecated package in a kickstart file as I mentioned in Comment 8.

Comment 11 Adam Williamson 2018-11-30 17:23:23 UTC
Well, the default install case is the most important one, and that is resolved now. If you want to keep it open to track the kickstart case, let's downgrade the severity and take it off the blocker list.

Comment 12 Javier Martinez Canillas 2019-01-29 10:12:11 UTC
(In reply to Javier Martinez Canillas from comment #8)
> (In reply to Adam Williamson from comment #5)
> > OK. I forgot that change was specific to the live payload, yeah. So, we can
> > try to figure out a different way to achieve what peter wanted to achieve
> 
> I think moving grubby-deprecated to @arm-tools makes sense, but grubby
> should be available for the other arches. So I've proposed to move to
> @standard as you suggested:
> 
> https://pagure.io/fedora-comps/c/f74c7196dcb
> 
> > with the comps change...still, it seems worrying that just the presence of
> > grubby-deprecated in the install package set makes the system unbootable. Is
> > it possible to change that?
> 
> Yes, I agree with you. Specially since nothing prevents a user to install
> grubby-deprecated using a custom kickstart file.
> 
> So I've proposed the following change for Anaconda, to disable BLS if
> new-kernel-pkg was installed:
> 
> https://github.com/rhinstaller/anaconda/pull/1708

The Anaconda change was merged, so this bug can be closed now.


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