Commit a7176cd
install: Pass explicit filesystem type to mount after mkfs
When mounting a freshly-created filesystem during install, pass
-t <fstype> to mount rather than relying on auto-detection.
util-linux 2.42 introduced an optimization (commit 8bdc2546d) where
libmount reads device properties from the udev database instead of
probing the device superblock with libblkid. When mkfs runs inside a
container, the udev database is stale for the filesystem type because
mkfs does not generate a kernel uevent — udev only re-probes devices
on kernel-generated events (such as partition table changes from
sfdisk), not on arbitrary block device writes. As a result, the udev
database has partition tags (PARTUUID, PARTLABEL) from sfdisk but
lacks ID_FS_TYPE. libmount's read_from_udev() returns success after
finding those partition tags, so the libblkid direct-probe fallback
is never called. Without a filesystem type, mount falls back to
iterating /etc/filesystems and /proc/filesystems, which fails for
filesystem modules (like xfs with CONFIG_XFS_FS=m) that are not yet
loaded.
Since bootc already knows the filesystem type (it just ran mkfs),
passing -t avoids the auto-detection path entirely.
Closes: #2148
Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: John Eckersberg <jeckersb@redhat.com>1 parent 9e5d015 commit a7176cd
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
| 488 | + | |
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
494 | 495 | | |
495 | | - | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
148 | 161 | | |
149 | 162 | | |
150 | 163 | | |
| |||
0 commit comments