Skip to content

Commit 21f3108

Browse files
committed
Add read-only Factory Image snapshot of root
Once the rootfs and kernel are fully deployed, take a read-only snapshot of @ into .snapshots/@_Factory-Image for rollback. It captures @ only; the nested subvolumes (boot/home/var-*) are separate and excluded.
1 parent 19951cb commit 21f3108

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

debian-rk3576-img.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ actions:
120120
chroot: true
121121
command: find /var/cache/linux-kernel -name linux-image-\*.deb -a ! -name \*-dbg_\* -print0 | xargs -0 apt install -y
122122

123+
# Read-only "Factory Image" snapshot of @, taken once the rootfs and kernel are
124+
# fully deployed. It captures @ only -- the nested subvols (boot/home/var-*) are
125+
# separate and excluded.
126+
- action: run
127+
description: Create the read-only Factory Image snapshot of @
128+
chroot: false
129+
command: btrfs subvolume snapshot -r "$IMAGEMNTDIR" "$IMAGEMNTDIR/.snapshots/@_Factory-Image"
130+
123131
# Unmount the nested subvolumes (deepest first), leaving @ mounted at
124132
# $IMAGEMNTDIR. debos' image-partition Cleanup unmounts @ and detaches the loop;
125133
# without this it would fail with EBUSY on the still-mounted children.

0 commit comments

Comments
 (0)