Fix systemd-based OS customisation paths for Raspberry Pi OS Bookworm and newer.#2
Merged
Merged
Conversation
Fix systemd firstrun paths for 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
Fix systemd-based OS customisation paths for Raspberry Pi OS Bookworm and newer.
Raspberry Pi OS Bookworm changed the firmware/boot partition mount point from
/bootto/boot/firmware, so the previoussystemd.run=/boot/firstrun.shkernel command line no longer points to the generatedfirstrun.shscript on Bookworm+ images.This PR keeps backward compatibility with Bullseye/Buster and older images by selecting the path based on the target OS
release_date.Changes
/boot/firmware/firstrun.shand/boot/firmware/cmdline.txtfor images released on or after2023-10-11./boot/firstrun.shand/boot/cmdline.txtbehavior for older images or when the release date is unavailable/invalid.downloadthreadfastbootflashthreadCustomisationGeneratorso firstrun cleanup paths are provided by the caller instead of being hard-coded to/boot./boot/firstrun.shpath selection/boot/firmware/firstrun.shpath selectioncmdline.txtcleanup path in generatedfirstrun.shBackground
Raspberry Pi OS Bookworm, released on
2023-10-11, mounts the boot/firmware partition at/boot/firmwareinstead of/boot.Without this fix, systemd customisation on Bookworm+ images appends:
but the script is only available from the running OS under
/boot/firmware/firstrun.sh, so first-run customisation does not execute correctly.Compatibility
Older Raspberry Pi OS releases remain unchanged. If
release_dateis earlier than2023-10-11, missing, or invalid, the existing/bootpaths are still used.Testing