installed linux-image-6.5.0-15-generic package post-installation script subprocess returned error exit status 1

Bug #2051418 reported by atactic
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-meta-hwe-6.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Here is the error when trying to upgrade Ubuntu:

$ sudo apt-get autoremove
[sudo] password for XXX:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  linux-image-6.5.0-14-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 248924 files and directories currently installed.)
Removing linux-image-6.5.0-14-generic (6.5.0-14.14) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.5.0-14-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: processor.max_cstate=1: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-6.5.0-14-generic (--remove):
 installed linux-image-6.5.0-14-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-6.5.0-14-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: subiquity (unknown)
ProcVersionSignature: Ubuntu 6.5.0-10.10-generic 6.5.3
Uname: Linux 6.5.0-10-generic x86_64
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
CasperMD5CheckMismatches: ./pool/restricted/n/nvidia-graphics-drivers-535/libnvidia-gl-535_535.113.01-0ubuntu3_amd64.deb ./casper/minimal.standard.live.squashfs
CasperMD5CheckResult: fail
CurrentDesktop: ubuntu:GNOME
Date: Sat Jan 27 10:39:26 2024
InstallationDate: Installed on 2023-10-29 (90 days ago)
InstallationMedia: Ubuntu 23.10.1 "Mantic Minotaur" - Release amd64 (20231016.1)
SourcePackage: subiquity
Symptom: installer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
atactic (atactic) wrote :
Revision history for this message
atactic (atactic) wrote :

Here is the list of installed images:

$ dpkg --list | grep linux-image
ii linux-image-6.5.0-10-generic 6.5.0-10.10 amd64 Signed kernel image generic
rH linux-image-6.5.0-14-generic 6.5.0-14.14 amd64 Signed kernel image generic
iF linux-image-6.5.0-15-generic 6.5.0-15.15 amd64 Signed kernel image generic
ii linux-image-generic-hwe-22.04 6.5.0.15.17 amd64 Generic Linux kernel image

Revision history for this message
atactic (atactic) wrote :

Same bug when trying to remove the problematic image:

$ sudo apt-get --purge remove linux-image-6.5.0-14-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  linux-image-6.5.0-14-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 248924 files and directories currently installed.)
Removing linux-image-6.5.0-14-generic (6.5.0-14.14) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.5.0-14-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: processor.max_cstate=1: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-6.5.0-14-generic (--remove):
 installed linux-image-6.5.0-14-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-6.5.0-14-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ken Sharp (kennybobs)
affects: subiquity → ubuntu
affects: ubuntu → linux-meta-hwe-6.5 (Ubuntu)
Revision history for this message
atactic (atactic) wrote :

Bug titel changed as per error message suggestion.

Could not install 'linux-image-6.5.0-15-generic'

The upgrade will continue but the 'linux-image-6.5.0-15-generic' package may not be in a working state. Please consider submitting a bug report about it.

installed linux-image-6.5.0-15-generic package post-installation script subprocess returned error exit status 1

Could not install the upgrades

The upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).

Revision history for this message
atactic (atactic) wrote :

$ sudo dpkg --configure -a
[sudo] password for XXX:
Setting up linux-image-6.5.0-15-generic (6.5.0-15.15) ...
Processing triggers for linux-image-6.5.0-15-generic (6.5.0-15.15) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.5.0-15-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: processor.max_cstate=1: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-6.5.0-15-generic (--configure):
 installed linux-image-6.5.0-15-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-6.5.0-15-generic

description: updated
atactic (atactic)
summary: - Error in removing linux-image-6.5.0-14-generic
+ installed linux-image-6.5.0-15-generic package post-installation script
+ subprocess returned error exit status 1
Revision history for this message
atactic (atactic) wrote (last edit ):

Software index is broken.
It is impossible to install or remove any software.

Revision history for this message
atactic (atactic) wrote (last edit ):

Self solved the issue by commenting out: processor.max_cstate=1 in grub:

$ sudo nano /etc/default/grub

GNU nano 7.2 /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash processor.max_cstate=1"
GRUB_CMDLINE_LINUX=""
#processor.max_cstate=1

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running

# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

CTRL + O > Rertun
CTRL + X

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

No clue however about this error message:
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: processor.max_cstate=1: not found

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-meta-hwe-6.5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Mohamed Fekry (m-fekry) wrote (last edit ):

Dear all
I can not upgrade my Ubuntu 23.10 because of this error. Even more some packages are generating the same error during the installation. I have dual boot system.
Here an example of the what I see when trying to update and upgrade my OS:
~/sudo apt-get upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-6.5.0-15-generic
The following packages will be upgraded:
  code google-chrome-stable xserver-common xserver-xephyr xserver-xorg-core xserver-xorg-legacy xwayland
7 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/212 MB of archives.
After this operation, 8,779 kB disk space will be freed.
Do you want to continue? [Y/n]
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
(Reading database ... 549660 files and directories currently installed.)
Removing linux-image-6.5.0-15-generic (6.5.0-15.15) ...
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 33: /etc/default/grub: want: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-6.5.0-15-generic (--remove):
 installed linux-image-6.5.0-15-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-6.5.0-15-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

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.