Home  >  Edison  >  Moving to btrfs

Transferring a new btrfs image

Automatically building and installing a btrfs snapshot

First 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

Booting the @new rootfs

You can now boot @new image by interrupting U-Boot and running:

run do_altboot

Or from linux:

reboot alt

Manually building and installing a btrfs image

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.

Manually create a btrfs rootfs

In edison-image-minimal.bb change:

 # Specify rootfs image type
-IMAGE_FSTYPES = "ext4 live"
+IMAGE_FSTYPES = "btrfs ext4 live"

Create a snapshot file

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

Manually send snapshot to Edison

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"