Dear Maintainer,
when using uboot ... update-initramfs triggers flash-kernel to _always_
write latest kernel version into flash-memory.
Even if this might be helpful in many cases ... there are situations
where this behavior is unexpected.
Assume that a user want to do a quick test with the latest kernel
version from backports.
Using apt to install the new kernel version will trigger flash-kernel
which writes the latest kernel version into flash memory which is most
likely the expected behavior.
After reboot the system will boot the new kernel and the user can
perform some tests.
How to get back to the original (stable) kernel?
1) Using 'apt remove linux-image-6.0.0-0.deb11.6-marvell' will will
through a warning and actually does not work (at least not on my system).
2) Using 'update-initramfs -u -k 5.10.0-21-marvell' triggers
flash-kernel but refuses to write kernel 5.10.0-21-marvell to flash
memory - instead the latest kernel version 6.0.0-0.deb11.6-marvell is
used (see output below). Interestingly, the output suggest to use the
--force option ... however, this option is not available for
update-initramfs.
3) Using 'flash-kernel --force 5.10.0-21-marvell' is working fine - it
just writes the stable kernel back into flash memory (which will be
started after reboot). However, whenever update-initramfs is
(automatically) triggered it will rewrite the unstable kernel version
into flash memory which is not really expected.
4) A workaround (after using method 3) would be to remove kernel 6.0 via
apt which works fine - however, this will again trigger flash-kernel to
rewrite kernel 5.10 into flash memory which would not have been
necessary (since it was already written into flash memory).
Additional information:
Writing into flash memory can take quite some time (e.g. 15 minutes in
my case). Unexpected flashing or flashing the 'wrong' kernel should
therefore be avoided.
Possible solutions for this problem:
* update-initramfs is asking if flash-kernel should be triggered or not
* update-initramfs allows to select the kernel version which is
written to flash memory
* update-initramfs provides (while running) a menu to select the
kernel version (including default) which is written to flash memory.
* other solutions ...
Output of 'update-initramfs -u -k 5.10.0-21-marvell':
update-initramfs: Generating /boot/initrd.img-5.10.0-21-marvell
kirkwood-qnap: machine: QNAP TS419 family
Using DTB: kirkwood-ts419-6282.dtb
Installing
/usr/lib/linux-image-5.10.0-21-marvell/kirkwood-ts419-6282.dtb into
/boot/dtbs/5.10.0-21-marvell/./kirkwood-ts419-6282.dtb
Taking backup of kirkwood-ts419-6282.dtb.
Installing new kirkwood-ts419-6282.dtb.
Ignoring old or unknown version 5.10.0-21-marvell (latest is
6.0.0-0.deb11.6-marvell)
Use --force if you want version 5.10.0-21-marvell.
Installing
/usr/lib/linux-image-6.0.0-0.deb11.6-marvell/kirkwood-ts419-6282.dtb
into /boot/dtbs/6.0.0-0.deb11.6-marvell/./kirkwood-ts419-6282.dtb
Taking backup of kirkwood-ts419-6282.dtb.
Installing new kirkwood-ts419-6282.dtb.
flash-kernel: installing version 6.0.0-0.deb11.6-marvell
flash-kernel: appending
/usr/lib/linux-image-6.0.0-0.deb11.6-marvell/kirkwood-ts419-6282.dtb to
kernel
Generating kernel u-boot image... done.
Flashing kernel (using 2609102/3145728 bytes)... done.
Flashing initramfs (using 6465055/12582912 bytes)... done.