• Bug#1102690: A higher version (...) is still installed, no reflashing r

    From Cyril Brulebois@21:1/5 to All on Sat Apr 12 08:50:01 2025
    Johannes Schauer Marin Rodrigues <josch@debian.org> (2025-04-12):
    Package: flash-kernel
    Version: 3.109+reform1

    This problem occurred with a patched flash-kernel but you know that we only patch the machines file with more entries and do not patch the scripts: https://source.mnt.re/reform/reform-debian-packages/-/blob/main/patches/flash-kernel

    Might want to adjust the version for the BTS though, I'd think?


    Cheers,
    --
    Cyril Brulebois (kibi@debian.org) <https://debamax.com/>
    D-I release manager -- Release team member -- Freelance Consultant

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEtg6/KYRFPHDXTPR4/5FK8MKzVSAFAmf6C1QACgkQ/5FK8MKz VSBEtg//XouxGmYBY341N+504K3Kchu8LlH6CMSvLjHGhCm1Oofs4YhWrYidq1ST ak5LAjNZJVtJcwnPJeDxSfUMErP+IigDBOmPdma4w9hHhUd+V+AQTR9wB4tCWMdq F45AbxhaGmaiiJl8k+iXVcdQZWuz3E9ZjBqo6aNIGM6ZOGeKWyxj3sY+hAQeXg8y BNM6y6Nru3xTOJQM1G4NTKTzL35dpY5sfuEmIxxdV6zq6t+yvIfk3YEUNoBxO04y e+h5mOUclJowDDk/UBLLI/kbuVG1nkB6sovyMtJpUL3DBiZT8BYqVuu3h+KX4kPq r170z1N2Nng0wXBQGxhclPpfYCuL10RlhjjTEX6nYq4K+Q6kE+FNbqPsRSlz0zbM Rv3JfIVNuTDDF0A/xfQxfLUrz0jWwvHnm8ekH1EGdniWdlIvSe4LswX7/eg4lhul OxsS4TmW+wy9N6Q6Ksl0XoLxLSWtVWyTvvVsDLGOwIXzdFLV5RMJcTbMM/YJBxJ2 nVuEqhflYCi5I5OCc5lcKzgx1uWADOuXRCx29Hdm6nUKrzupTD+scO6mpJJLFeeg O9sKlUoWXF6ZX0831Aq7wEXLDcNzsyT+AIGwUSGwQzvq/5RxNaA6MA3W6AMhHh/u LZLX5eAV+0XG1roATL3IQTyikV2jHnVPCGaVwFO4cJLfO10aFAA=
    =jcr3
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    *
  • From Johannes Schauer Marin Rodrigues@21:1/5 to All on Sun Apr 13 09:00:01 2025
    Quoting Vagrant Cascadian (2025-04-13 05:42:01)
    On 2025-04-12, Johannes Schauer Marin Rodrigues wrote:
    $ apt-cache policy linux-image-arm64
    linux-image-arm64:
    Installed: 6.12.19-1+reform20250322T135019Z
    Candidate: 6.12.22-1+reform20250411T222458Z
    ...
    $ sudo apt full-upgrade
    ...
    Removing linux-headers-6.12.16-mnt-reform-arm64 (6.12.16-1+reform20250219T175041Z) ...
    ...
    flash-kernel: A higher version (6.12.19-mnt-reform-arm64) is still installed, no reflashing required.
    ...
    Setting up linux-image-6.12.22-mnt-reform-arm64 (6.12.22-1+reform20250411T222458Z) ...
    ...
    Installing /usr/lib/linux-image-6.12.22-mnt-reform-arm64/amlogic/meson-g12b-bananapi-cm4-mnt-reform2.dtb into /boot/dtbs/6.12.22-mnt-reform-arm64/amlogic/meson-g12b-bananapi-cm4-mnt-reform2.dtb
    ...
    Setting up flash-kernel (3.109+reform1) ...

    So, at this point, you had 6.12.19 and 6.12.22 installed, 6.12.16 was
    removed ... and flash-kernel was just updated ... without re-running the flash-kernel scripts for 6.12.22 ... although the "Installing /usr/lib/linux-image-6.12.22...reform.dtb" was from (the older?) flash-kernel, no?

    Oh wait, is this maybe tripping up flash-kernel? The "Installing /usr/lib/linux-image-6.12.22...reform.dtb" messages come from the kernel hook script of the reform-tools package (also in Debian main). That hook script copies the dtbs of MNT platforms into /boot/dtbs/. This is necessary so that:

    - when you move your /boot to a different platform, it will already have the
    required dtbs in /boot
    - making the /boot partition bit-by-bit reproducible across system images for
    all the MNT SoMs

    Is it possible that flash-kernel gets confused that there are already files in /boot/dtbs/ that it did not install itself?


    $ uname -a
    Linux kodi 6.12.19-mnt-reform-arm64 #1 SMP Debian 6.12.19-1+reform20250322T135019Z (2025-03-22) aarch64 GNU/Linux

    And because flash-kernel was not run for 6.12.22, you end up booted to 6.12.19?

    Yes.

    Presuming this isn't some bizarre fluke, then this bug is likely present
    in most versions of flash-kernel, as that code has not been touched for
    at least a 2-5 years...

    I vaguely recall a bug or merge request coming from Ubuntu that might be related...

    I will try to reproduce this issue later using Debian kernels. My hunch is, that the problem is that a new kernel version got installed at the same time that flash-kernel got upgraded. Because at the time that 6.12.22 is installed, flash-kernel should have been run but instead we see this in the log:

    flash-kernel: deferring update (trigger activated)

    And then the only other flash-kernel related message is:

    Setting up flash-kernel (3.109+reform1)

    So maybe this is about the order of triggers? Instead of "deferring update", flash-kernel should've been run at the point of "Setting up linux-image-6.12.22", no?

    Thanks!

    cheers, josch
    --==============S21930645968365490=MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Description: signature
    Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmf7XbkACgkQ8sulx4+9 g+H1mxAAijO44slxOTKZTmxsNUwBUJyRxyiNBaum4UWJD+0XXxyovec+YF8y5Ny4 4hqIESA1N7dK+/EnIk7AXSyNgDJ4vVjyh6zul8jIDdIEn7+v3AHQAVvWmHQW4iK1 TkJCkupPwupOo7RFA2nvYrG2uwanJrxjMOmXUi+y8xCr5ufNs+3gXid50BOHzvut aTtARL1cFR1dNLvU56IWXouM7Q1L5j1wHBe5BueFOXc25voXvptTRUY7pKwhA1P8 gNVrPWmRiV2QnPqEEsGoJ2W9uZpTUrEL8TQD5fdQBV+7lSPz7Avb6dpwFzLusCfG s+zSCuQeqLhOL6uRbHShrbWPviPWnps6eW7mT0qLWE1e6G5+TRIGBlJhHOfyxHZL OkKZCLT72/pdiJRPps/YIQjDC/eXf21vVrbPOv2AJ5BkIj/1TGe27fHjB7erKWFS gCtWs4A46WMkxJCutON+6OMNGwvDzRyWGlNNHR3c2ekWMOOmC7dyK9lJwUZs+CqM uu0BqNN8S9+4CDxkmDhv+ZKDOHpKvs1kJH3ykmeSHTJG2j3MD1mpHlbIOFXYGxE3 GDtWeqmuEmKajc3ekPIh0nY0az1Tc5hVUKYcO/On2NX3f1Rs3WUKrwgLFUhs3EiO GqTZralcjN7wr2oA1kS23lUyzFkP5flGAGlXWapAnEhxWTkt4Q8=
    =dNBl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Vagrant Cascadian@21:1/5 to Vagrant Cascadian on Tue Apr 22 05:40:01 2025
    On 2025-04-12, Vagrant Cascadian wrote:
    On 2025-04-12, Johannes Schauer Marin Rodrigues wrote:
    Luckily, running flash-kernel manually fixed the issue. But had I not noticed
    that /boot/boot.scr still contained a version of a kernel that I had just
    removed, my system would've become unbootable.

    Presuming this isn't some bizarre fluke, then this bug is likely present
    in most versions of flash-kernel, as that code has not been touched for
    at least a 2-5 years...

    I vaguely recall a bug or merge request coming from Ubuntu that might be related...

    Does this by chance help at all:

    https://salsa.debian.org/installer-team/flash-kernel/-/merge_requests/41

    It is about partially installed kernels, but perhaps might fix this as a side-effect?

    live well,
    vagrant

    -----BEGIN PGP SIGNATURE-----

    iHQEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCaAcNDAAKCRDcUY/If5cW qnvFAPUdFvFAyFqsiaXBEo/HPIdbOt4noA5G5C/fvvwtfDglAQDCKAPN/F6QE7Zg /lYxN3p19VHx4txgf4rOWwUbXM8FCw==
    =Gnfc
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)