Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default entry to the BLS id instead of the entry index #1789

Merged
merged 1 commit into from Jun 12, 2019
Merged

Set default entry to the BLS id instead of the entry index #1789

merged 1 commit into from Jun 12, 2019

Conversation

martinezjavier
Copy link
Contributor

The GRUB default boot entry is set to the default's entry index. This made
sense on a non-BLS configuration because the entries where defined in the
GRUB config file, so they had a strict definition order.

But that's not the case on a BLS configuration, users can add or remove an
entry by just dropping or removing files from the /boot/loader/entries dir.

That means the default won't necessary be the installed kernel, but rather
the BLS that's first in the sorted list of BLS snippets.

So instead the default entry shold be explicit and be set to the BLS id of
the default kernel (the machine ID followed by a dash and kernel version).

That is also what is used when a new kernel is installed, so the initial
grubenv should be consistent.

Resolves: rhbz#1671047

Signed-off-by: Javier Martinez Canillas javierm@redhat.com

@jkonecny12 jkonecny12 added rhel-devel manual testing required This issue can't be merged without manual testing labels Jan 31, 2019
@poncovka
Copy link
Contributor

Jenkins, test this please.

Copy link
Member

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks a lot!

One small nitpick. There is a typo in the commit message:
So instead the default entry shold be explicit... -> So instead the default entry should be explicit

@martinezjavier
Copy link
Contributor Author

@jkonecny12 thanks, fixed the typo now.

Copy link
Contributor

@poncovka poncovka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you!

@poncovka poncovka removed the manual testing required This issue can't be merged without manual testing label Feb 1, 2019
@poncovka
Copy link
Contributor

@martinezjavier could you rebase this pull request to the rhel-8 branch, please?

The GRUB default boot entry is set to the default's entry index. This made
sense on a non-BLS configuration because the entries where defined in the
GRUB config file, so they had a strict definition order.

But that's not the case on a BLS configuration, users can add or remove an
entry by just dropping or removing files from the /boot/loader/entries dir.

That means the default won't necessary be the installed kernel, but rather
the BLS that's first in the sorted list of BLS snippets.

So instead the default entry should be explicit and set to the BLS id of
the default kernel (the machine ID followed by a dash and kernel version).

That is also what is used when a new kernel is installed, so the initial
grubenv should be consistent.

Resolves: rhbz#1671047

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
@martinezjavier martinezjavier changed the base branch from rhel-devel to rhel-8 June 11, 2019 11:50
@martinezjavier
Copy link
Contributor Author

@poncovka done

@poncovka
Copy link
Contributor

Jenkins, test this please.

@rvykydal rvykydal merged commit 045b3d6 into rhinstaller:rhel-8 Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants