rootfs: add resize, timesync, and staging repo cleanup#124
Open
bjordiscollaku wants to merge 1 commit intomainfrom
Open
rootfs: add resize, timesync, and staging repo cleanup#124bjordiscollaku wants to merge 1 commit intomainfrom
bjordiscollaku wants to merge 1 commit intomainfrom
Conversation
Three independent improvements to the rootfs build pipeline:
1. First-boot filesystem resize (rootfs-resize.service)
- Add Step 7.6 that writes /usr/local/sbin/rootfs-resize.sh and
/etc/systemd/system/rootfs-resize.service into the rootfs from
the host side before entering chroot.
- The service uses a ConditionPathExists flag file
(/etc/rootfs-resize-pending) to guarantee single execution: on
first boot resize2fs expands the ext4 root filesystem to fill the
underlying block device, then ExecStartPost removes the flag so
the unit never fires again.
- systemctl enable rootfs-resize.service is called inside the
chroot to wire the unit into multi-user.target.
2. Time synchronization (systemd-timesyncd)
- Install and enable systemd-timesyncd inside the chroot
immediately after the networking stack.
- systemd-timesyncd is the standard lightweight SNTP client
shipped with systemd and is the broadly accepted solution on
both Ubuntu and Debian for non-server embedded/IoT targets.
It resolves clock-skew failures observed in browsers and TLS
certificate validation at runtime.
3. Staging apt source cleanup (Step 9.5)
- Remove /etc/apt/sources.list.d/pkg-oss-staging-repo.list from
the rootfs after the chroot exits and before the ext4 image is
created, ensuring internal staging repositories do not leak into
the shipped image.
keerthi-go
reviewed
Mar 23, 2026
| EOF | ||
|
|
||
| # ============================================================================== | ||
| # Step 7.6: Create first-boot rootfs resize service |
Contributor
There was a problem hiding this comment.
Can we create this as static file, or a deb package which can be installed instead of creating it at build time?
Contributor
|
Reg. time sync, should we consider to use chrony instead of systemd-timesyncd |
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.
Three independent improvements to the rootfs build pipeline:
First-boot filesystem resize (rootfs-resize.service)
Time synchronization (systemd-timesyncd)
Staging apt source cleanup (Step 9.5)