Full file system artifact and the kernel

This is not a problem, but simply a question to help me better understand the Mender ecosystem. On a SD/microSD card that has been flashed with a mender image, having both an active and a passive partition, does there exist on that card two Linux kernels, one in the active and one in the passive partition, or… is there only one Linux kernel on the card? If so, where is it? In the U Boot loader partition? And if so, does that mean that the kernel is never really update-able? (OTA) Thanks!

If its a yocto build, I think you can have both setups depending upon how you configure the mender build variables. I personally have 2 kernels, 1 on active and 1 on passive, so that I can roll kernel updates as part of a mender update.

https://docs.mender.io/2.4/artifacts/yocto-project/variables

Thank you so much for your response! I am using Raspberry Pi OS, however, your mention of “mender build variables” gives me something to look at. My thinking is just like yours: I want to be able update the kernel if necessary. Thanks again!

Hi @jmeirow there are 2 kernels even for the mender-convert versions from Raspbian. All mender-enabled systems are set up this way. Basically mender-convert (or yocto with the meta-mender layer) arranges for the kernel to be stored in the root filesystem and the boot command is updated to load it from there.
Drew

2 Likes

I see that this issue is solved, and I agree with the responses that have been provided. But I’d like to add the following in order to expand on the already-provided correct information. In my case I’m using U-Boot with the Yocto build.

There are a number of ways U-Boot (on its own) can be configured to load a kernel and filesystem. One of those ways is called “distro booting”. U-Boot’s distro booting requires that the filesystem contain a file (by default /boot/extlinux/extlinux.conf) in which the locations and names of a kernel, a device tree blob (dtb), and other parameters (e.g. initrd, bootargs) can be specified. U-Boot mounts the filesystem, finds and parses this file, loads the components into RAM (based on the values in include/configs/.h’s MEM_LAYOUT_ENV_SETTINGS variable) and boots them.

Mender requires your U-Boot to be “distro booting”-enabled then uses this mechanism to boot your board. Each of the A and B partitions has their own extlinux.conf file and therefore has its own copies of kernel, dtb, and other components.