UBIFS authentication for rootfs and keyring

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

It seems you’re encountering issues with mounting a UBIFS as read-only without manually adding a key to the kernel keyring using keyctl. This is because UBIFS with authentication requires a key to verify the filesystem’s integrity.

When using UBIFS with authentication, a key is needed to decrypt or verify the filesystem’s metadata. Typically, this involves creating a key with keyctl and passing its name during the mount operation.

To automate this process and avoid manual key addition at runtime, consider the following options:

  1. Initramfs Approach: You can use an initramfs to handle key creation and addition to the kernel keyring before the main root filesystem is mounted. This involves scripting the key creation process in the initramfs, ensuring the key is available when the root filesystem is mounted.

  2. Custom Kernel Module or Driver: Developing a custom kernel module or driver that automatically adds the required key to the kernel keyring during boot is another solution. This requires kernel development expertise and thorough testing to ensure stability and security.

Unfortunately, there is no direct method to add keys via device tree or kernel configuration in the current Linux kernel. Therefore, runtime solutions like initramfs or custom drivers are necessary.

If a read-only root filesystem is sufficient for your needs, TorizonCore’s default setup might be beneficial. However, for UBIFS authentication, the above methods would be necessary to automate key management.

I hope this helps clarify your options.

Best regards,
Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

https://www.kernel.org/pub//linux/kernel/v5.x/ChangeLog-5.16.19

Capacitive touch display 7" doesn't work with iMX6ULL and Aster.