flash-kernel cannot find device-tree

Bug #2071546 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flash-kernel (Ubuntu)
New
Undecided
Unassigned

Bug Description

I ran apt-get dist-upgrade on 24.04 on a Pine64 A64 LTS board and saw the following error:

Setting up linux-image-6.8.0-36-generic (6.8.0-36.36) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.8.0-31-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-6.8.0-31-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-6.8.0-36-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.8.0-36-generic
Setting up git (1:2.43.0-1ubuntu7.1) ...
Setting up linux-tools-6.8.0-36 (6.8.0-36.36) ...
Setting up python3-netplan (1.0-2ubuntu1.2) ...
Setting up libc6-dev:arm64 (2.39-0ubuntu8.2) ...
Setting up curl (8.5.0-2ubuntu10.1) ...
Setting up ubuntu-advantage-tools (32.3~24.04) ...
Setting up netplan-generator (1.0-2ubuntu1.2) ...
Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator'
Setting up initramfs-tools-core (0.142ubuntu25.1) ...
Setting up linux-image-generic (6.8.0-36.36) ...
Setting up initramfs-tools (0.142ubuntu25.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-generic (6.8.0-36.36) ...
Setting up netplan.io (1.0-2ubuntu1.2) ...
Setting up linux-tools-6.8.0-36-generic (6.8.0-36.36) ...
Setting up cloud-init (24.1.3-0ubuntu3.3) ...
Setting up flash-kernel (3.107ubuntu8) ...
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
flash-kernel: deferring update (trigger activated)
Setting up apport-core-dump-handler (2.28.1-0ubuntu3) ...
Setting up apport (2.28.1-0ubuntu3) ...
apport-autoreport.service is a disabled or a static unit not running, not starting it.
Processing triggers for dbus (1.14.10-4ubuntu4) ...
Processing triggers for install-info (7.1-3build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.2) ...
Processing triggers for rsyslog (8.2312.0-3ubuntu9) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for linux-image-6.8.0-36-generic (6.8.0-36.36) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-36-generic
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
Installing /lib/firmware/6.8.0-36-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb into /boot/dtbs/6.8.0-36-generic/allwinner/sun50i-a64-pine64-lts.dtb
Installing new sun50i-a64-pine64-lts.dtb.
flash-kernel: deferring update (trigger activated)
/etc/kernel/postinst.d/zz-flash-kernel:
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
Installing /lib/firmware/6.8.0-36-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb into /boot/dtbs/6.8.0-36-generic/allwinner/sun50i-a64-pine64-lts.dtb
Taking backup of sun50i-a64-pine64-lts.dtb.
Installing new sun50i-a64-pine64-lts.dtb.
flash-kernel: deferring update (trigger activated)
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Sourcing file `/etc/default/grub.d/99-my.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.0-36-generic
Found initrd image: /boot/initrd.img-6.8.0-36-generic
Found linux image: /boot/vmlinuz-6.8.0-31-generic
Found initrd image: /boot/initrd.img-6.8.0-31-generic
Found linux image: /boot/vmlinuz-6.5.0-28-generic
Found initrd image: /boot/initrd.img-6.5.0-28-generic
Adding boot menu entry for UEFI Firmware Settings ...
done
Processing triggers for initramfs-tools (0.142ubuntu25.1) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-36-generic
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
Installing /lib/firmware/6.8.0-36-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb into /boot/dtbs/6.8.0-36-generic/allwinner/sun50i-a64-pine64-lts.dtb
Taking backup of sun50i-a64-pine64-lts.dtb.
Installing new sun50i-a64-pine64-lts.dtb.
Ignoring old or unknown version 6.8.0-36-generic (latest is )
Processing triggers for flash-kernel (3.107ubuntu8) ...
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
Couldn't find DTB sun50i-a64-pine64-lts.dtb on the following paths: /etc/flash-kernel/dtbs /usr/lib/linux-image- /lib/firmware//device-tree/
Installing into /boot/dtbs//allwinner/sun50i-a64-pine64-lts.dtb
cp: cannot stat '': No such file or directory
dpkg: error processing package flash-kernel (--configure):
 installed flash-kernel package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 flash-kernel
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: flash-kernel 3.107ubuntu8
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic aarch64
ApportVersion: 2.28.1-0ubuntu3
Architecture: arm64
CasperMD5CheckResult: unknown
CloudArchitecture: aarch64
CloudBuildName: server
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSerial: 20230910
CloudSubPlatform: seed-dir (/var/lib/cloud/seed/nocloud-net)
Date: Sun Jun 30 12:11:32 2024
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=vt220
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: flash-kernel
UpgradeStatus: Upgraded to noble on 2024-04-20 (71 days ago)

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

These device-tree files are available on the system:

/lib/firmware/6.5.0-28-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb
/lib/firmware/6.8.0-31-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb
/lib/firmware/6.8.0-36-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

Running flash-kernel manually also hows that the latest kernel version is not determined correctly:

$ sudo flash-kernel 6.8.0-36-generic
Using DTB: allwinner/sun50i-a64-pine64-lts.dtb
Installing /lib/firmware/6.8.0-36-generic/device-tree/allwinner/sun50i-a64-pine64-lts.dtb into /boot/dtbs/6.8.0-36-generic/allwinner/sun50i-a64-pine64-lts.dtb
Taking backup of sun50i-a64-pine64-lts.dtb.
Installing new sun50i-a64-pine64-lts.dtb.
Ignoring old or unknown version 6.8.0-36-generic (latest is )

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The problem stems from this line in all.db:

Kernel-Flavors: arm64

Ubuntu does not use a Linux kernel flavor arm64.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

We should use

Kernel-Flavors: any

We should further change include_only_flavors() to assume any if no Kernel-Flavors line is specified.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.