Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 905  / 2 Years ago, wed, february 2, 2022, 3:35:57

I'm using Ubuntu 20.04.3 LTS x86_64 and I've been trying to install the newest version of the kernel using:


sudo apt update && sudo apt upgrade

But by the end of the run it always shows the following message:


Adding boot menu entry for UEFI Firmware Settings
/etc/grub.d/35_fwupd: line 5: /usr/share/grub: Is a directory
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 126
dpkg: error processing package linux-image-5.4.0-84-generic (--configure):
installed linux-image-5.4.0-84-generic package post-installation script subprocess returned error exit st
atus 1
Errors were encountered while processing:
linux-image-5.4.0-84-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

The output of uname -r is:


5.4.0-81-generic.

That means that the kernel isn't correctly installed.


Does anybody have an idea of what's going on?


Edit:


By request I'm posting the content of my /etc/grub.d/35_fwupd file:


#! /bin/bash
# SPDX-License-Identifier: LGPL-2.1+
set -e

${pkgdatadir:?}
# shellcheck source=/dev/null
. "$pkgdatadir/grub-mkconfig_lib"

if [ -f /var/lib/fwupd/uefi_capsule.conf ] &&
ls /sys/firmware/efi/efivars/fwupd-*-0abba7dc-e516-4167-bbf5-4d9d1c739416 1>/dev/null 2>&1; then
source /var/lib/fwupd/uefi_capsule.conf
if [ "${EFI_PATH}" != "" ] && [ "${ESP}" != "" ]; then
echo "Adding Linux Firmware Updater entry" >&2
cat << EOF
menuentry 'Linux Firmware Updater' $menuentry_id_option 'fwupd' {
EOF
${grub_probe:?}
prepare_grub_to_access_device '`${grub_probe} --target=device ${ESP}` | sed -e "s/^/ /"'
cat << EOF
chainloader ${EFI_PATH}
}
EOF
fi
fi

More From » apt

 Answers
7

I had the same issue and answered it here


tl;dr



The upstream developers of fwupd fixed this bug like this,
i.e. they replaced the ${pkgdatadir:?} line with [ -d ${pkgdatadir:?} ]




Apparently they are the one who reported that bug, so they are aware of it and they have already fixed their package for hirsute, just not the one for focal.



[#1187] Thursday, February 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nalystcul

Total Points: 390
Total Questions: 106
Total Answers: 115

Location: Tokelau
Member since Sun, May 7, 2023
1 Year ago
nalystcul questions
Sun, May 1, 22, 17:05, 2 Years ago
Mon, Sep 6, 21, 08:12, 3 Years ago
Fri, Mar 18, 22, 20:06, 2 Years ago
;