Okay, attempt number 3! After another long dive into dpkg states, triggers, and the interactions around the kernel and initrd I think I've finally got a version that should:
1. Never install a kernel which isn't fully installed (unless --force is specified)
2. Avoids the race on waiting for a kernel to become fully installed during an apt run (when it discovers it's being asked to install a non-fully-installed kernel, it defers itself by retriggering)
3. Avoids duplicated runs (it does use the full version list from "linux-version list", but defers in the case that the latest isn't fully installed)
* Install a stock lunar preinstalled server image
* sudo add-apt-repository ppa:waveform/flash-kernel
* sudo apt install linux-xilinx-zynqmp flash-kernel
* Ensure that upgrade proceeds without error
* sudo reboot
* Ensure system boots with new kernel version (and initrd!) successfully
I've tested this several times with the raspi images (that displayed a related, but different symptom) in circumstances that do replicate the race condition without the fix and things are successful there, so I'm hoping that's also the case on Xilinx.
Okay, attempt number 3! After another long dive into dpkg states, triggers, and the interactions around the kernel and initrd I think I've finally got a version that should:
1. Never install a kernel which isn't fully installed (unless --force is specified)
2. Avoids the race on waiting for a kernel to become fully installed during an apt run (when it discovers it's being asked to install a non-fully-installed kernel, it defers itself by retriggering)
3. Avoids duplicated runs (it does use the full version list from "linux-version list", but defers in the case that the latest isn't fully installed)
It's currently building the aforementioned PPA (https:/ /launchpad. net/~waveform/ +archive/ ubuntu/ flash-kernel) and the test procedure should be the same:
* Install a stock lunar preinstalled server image flash-kernel
* sudo add-apt-repository ppa:waveform/
* sudo apt install linux-xilinx-zynqmp flash-kernel
* Ensure that upgrade proceeds without error
* sudo reboot
* Ensure system boots with new kernel version (and initrd!) successfully
I've tested this several times with the raspi images (that displayed a related, but different symptom) in circumstances that do replicate the race condition without the fix and things are successful there, so I'm hoping that's also the case on Xilinx.