2

I am trying to implement a software update process for a generic x86_64 system using Yocto and SWUpdate. I would like to have two root partitions, with SWUpdate overwriting the inactive one (dual copy strategy). I am trying to create a WIC image to test this in virtualbox (.wic.vdi image)

My problem is in creating the dual rootfs image. So far I have a .wks file:

bootloader --ptable gpt
part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 --use-uuid
part / --source rootfs --fstype=ext4 --label image1 --align 1024 --exclude-path boot/
part / --source rootfs --fstype=ext4 --label image2 --align 1024 --exclude-path boot/
part swap --ondisk sda --size 1024 --label swap --fstype=swap

This creates a wic image with the right partitions, but the bootloader in the first fat partition seems invalid - it does not boot in virtualbox.

If I change the boot partition to

part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024

It will now boot, but I don't have control over the data in the boot partition via bbappends files. I need to be able to edit the grub.cfg and add a grub environment file. As far as I can tell the bootimg-efi is created by the WIC system, so I can't override that easily.

Rachid K.
  • 4,490
  • 3
  • 11
  • 30
docsteer
  • 2,506
  • 16
  • 16
  • bootimg-efi is a wic plugin, perhaps you can derive your own plugins from this one and add the changes you need. – Khem Apr 28 '20 at 03:10
  • Did you look at [grub-bootconf](https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/grub/grub-bootconf_1.00.bb) recipe? – Nayfe Apr 28 '20 at 07:58
  • Did you ever figure this out? Is there any way you can answer your own question and let us know what you did? – mitchellJ Feb 03 '23 at 14:44

0 Answers0