Re: [yocto] Simple solution to create a non-root partition image?
Quentin Schulz <[email protected]> Mon, 4 May 2026 10:47:56 +0200
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hi Michael, On 5/3/26 10:40 PM, Michael Opdenacker via lists.yoctoproject.org wrote: > Greetings, > > For an ongoing project with a read-only root filesystem, I'd like to > create an image for a non-root partition. > > To give you some context, this partition would contain data and scripts > to be used at first boot to do per device provisioning work. Some of > these would be removed after provisioning, as they could tip attackers > about how secrets are stored if they get their hands on devices that > haven't been provisioned yet. Hence, these cannot be in the read-only > root filesystem. > > To create such an image, I tried to create a new image recipe inheriting > the "image" class, and then install some packages into the image with a > "local" IMAGE_INSTALL list. > > This seems it could work, but I'm struggling with removing dependencies > (bootloader, kernel, etc) that are only relevant for a root filesystem > image. > > Would there be a simpler way to create a non root partition image? > Do you need to generate an image for that partition or can you simply have what will be part of that partition be generated along with the "root partition" image? As far as I remember, wic can split files/directories into a separate partition from the rootfs, so that would be an option that doesn't require hacking things around. Cheers, Quentin