Skip to content

two udev blkid builtin tweaks - #36968

Merged
yuwata merged 2 commits into
systemd:mainfrom
poettering:builtin-blkid-tweaks
Apr 3, 2025
Merged

yuwata merged 2 commits into
systemd:mainfrom
poettering:builtin-blkid-tweaks

Conversation

@poettering

Copy link
Copy Markdown
Member

Split out of #36631, but makes sense on its own.

Fixes: #34319

(Diff probably best viewed while hiding space changes)

@poettering poettering added udev please-review PR is ready for (re-)review by a maintainer labels Apr 2, 2025

@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. One minor suggestion.

Comment thread src/udev/udev-builtin-blkid.c Resolved
@yuwata yuwata added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels Apr 2, 2025
…just look at /

So far the gpt-auto symlinks would point to:

   1. the disk the ESP/XBOOTLDR is located on
   2. or to a loopback device whose filename field is set to "rootdisk"
      or "rootdisk.raw"

This makes sense in the initrd. But once we transition to the host this
is quite confusing, since the symlinks might point to a different place
than what we actually ended up transitioning too: the actual backing
device of the root file system might be different from what gpt-auto
found.

Let's clean this up: let's avoid any ambiguities here: let's extend the
rules above with one more rule:

   3. if we left the initrd, we'll make gpt-auto point to the selected
      root file system, if it otherwise would have been a candidate.

Or in other words, the ID_PART_GPT_AUTO_ROOT_DISK=1 udev property now
always makes sense: in the initrd it points to the future root disk, and
on the host to the actual root disk.

Fixes: systemd#34319
@poettering
poettering force-pushed the builtin-blkid-tweaks branch from 1b224ab to 7c23f95 Compare April 3, 2025 08:09
@poettering poettering 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 good-to-merge/with-minor-suggestions labels Apr 3, 2025
@yuwata
yuwata merged commit 23e724f into systemd:main Apr 3, 2025
@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 Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants