[Bug 2149961] [NEW] Dist-Upgrade failure / old linux-image-7.0.0-12-generic package postrm maintainer script subprocess failed with exit status 1
Bogdan S
2149961 at bugs.launchpad.net
Wed Apr 22 18:04:00 UTC 2026
Public bug reported:
Hi DevTeam,
Keep getting this error for the last few days.
Would be great if the error message would be a bit more verbose.
And if dpkg -a would sort it ;)
I used GrubCustomizer a few days ago - did not change much, except for
graphic layout
Original and Edited Grub Config - attached.
Cheers
***
sudo apt upgrade
[sudo: authenticate] Password:
The following package was automatically installed and is no longer required:
nvidia-firmware-580-580.142
Use 'sudo apt autoremove' to remove it.
REMOVING:
linux-image-7.0.0-12-generic
Summary:
Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 0
3 not fully installed or removed.
Freed space: 17.3 MB
Continue? [Y/n] y
(Reading database… 361247 files and directories currently installed.)
Removing linux-image-7.0.0-12-generic (7.0.0-12.12)…
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-7.0.0-12-generic
/etc/kernel/postrm.d/kdump-tools:
kdump-tools: Removing kdump tracking files for kernel version: 7.0.0-12-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot
entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-12-generic (--remove):
old linux-image-7.0.0-12-generic package postrm maintainer script subprocess fa
iled with exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-7.0.0-12-generic
Processing was halted because there were too many errors.
Error: Sub-process /usr/bin/dpkg returned an error code (1)
***
sudo dpkg --configure -a
Setting up linux-image-7.0.0-14-generic (7.0.0-14.14)…
Setting up linux-image-7.0.0-13-generic (7.0.0-13.13)…
Processing triggers for linux-image-7.0.0-14-generic (7.0.0-14.14)…
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/kdump-tools:
kdump-tools: Generating /var/lib/kdump/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-14-generic (--configure):
old linux-image-7.0.0-14-generic package postinst maintainer script subprocess failed with exit status 1
Processing triggers for linux-image-7.0.0-13-generic (7.0.0-13.13)…
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.0.0-13-generic
/etc/kernel/postinst.d/kdump-tools:
kdump-tools: Generating /var/lib/kdump/initrd.img-7.0.0-13-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-13-generic (--configure):
old linux-image-7.0.0-13-generic package postinst maintainer script subprocess failed with exit status 1
Errors were encountered while processing:
linux-image-7.0.0-14-generic
linux-image-7.0.0-13-generic
ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: ubuntu-release-upgrader-core 1:26.04.16
ProcVersionSignature: Ubuntu 7.0.0-13.13-generic 7.0.0-rc7
Uname: Linux 7.0.0-13-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 22 20:32:42 2026
InstallationDate: Installed on 2026-02-03 (78 days ago)
InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64 (20250805.1)
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: ubuntu-release-upgrader
Symptom: dist-upgrade
UpgradeStatus: No upgrade log present (probably fresh install)
VarLogDistupgradeTermlog:
mtime.conffile..etc.update-manager.release-upgrades: 2026-04-15T13:25:26.553685
** Affects: ubuntu-release-upgrader (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug dist-upgrade resolute wayland-session
** Attachment added: "GRUB.zip"
https://bugs.launchpad.net/bugs/2149961/+attachment/5964106/+files/GRUB.zip
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2149961
Title:
Dist-Upgrade failure / old linux-image-7.0.0-12-generic package postrm
maintainer script subprocess failed with exit status 1
Status in ubuntu-release-upgrader package in Ubuntu:
New
Bug description:
Hi DevTeam,
Keep getting this error for the last few days.
Would be great if the error message would be a bit more verbose.
And if dpkg -a would sort it ;)
I used GrubCustomizer a few days ago - did not change much, except for
graphic layout
Original and Edited Grub Config - attached.
Cheers
***
sudo apt upgrade
[sudo: authenticate] Password:
The following package was automatically installed and is no longer required:
nvidia-firmware-580-580.142
Use 'sudo apt autoremove' to remove it.
REMOVING:
linux-image-7.0.0-12-generic
Summary:
Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 0
3 not fully installed or removed.
Freed space: 17.3 MB
Continue? [Y/n] y
(Reading database… 361247 files and directories currently installed.)
Removing linux-image-7.0.0-12-generic (7.0.0-12.12)…
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-7.0.0-12-generic
/etc/kernel/postrm.d/kdump-tools:
kdump-tools: Removing kdump tracking files for kernel version: 7.0.0-12-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot
entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-12-generic (--remove):
old linux-image-7.0.0-12-generic package postrm maintainer script subprocess fa
iled with exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-7.0.0-12-generic
Processing was halted because there were too many errors.
Error: Sub-process /usr/bin/dpkg returned an error code (1)
***
sudo dpkg --configure -a
Setting up linux-image-7.0.0-14-generic (7.0.0-14.14)…
Setting up linux-image-7.0.0-13-generic (7.0.0-13.13)…
Processing triggers for linux-image-7.0.0-14-generic (7.0.0-14.14)…
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/kdump-tools:
kdump-tools: Generating /var/lib/kdump/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-14-generic (--configure):
old linux-image-7.0.0-14-generic package postinst maintainer script subprocess failed with exit status 1
Processing triggers for linux-image-7.0.0-13-generic (7.0.0-13.13)…
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.0.0-13-generic
/etc/kernel/postinst.d/kdump-tools:
kdump-tools: Generating /var/lib/kdump/initrd.img-7.0.0-13-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-7.0.0-13-generic
Found initrd image: /boot/initrd.img-7.0.0-13-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 338
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-7.0.0-13-generic (--configure):
old linux-image-7.0.0-13-generic package postinst maintainer script subprocess failed with exit status 1
Errors were encountered while processing:
linux-image-7.0.0-14-generic
linux-image-7.0.0-13-generic
ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: ubuntu-release-upgrader-core 1:26.04.16
ProcVersionSignature: Ubuntu 7.0.0-13.13-generic 7.0.0-rc7
Uname: Linux 7.0.0-13-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 22 20:32:42 2026
InstallationDate: Installed on 2026-02-03 (78 days ago)
InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64 (20250805.1)
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: ubuntu-release-upgrader
Symptom: dist-upgrade
UpgradeStatus: No upgrade log present (probably fresh install)
VarLogDistupgradeTermlog:
mtime.conffile..etc.update-manager.release-upgrades: 2026-04-15T13:25:26.553685
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2149961/+subscriptions
More information about the foundations-bugs
mailing list