PINE64
How to boot an older, working kernel - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: How to boot an older, working kernel (/showthread.php?tid=19487)



How to boot an older, working kernel - bits - 11-01-2024

Earlier this year, there was an update to the Linux kernel that broke booting Rock64 from their eMMC and it was necessary to force using an older, working kernel version.  It's since been fixed, but in case there is again a need to boot with a kernel older than the latest, here's one way:



Drop a file in /etc/flash-kernel/ubootenv.d that forces the U-Boot environment variable fk_kvers to a working kernel version present in your /boot, then run flash-kernel to regenerate the U-Boot bootscript /boot/boot.scr





echo "env set fk_kvers 6.1.0-22-arm64" > /etc/flash-kernel/ubootenv.d/90-force-kernel-version &&

flash-kernel



When you want to stop forcing the kernel version, remove /etc/flash-kernel/ubootenv.d/90-force-kernel-version, run flash-kernel, and reboot



This works because flash-kernel rebuilds /boot/boot.scr from the template /etc/flash-kernel/bootscript/bootscr.uboot-generic, and this includes "@@UBOOT_ENV_EXTRA@@", which gets replaced by the contents of each of the files in /etc/flash-kernel/ubootenv.d/ and the boot script boots the referenced kernel