1

Just finished updating from 17.10 to 18.04 and can't seem to update or retrieve any new packages.

Below is the error I get back from sudo apt upgrde:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gnome-tweak-tool libboost-chrono1.62.0 libboost-program-options1.62.0 libopencv-core3.1 libopencv-imgproc3.1 libsodium18
  libtbb2 libva-drm1 libva-wayland1 libva-x11-1 libva1 libx264-148 libx265-130 linux-headers-4.13.0-21
  linux-headers-4.13.0-21-generic linux-image-4.13.0-21-generic linux-image-extra-4.13.0-21-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up grub-efi-amd64 (2.02-2ubuntu8.13) ...
/var/lib/dpkg/info/grub-efi-amd64.config: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
dpkg: error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess returned error exit status 127
Setting up linux-image-4.15.0-51-generic (4.15.0-51.55) ...
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
 grub-efi-amd64-signed depends on grub-efi-amd64 | grub-pc; however:
  Package grub-efi-amd64 is not configured yet.
  Package grub-pc is not installed.

dpkg: error processing package grub-efi-amd64-signed (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up friendly-recovery (0.2.38ubuntu1) ...
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
dpkg: error processing package friendly-recovery (--configure):
 installed friendly-recovery package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of shim-signed:
 shim-signed depends on grub-efi-amd64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing triggers for linux-image-4.15.0-51-generic (4.15.0-51.55) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-51-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.15.0-51-generic (--configure):
 installed linux-image-4.15.0-51-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 grub-efi-amd64
 grub-efi-amd64-signed
 friendly-recovery
 shim-signed
 linux-image-4.15.0-51-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit

Output of cat /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_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"
GRUB_CMDLINE_LINUX=""
intel_idle.max_cstate=4

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

2
  • 1
    Looks like there is an error in your /etc/default/grub configuration file. Can you please edit your question to include its contents? Something is wrong around the string intel_idle.max_cstate=4 that should be part of the GRUB_CMDLINE_LINUX_DEFAULT variable, but seems to be misinterpreted as command instead.
    – Byte Commander
    Jun 7, 2019 at 19:35
  • Thank you so much for you help @ByteCommander, just edited the question
    – Ian
    Jun 7, 2019 at 19:39

1 Answer 1

2

Looks like there is an error in your /etc/default/grub configuration file, in this part below (second paragraph):

GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"
GRUB_CMDLINE_LINUX=""
intel_idle.max_cstate=4

The string intel_idle.max_cstate=4 should be part of the GRUB_CMDLINE_LINUX_DEFAULT variable assignment, i.e. inside the quotes after the = on that line. Because you wrote it on its own line it gets misinterpreted as a shell command instead.

Fix your file so that the snippet shown above looks like this instead:

GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open intel_idle.max_cstate=4"
GRUB_CMDLINE_LINUX=""

Save your changes and then run sudo update-grub.

After that, resume the configuration of the remaining packages with sudo dpkg --configure -a.

2
  • Thank you, I just made the edits to the file and I'm resuming the configuration, should I keep the local version currently installed or install the maintainer's version? @ByteCommander
    – Ian
    Jun 7, 2019 at 19:51
  • Usually you'd want to keep the local version, otherwise all changes to it would be overwritten. There haven't been any major changes to that file recently, as far as I know of, only minor stuff that is not necessary to include. Keep it or examine the difference and decide yourself.
    – Byte Commander
    Jun 7, 2019 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .