btrfs
snapshot@new
rootfsbtrfs
image
btrfs
snapshotFirst make sure you have run btrfsSnapshot.py
once (and only once) on your image, see Automatic conversion
btrfsSnapshot.py
will also produce a compressed btrfs snapshot out/current/build/tmp/deploy/images/edison/edison-image-edison.snapshot.7z
. The snapshot containing the rootfs has the name @new
.
This can be send over-the-air (OTA) to a booted Edison assuming it is accessible with ssh root@edison.local
:
meta-intel-edison/utils/flash/btrfsFlashOta.sh -i
@new
rootfsYou can now boot @new
image by interrupting U-Boot and running:
run do_altboot
Or from linux:
reboot alt
@boot
and modules
at this point, so the new image will boot with the existing kernel. If you want to install multiple kernels read Installing an alternate kernel.btrfs
imagebtrfs
patches there is no need to do these manual steps. These are just here for reference purposes.These steps will create a btrfs
image in conjunction with the ext4 image. However, btrfs
allows you to have multiple subvolumes in a single pool. We will leave the existing subvolume in @ and put the newly built in @new.
btrfs
rootfsIn edison-image-minimal.bb change:
# Specify rootfs image type
-IMAGE_FSTYPES = "ext4 live"
+IMAGE_FSTYPES = "btrfs ext4 live"
Mount the btrfs
image in tmp/deploy/images/edison/:
mkdir tmp
udisksctl loop-setup -f edison-image-edison.btrfs --no-user-interaction
sudo `btrfs` su snap -r tmp tmp/@new
sudo `btrfs` send tmp/@new/ > edison-image-edison.snapshot
sudo umount tmp
ssh root@edison.local "umount /mnt"
ssh root@edison.local "mount /dev/disk/by-partlabel/rootfs /mnt"
cat edison-image-edison.snapshot | ssh root@edison.local "btrfs receive /mnt"
ssh root@edison.local "btrfs property set -ts /mnt/@new ro false"
© 2018 Ferry Toth