Hello,
On u-boot based systems there often might be other files that need to be updated together with kernel/initramfs updates - like device tree blobs (actually several of these if you want to reuse the same kernel on several devices), uEnv.txt or compiled boot script, and maybe even second stage bootloader or what not. Updating only kernel/initramfs and skipping all these other files might result in system that does not boot.
What OSTree does is - it copies kernel/initramfs images to /boot partition when "ostree deploy" is performed. I think we should add a functionality in OSTree where it copies all files that were committed in /boot directory to /boot partition when "ostree deploy" is performed. So whatever you had in your commit tree in /boot directory (the one that currently contains vmlinuz-${bootcsum} and initramfs-${bootcsum}) should end up on /boot partition.
One way to workaround this issue is to keep your whole sysroot on a single partition. Patch for this was introduced in https://github.com/GNOME/ostree/commit/598530daf45a8bcb3be171732569b8aad0f4345d , but there are several disadvantages in this approach in my opinion:
1) Default boot scripts on *many* devices expect system based on 2 partitions and changing these might not be a quick and easy task. 2) If users of your update system would want to use a file system that is not supported by u-boot (see Compatible file systems in https://en.wikipedia.org/wiki/Das_U-Boot) like btrfs, then this single partition layout won't work anymore, since u-boot can't read/load kernel/initramfs from btrfs.
For the reasons explained above I would like to keep all files that are required for booting the system on /boot partition where its file system type is independent from /rootfs file systems type.
I was wondering: - what others who use OSTree on u-boot based systems think about this? - is this relevant for grub based systems too or there having only kernel/initramfs on /boot is sufficient?
|