Booting A/B, where is the kernel used for booting device? #301
Replies: 3 comments 1 reply
-
With the scarthgap-based, and later, branches, we default to using extlinux.conf for locating the kernel and device tree. The separate kernel/kernel-dtb partitions, if present in your flash layout, should still be kept up-to-date, since they are used as fallback by the L4TLauncher EFI application if it has problems loading the OS via the extlinux configuration. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I had the idea that the tegra-demo-distro did set all up, including the boot of A/B kernel. What it does is to add the core-image which includes the kernel via recopies in poky. Thats why it still boots after clearing the kernel partitions. If one will use the kernels in the partitions, the extlinux.conf file should be changed using a bbappend. The kernel could be deleted from the rootfs but then the fallback will fail. Is this correct? |
Beta Was this translation helpful? Give feedback.
-
@dwalkes, thanks for pointing me in the right direction. My end goal is to have a secure boot where kernel can verify the rootfs. That seems to be a preferred method AFIK. |
Beta Was this translation helpful? Give feedback.
-
I have a working system so this is just a question about "how stuff works".
I am using branch scarthgap-l4t-r35.x on tegra-demo-distro and have found similar result for other branches. The development board is a orin-nano 8Gb NVidia development board. That branch was selected to get back to a known state.
I have inspecting the partition layout and from the file flash_l4t_t234_nvme_rootfs_ab.xml there should be a redundant setup. That also seems to match the logs during flashing
The APP has id=1 and APP_b has a id=2 so it seems to match the xml partition layout description in the xml file.
So far, so good, but I had a hard time to verify the boot selection/boot order using the boot log and system inspection.
So I decided to clear the A_kernel partition on a running system using
dd if=/dev/zero of=/dev/nvme0n1p3
.I expected a boot failure/switch to B_kernel since the kernel was gone. But, the system booted without any delay.
Then I cleared the B_kernel, to see if some magic fallback had occurred. But, the system still booted without any delay.
Finally, I tried to clear the APP and that "worked". After three boot attempts in UEFI it switched to APP_b.
But, the system should not boot at all since there is no kernel ?
Is something "not quite ready" but layout is kept for future use.
The running kernel is not in in sda3 but "somewhere else", probably in the rootfs partition?
Beta Was this translation helpful? Give feedback.
All reactions