Skip to content

expand-rootfs#40

Merged
mihai-chiorean merged 3 commits intoedgeengineer:mainfrom
StefanaHanc:feature/expand-rootfs
Oct 7, 2025
Merged

expand-rootfs#40
mihai-chiorean merged 3 commits intoedgeengineer:mainfrom
StefanaHanc:feature/expand-rootfs

Conversation

@StefanaHanc
Copy link
Contributor

This recipe installs a systemd service and script that automatically
expands the root partition and resizes the filesystem on first boot.

  • Supports ext4, xfs, btrfs
  • Handles GPT backup relocation using sgdisk
  • Uses stamp file to ensure it runs only once
  • Enabled by default via systemd

echo "[expand-rootfs] RootDEV=$ROOTDEV Disk=$DISK Part=$PARTNUM FS=$FSTYPE"

# Skip if an A/B rootfs layout is detected (e.g. mender)
if lsblk -rno PARTLABEL "$DISK" 2>/dev/null | grep -qiE 'root[a-b]'; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part will be interesting. we do want to get to an A/B setup, but at that point I think we'll have a separate partition for data so updates to the os don't wipe everything out.

@mihai-chiorean mihai-chiorean merged commit 5fce20a into edgeengineer:main Oct 7, 2025
3 checks passed
@mihai-chiorean
Copy link
Member

Resolves #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants