Fix boot partition detection for modern Raspberry Pi OS#191
Open
KenAdamson wants to merge 2 commits into
Open
Conversation
Modern Raspberry Pi OS (Bookworm and later) mounts the boot partition at /boot/firmware instead of the legacy /boot location. This causes rpi-clone to fail to detect and copy boot files, resulting in unbootable cloned SD cards. This commit adds backward-compatible support for both mount points: - Check /boot/firmware first (modern), then fall back to /boot (legacy) - Update all boot partition detection logic - Handle cmdline.txt in both locations - Preserve compatibility with older Raspberry Pi OS versions Fixes the issue where cloned SD cards have empty boot partitions when using rpi-clone on systems with /boot/firmware mount point. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update README to clearly indicate this is an actively maintained fork - Highlight key improvements including modern Raspberry Pi OS compatibility - Update installation instructions to use this fork - Bump version to 2.0.23 to indicate changes from original This fork addresses critical issues that have been unresolved in the original repository since 2020, particularly the boot partition detection for modern Raspberry Pi OS systems. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Please check his fork which is a maintained fork of Bills repository and already contains code which supports Bookworm 😉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a critical bug where rpi-clone fails to detect and copy boot files on modern Raspberry Pi OS systems that mount the boot partition at
/boot/firmwareinstead of the legacy/bootlocation.Problem
/boot/firmware/boot, causing it to miss the boot partitionSolution
Added backward-compatible detection for both mount points:
/boot/firmwarefirst (modern systems)/bootif not found (legacy systems)cmdline.txtin both locationsChanges Made
/boot/firmwareand/bootcmdline.txtpath detection for both directory structuresTesting
/boot/firmware)This fix ensures rpi-clone works correctly on both modern and legacy Raspberry Pi OS installations.