title: How to implement A/B dual copy scheme partitioning?
body: <p>I am trying to implement A+B dual copy scheme partition on my Avenger96 board. I am using Yocto build system and also <code>.wks</code> file to create partitions. My <code>.wks</code> file:</p>
  <pre><code>part fsbl1 --source rawcopy --sourceparams=&quot;file=u-boot-spl.stm32&quot; --part-name &quot;fsbl1&quot; --ondisk mmcblk --align 1 --size 256k
  part fsbl2 --source rawcopy --sourceparams=&quot;file=u-boot-spl.stm32&quot; --part-name &quot;fsbl2&quot; --ondisk mmcblk --align 1 --size 256k
  part ssbl --source rawcopy --sourceparams=&quot;file=u-boot.itb&quot; --part-name &quot;ssbl&quot; --ondisk mmcblk --align 1 --size 2M
  part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root_A --part-name &quot;rootfs_A&quot; --align 4096 --use-uuid --active --size 3G
  part /rootfsB --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root_B --part-name &quot;rootfs_B&quot; --align 4096 --use-uuid --size 3G
  
  bootloader --ptable gpt
  </code></pre>
  <p>And I am able to build <code>.wic.xz</code> image and copied image to SD. It created 2 rootfs partitions.</p>
  <p>But when I boot using this SD card, I could see both partitions are mounted. For example, there is also <code>/dev/root</code> which refers to current active partition <code>/dev/mmcblk0p4</code> and also <code>/dev/mmcblk0p5</code> (/rootfsB) when I do <code>df -h</code></p>
  <pre><code>Filesystem                Size      Used Available Use% Mounted on
  /dev/root                 5.0G      1.1G      3.6G  23% /
  devtmpfs                469.7M         0    469.7M   0% /dev
  tmpfs                   502.2M         0    502.2M   0% /dev/shm
  tmpfs                   502.2M      9.6M    492.5M   2% /run
  tmpfs                   502.2M         0    502.2M   0% /sys/fs/cgroup
  tmpfs                   502.2M         0    502.2M   0% /tmp
  tmpfs                   502.2M     16.0K    502.1M   0% /var/volatile
  /dev/mmcblk0p5            5.0G      1.1G      3.6G  23% /rootfsB
  tmpfs                   100.4M         0    100.4M   0% /run/user/0
  </code></pre>
  <p>And boot messages also show:</p>
  <pre><code>Mounting /rootfsB...
           Starting Start psplash boot splash screen...
  [  OK  ] Mounted /rootfsB.
  </code></pre>
  <p>Also doing <code>mount</code> from linux user-space results in:</p>
  <pre><code>/dev/mmcblk0p4 on / type ext4 (rw,relatime)
  devtmpfs on /dev type devtmpfs (rw,relatime,size=480932k,nr_inodes=120233,mode=755)
  sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
  proc on /proc type proc (rw,relatime)
  securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
  tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
  devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
  tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
  tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
  cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
  cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
  pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
  debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
  tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
  configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
  tmpfs on /var/volatile type tmpfs (rw,relatime)
  /dev/mmcblk0p5 on /rootfsB type ext4 (rw,relatime)
  tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=102840k,mode=700)
  </code></pre>
  <p>Is this the expected behavior for A+B type partitioning?</p>
  <p>Can anyone please let me know what could be the issue and how to resolve it?</p>
  <p>Your help will be much appreciated.</p>
  <p>Thanks in advance.</p>
  <p>P.S: Please let me know if any info is missing here.</p>