I experienced this issue when upgrading my Raspberry Pi 4 Model B Rev
1.2 to Ubuntu Server 26.04.  I have found a fix (described below) and
have successfully completed the upgrade, but wanted to share what I
discovered in case it might help with developing a more robust fix for
the issue.


Here is the on-screen log of the issue (as much of it as I could capture):

update-initramfs: Generating /boot/initrd.img-7.0.0-1023-raspi
flash-kernel: deferring update (trigger activated)
/etc/kernel/postinst.d/zz-flash-kernel:
flash-kernel: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.151ubuntu1) ...
update-initramfs: Generating /boot/initrd.img-7.0.0-1023-raspi
Unsupported platform 'Raspberry Pi 4 Model B Rev 1.2'.
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
 old initramfs-tools package postinst maintainer script subprocess failed with 
exit status 1
Errors were encountered while processing:
 initramfs-tools
needrestart is being skipped since dpkg has failed
ERROR: Cannot create report: [Errno 17] File exists: 
'/var/crash/initramfs-tools.0.crash'
packages have been installed but needrestart is suspended
Exception during pm.DoInstall():  E:Sub-process /usr/bin/dpkg returned an error 
code (1)

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (581.0 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C):


My scenario:
  Initial installation was Ubuntu Server 20.04
  Upgraded to 22.04 earlier this year (do-release-upgrade)
  Upgraded to 24.04 earlier this year (do-release-upgrade); back-to-back with 
22.04
  Attempted upgrade to 26.04 (do-release-upgrade); failed as indicated above
  ubuntu-release-upgrader was version 26.04.27

It appears that the underlying cause of this issue may have been that
the ubuntu-server-raspi package was missing.  As I understand it, this
package didn't exist for 20.04 (my initial installation), but became
available with 22.04.  I have searched through all logs under /var/log
dating back prior to my 22.04 upgrade, and I find no reference to this
package.  For whatever reason, this package was never installed on my
system.  From what I have found online, I believe this may be the
trigger for the transition from flash-kernel to piboot-try.  Since it
was missing from my system, that transition didn't occur and the upgrade
failed.

My fix:
I restored my system with a pre-26.04-upgrade backup, manually installed 
ubuntu-server-raspi, and initiated do-release-upgrade.  The upgrade ran to 
completion, rebooted a couple of times, and all is fine now.


Observations:
An installation upgraded through multiple LTS releases can lack the Raspberry 
Pi Server metapackage even though it is running the Raspberry Pi kernel.  This 
may affect long-lived Raspberry Pi installations.
  
This appears to have been largely inconsequential through 20.04, 22.04, and 
24.04, but the 26.04 upgrader's migration detection apparently depended on that 
metapackage being present and resulted in failure of the upgrade.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2151216

Title:
  [SRU] Force switch to piboot-try on Raspberry Pi

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2151216/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to