Score:1

Kernel Update Problem

us flag

I am running Ubuntu 21.04 on Kernel Version 5.11.0-22-generic. Today it automatically updated my NVIDIA Driver and since then when sudo apt upgrade I get:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
amd64-microcode intel-microcode iucode-tool linux-headers-generic-hwe-20.04 thermald
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-5.11.0-25-generic
Suggested packages:
  fdutils linux-doc | linux-source-5.11.0 linux-tools
  linux-modules-extra-5.11.0-25-generic
The following packages will be REMOVED:
  linux-image-unsigned-5.11.0-25-generic
The following NEW packages will be installed:
  linux-image-5.11.0-25-generic
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/11,4 MB of archives.
After this operation, 234 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: linux-image-unsigned-5.11.0-25-generic: dependency problems, but removing 
anyway as you requested:
linux-modules-5.11.0-25-generic depends on linux-image-5.11.0-25-generic | linu
x-image-unsigned-5.11.0-25-generic; however:
  Package linux-image-5.11.0-25-generic is not installed.
  Package linux-image-unsigned-5.11.0-25-generic is to be removed.

(Reading database ... 285850 files and directories currently installed.)
Removing linux-image-unsigned-5.11.0-25-generic (5.11.0-25.27) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.11.0-25-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/00_header: 451: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-unsigned-5.11.0-25-generic (--remove):
 installed linux-image-unsigned-5.11.0-25-generic package post-removal script su
bprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-unsigned-5.11.0-25-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
N0rbert avatar
zw flag
Check the "/etc/grub.d/00_header: 451: Syntax error: Unterminated quoted string" message above. Have you ever edited this file?
Frittierapparat avatar
us flag
the file is unedited (as far as i remember) and has only 450 lines
N0rbert avatar
zw flag
Then please share its contents to pastebin.
Frittierapparat avatar
us flag
https://pastebin.com/mFAi9hN3
Score:3
zw flag

You have to fix the quote inside the 42 line.

Use the following one-liner below:

sudo sed -i 's|GRUB_GFXPAYLOAD}" = "x |GRUB_GFXPAYLOAD}" = "x" |' /etc/grub.d/00_header

then run sudo update-grub again.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.