Previously, loop_device_make_internal() always used the block device directly (via loop_device_open_from_fd()) for whole-device access, regardless of sector size. This is incorrect when the GPT partition table was written with a different sector size than the device reports, as happens with CD-ROM/ISO boot via El Torito: the device has 2048-byte blocks but the GPT uses 512-byte sectors. Restructure the sector size handling in loop_device_make_internal(): - Move GPT sector size probing (UINT32_MAX case) before the block-vs-regular-file split so both paths share the same logic and O_DIRECT handling. Check f_flags instead of loop_flags for O_DIRECT detection, since we're probing the original fd before any reopening. - For block devices, get the device sector size and compare it against the resolved sector_size. Only use the block device directly when sector sizes match. When they differ (probed GPT mismatch or explicit sector size request), fall through to create a real loop device with the correct sector size. - Default sector_size=0 to the device sector size for block devices (instead of always 512), so "no preference" correctly matches the device's sector size. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
