I just ran apt update and apt upgrade and upgrading the linux-image package failed with the following error:
Fetched 555 MB in 3min 13s (2,875 kB/s)
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 207348 files and directories currently installed.)
Preparing to unpack .../linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T111130Z_arm64.deb ...
Usage: /usr/bin/linux-run-hooks {preinst|postinst|prerm|postrm} MAINT-PARAMS VERSION IMAGE-PATH
/usr/bin/linux-run-hooks headers_postinst MAINT-PARAMS VERSION
This command is intended to be called from the maintainer scripts of
Linux kernel packages. It executes hooks installed in the appropriate
subdirectories of /etc/kernel and /usr/share/kernel.
The MAINT-PARAMS must be the parameters received by the maintainer
script, joined together with spaces.
The VERSION argument must be the kernel version string as shown by
'uname -r' and used in filenames.
The IMAGE-PATH argument must be the absolute filename of the kernel
image.
dpkg: error processing archive /var/cache/apt/archives/linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T111130Z_arm64.deb (--unpack):
new linux-image-6.12.25-mnt-reform-arm64 package pre-installation script subprocess returned error exit status 2
Usage: /usr/bin/linux-run-hooks {preinst|postinst|prerm|postrm} MAINT-PARAMS VERSION IMAGE-PATH
/usr/bin/linux-run-hooks headers_postinst MAINT-PARAMS VERSION
This command is intended to be called from the maintainer scripts of
Linux kernel packages. It executes hooks installed in the appropriate
subdirectories of /etc/kernel and /usr/share/kernel.
The MAINT-PARAMS must be the parameters received by the maintainer
script, joined together with spaces.
The VERSION argument must be the kernel version string as shown by
'uname -r' and used in filenames.
The IMAGE-PATH argument must be the absolute filename of the kernel
image.
dpkg: error while cleaning up:
new linux-image-6.12.25-mnt-reform-arm64 package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T111130Z_arm64.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)
This happened on a freshly installed RK in a pocket reform. Others seeing the same problem?
I have the same problem — identical error message — on an A311D pocket reform. Weirdly the system comes back up after reboot and gives:
> uname -r
6.12.25-mnt-reform-arm64
But linux-image is still listed as upgradable with that version number. So maybe it partially succeeded? And the rest of the package updates are pending too.
No worries! Thank you for attending to this so quickly. My system seems basically fine even after the partial upgrade; all I was going to do this morning was edit some text files in emacs anyway…
Preconfiguring packages ...
(Reading database ... 348207 files and directories currently installed.)
Preparing to unpack .../linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T130928Z_arm64.deb ...
argv0: preinst
argv1: upgrade 6.12.25-1+reform20250503T111130Z 6.12.25-1+reform20250503T130928Z
argv2: 6.12.25-mnt-reform-arm64
argv3: /boot/vmlinuz-6.12.25-mnt-reform-arm64
Usage: /usr/bin/linux-run-hooks {preinst|postinst|prerm|postrm} MAINT-PARAMS VERSION IMAGE-PATH
/usr/bin/linux-run-hooks headers_postinst MAINT-PARAMS VERSION
This command is intended to be called from the maintainer scripts of
Linux kernel packages. It executes hooks installed in the appropriate
subdirectories of /etc/kernel and /usr/share/kernel.
The MAINT-PARAMS must be the parameters received by the maintainer
script, joined together with spaces.
The VERSION argument must be the kernel version string as shown by
'uname -r' and used in filenames.
The IMAGE-PATH argument must be the absolute filename of the kernel
image.
dpkg: error processing archive /var/cache/apt/archives/linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T130928Z_arm64.deb (--unpack):
new linux-image-6.12.25-mnt-reform-arm64 package pre-installation script subprocess returned error exit status 2
argv0: postrm
argv1: abort-upgrade 6.12.25-1+reform20250503T111130Z 6.12.25-1+reform20250503T130928Z
argv2: 6.12.25-mnt-reform-arm64
argv3: /boot/vmlinuz-6.12.25-mnt-reform-arm64
Usage: /usr/bin/linux-run-hooks {preinst|postinst|prerm|postrm} MAINT-PARAMS VERSION IMAGE-PATH
/usr/bin/linux-run-hooks headers_postinst MAINT-PARAMS VERSION
This command is intended to be called from the maintainer scripts of
Linux kernel packages. It executes hooks installed in the appropriate
subdirectories of /etc/kernel and /usr/share/kernel.
The MAINT-PARAMS must be the parameters received by the maintainer
script, joined together with spaces.
The VERSION argument must be the kernel version string as shown by
'uname -r' and used in filenames.
The IMAGE-PATH argument must be the absolute filename of the kernel
image.
dpkg: error while cleaning up:
new linux-image-6.12.25-mnt-reform-arm64 package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-6.12.25-mnt-reform-arm64_6.12.25-1+reform20250503T130928Z_arm64.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)
Something changed in the past couple minutes. I ran the apt update, apt full-upgrade steps and got the failure, and when I reran them to capture the output, it worked.
Ah, the CI job finished at 13:59 UTC. Mirror updates happen every full hour. Maybe the mirror update at 14:00 UTC did somehow not pick up the change? But the mirror update at 15:00 UTC certainly did because the package does not contain the lines printing argv anymore.
@sontags Maybe you did not run apt update again after 15:00 UTC?
Hmmm, this still results in the same error I posted first in this thread… @josch I guess thats me not knowing how to debian. Don’t bother to much and enjoy the weekend.
That worked perfectly, thank you so much! What should I read to understand apt better? Is there an approachable introduction somewhere?
Before performing your recommended steps, I tried the command sudo apt reinstall linux-image-6.12.25-mnt-reform-arm64 because the output of dpkg -l and then dpkg --status linux-image-6.12.25-mnt-reform-arm64 said the package was half-installed and required a reinstall. Now I get: