Skip to contentSkip to conversation

#kirkstone Error creating A/B partitions using wks

DISCUSSION Gary Huband 1 participant 1 message Jun 16, 2023

lore
Share & tools
lore
#0 lore raw

I'm getting an error when building my image that will use RAUC for A/B updates. The image should have the following partitions:

bootA
rootfsA
bootB
rootfsB

My wks file:

# short-description: Create an EFI disk image with systemd-boot # long-description: Creates a partitioned EFI disk image that the user

# can directly dd to boot media. The selected bootloader is systemd-boot.
# It also includes intel-microcode as an initrd for early update support.
# Based on OE-core's systemd-bootdisk.wks file.
#
# RAUC partitions

bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "

# bootA
part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label bootA --active --align 1024 --use-uuid # rootfsA
part / --source rootfs --ondisk sda --fstype=ext4 --label rootfsA --align 1024 --use-uuid --size 4096

# bitbake throws an error with multiple boot partitions
# bootB
part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label bootB --align 1024 --use-uuid
# rootfsB
part / --source rootfs --ondisk sda --fstype=ext4 --label rootfsB --align 1024 --use-uuid --size 4096
# recovery boot
#part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label bootRescue --align 1024 --use-uuid
# recovery rootfs
part / --source rootfs --ondisk sda --fstype=ext4 --label rootfsRescue --align 1024 --use-uuid --size 2048

# user/MSi data partition
part /data --ondisk sda --fstype=ext4 --fsoptions="defaults" --label data --align 4096 --size 2048 --use-uuid

The error:

| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_wic
| INFO: Creating image(s)...
|
| ERROR: _exec_cmd: export PATH=/data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/recipe-sysroot-native/sbin:/data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/recipe-sysroot-native/usr/sbin:/data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/recipe-sysroot-native/usr/bin:/data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/recipe-sysroot-native/bin:/data/kirkstone/yocto_intel/build-msi1/tmp/hosttools:$PATH;mkdosfs -n bootB -i 0x77D66529 -C /data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/tmp-wic/boot.img 33103 returned '1' instead of 0
| output: mkdosfs: file /data/kirkstone/yocto_intel/build-msi1/tmp/work/msi1_intel_corei7_64-poky-linux/core-image-full-cmdline/1.0-r0/tmp-wic/boot.img already exists
| mkfs.fat 4.2 (2021-01-31)

Any help is appreciated.