[SRU] flash-kernel failure when upgrading f-k and kernel in the same cycle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flash-kernel (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Confirmed
|
Undecided
|
Unassigned | ||
Jammy |
Incomplete
|
Undecided
|
Unassigned | ||
Kinetic |
Invalid
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
In version 3.104ubuntu15 of flash-kernel, when both f-k and the kernel are upgraded in the same cycle, depending on the ordering of dpkg trigger execution, f-k may find the content of /boot "inconsistent" causing it to fail and return error exit status 1.
Erorr message:
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for flash-kernel (3.104ubuntu15) ...
flash-kernel: installing version 5.15.0-
Initrd required for FIT method
dpkg: error processing package flash-kernel (--configure):
installed flash-kernel package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-
/etc/kernel/
update-initramfs: Generating /boot/initrd.
flash-kernel gets the latest kernel version by "linux-version list".
When flash-kernel was triggered to generate fitimage, the kernel version is "5.15.0-1018" and the initrd for it wasn't ready. So, flash-kernel failed to generate the fitimage.
A subsequent run of "apt install -f" fixed things because, by that point, the kernel's own trigger had executed, ensuring that update-initramfs had been run. In the case that f-k is run "prematurely" and finds itself in this situation (/boot/
[Test Case]
1. Flash an old image (with an out of date kernel and flash-kernel)
2. sudo apt-get update
3. sudo apt install flash-kernel with the fix and linux packages
4. Upgrade should proceed without issue
[Regression Potential]
As with the previous flash-kernel uploads, it is possible that a breakage in the changed code can lead to issues with upgrading kernels (due to f-k being executed via a trigger at the end) or with Xilinx devices in the field not upgrading correctly. I will test all the changes extensively though.
Related issues:
LP: #1861292 flash-kernel failure during kernel upgrade
summary: |
- flash-kernel failure when upgrading f-k anad kernel in the same cycle + [SRU] flash-kernel failure when upgrading f-k anad kernel in the same + cycle |
summary: |
- [SRU] flash-kernel failure when upgrading f-k anad kernel in the same + [SRU] flash-kernel failure when upgrading f-k and kernel in the same cycle |
tags: | added: foundations-todo |
The same issue (LP: #1861292) was fixed on focal, but the fix is not available after jammy. The patch for focal cannot be applied to lunar because of [1].
--- /salsa. debian. org/installer- team/flash- kernel/ -/commit/ 30f64ebd28553e7 4986aa4a80963b4 2f478a4d3d
[1] https:/