Skip to content

kernel-install: also try to find $BOOT by partition GUID - #26648

Merged
bluca merged 2 commits into
systemd:mainfrom
bluca:kernel_install_guid
Mar 7, 2023
Merged

bluca merged 2 commits into
systemd:mainfrom
bluca:kernel_install_guid

Conversation

@bluca

@bluca bluca commented Mar 3, 2023

Copy link
Copy Markdown
Member

When there is nothing set up on /boot, /boot/efi or /efi, try to find the
$BOOT partition checking for the XBOOTLDR or ESP partition GUIDs.
Prefer XBOOTLDR as per BLS.

Fixes #26644

bluca added 2 commits March 2, 2023 23:19
When there is nothing set up on /boot, /boot/efi or /efi, try to find the
$BOOT partition checking for the XBOOTLDR or ESP partition GUIDs.
Prefer XBOOTLDR as per BLS.

Fixes systemd#26644
@bluca
bluca force-pushed the kernel_install_guid branch from 74da33a to 41f39e2 Compare March 3, 2023 10:51
@github-actions github-actions Bot added the please-review PR is ready for (re-)review by a maintainer label Mar 3, 2023

@yuwata yuwata left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Mar 7, 2023
@bluca
bluca merged commit 0531ac5 into systemd:main Mar 7, 2023
@bluca
bluca deleted the kernel_install_guid branch March 7, 2023 11:26
@github-actions github-actions Bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Mar 7, 2023
@poettering

Copy link
Copy Markdown
Member

Hmm, this is highly problematic, no? if I boot from my ssd and then plug in a fedora live usb stick, then there will be two ESPs around, the one from my ssd and the one from the live usb one, and this code might find the wrong one and bad things will happen

Sorry, but this looks wrong to me. Too much automatic behaviour is bad, not good. If there's no clear indication we are looking at the right ESP we shouldn't use an ESP.

Sorry, but I think this should be reverted. or what am I missing?

@poettering

Copy link
Copy Markdown
Member

I think we should make kernel-install call "bootctl -p" and "bootctl -x" to identify the right partitions.

@yuwata

yuwata commented Mar 7, 2023

Copy link
Copy Markdown
Member

if I boot from my ssd and then plug in a fedora live usb stick, then there will be two ESPs around, the one from my ssd and the one from the live usb one, and this code might find the wrong one and bad things will happen

Hm, indeed...

@bluca

bluca commented Mar 8, 2023

Copy link
Copy Markdown
Member Author

I'll look into using bootctl

yuwata added a commit to yuwata/systemd that referenced this pull request Mar 16, 2023
This reverts commit 41f39e2.

From the post merge comment in systemd#26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
yuwata added a commit to yuwata/systemd that referenced this pull request Mar 16, 2023
This reverts commit 41f39e2.

From the post merge comment in systemd#26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
yuwata added a commit to yuwata/systemd that referenced this pull request Mar 17, 2023
This reverts commit 41f39e2.

From the post merge comment in systemd#26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
yuwata added a commit to yuwata/systemd that referenced this pull request Mar 17, 2023
This reverts commit 41f39e2.

From the post merge comment in systemd#26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
yuwata added a commit to yuwata/systemd that referenced this pull request Mar 17, 2023
This reverts commit 41f39e2.

From the post merge comment in systemd#26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

kernel-install does not follow the BSP to determine $BOOT

3 participants