As you can see in the output grub-common failed to install because the service failed to restart which edits the /boot/grub/grubenv file. This indicates the file is corrupted either due to a bug in grub we don't know about, a hard reset during grub running which corrupted the disk cache or something like that, or the drive is failing.
My suggestion is to perform a drive check and delete the file to solve the issue. ** Changed in: apt (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/2023745 Title: apt, dpkg: dependency problems prevent configuration of grub-pc Status in apt package in Ubuntu: Invalid Bug description: #sudo apt update output: Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease Hit:3 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease Hit:5 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 7 packages can be upgraded. Run 'apt list --upgradable' to see them. # sudo apt list --upgradable output: Listing... Done fwupd-signed/jammy-updates 1.51.1~22.04.1+1.4-0ubuntu0.1 amd64 [upgradable from: 1.51~22.04.1+1.2-3ubuntu0.2] fwupd/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1] gnome-shell-extension-ubuntu-dock/jammy-updates,jammy-updates 72~ubuntu5.22.04.2.1 all [upgradable from: 72~ubuntu5.22.04.1] google-chrome-stable/stable 114.0.5735.133-1 amd64 [upgradable from: 114.0.5735.106-1] libfwupd2/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1] libfwupdplugin5/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1] ubuntu-drivers-common/jammy-updates 1:0.9.6.2~0.22.04.3 amd64 [upgradable from: 1:0.9.6.1] #sudo apt upgrade -y output: Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done Get more security updates through Ubuntu Pro with 'esm-apps' enabled: imagemagick libopenexr25 libpostproc55 libmagickcore-6.q16-6-extra libavcodec58 libmagickwand-6.q16-6 libavutil56 imagemagick-6.q16 libswscale5 libmagickcore-6.q16-6 libswresample3 imagemagick-6-common libavformat58 libavfilter7 Learn more about Ubuntu Pro at https://ubuntu.com/pro The following packages have been kept back: gnome-shell-extension-ubuntu-dock ubuntu-drivers-common The following packages will be upgraded: fwupd fwupd-signed google-chrome-stable libfwupd2 libfwupdplugin5 5 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 4 not fully installed or removed. Need to get 97.2 MB of archives. After this operation, 7,070 kB of additional disk space will be used. Get:1 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 114.0.5735.133-1 [94.4 MB] Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 fwupd amd64 1.7.9-1~22.04.3 [2,562 kB] Get:3 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libfwupdplugin5 amd64 1.7.9-1~22.04.3 [191 kB] Get:4 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libfwupd2 amd64 1.7.9-1~22.04.3 [106 kB] Get:5 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 fwupd-signed amd64 1.51.1~22.04.1+1.4-0ubuntu0.1 [30.3 kB] Fetched 97.2 MB in 16s (6,117 kB/s) (Reading database ... 203257 files and directories currently installed.) Preparing to unpack .../google-chrome-stable_114.0.5735.133-1_amd64.deb ... Unpacking google-chrome-stable (114.0.5735.133-1) over (114.0.5735.106-1) ... Preparing to unpack .../fwupd_1.7.9-1~22.04.3_amd64.deb ... Unpacking fwupd (1.7.9-1~22.04.3) over (1.7.9-1~22.04.1) ... Preparing to unpack .../libfwupdplugin5_1.7.9-1~22.04.3_amd64.deb ... Unpacking libfwupdplugin5:amd64 (1.7.9-1~22.04.3) over (1.7.9-1~22.04.1) ... Preparing to unpack .../libfwupd2_1.7.9-1~22.04.3_amd64.deb ... Unpacking libfwupd2:amd64 (1.7.9-1~22.04.3) over (1.7.9-1~22.04.1) ... Preparing to unpack .../fwupd-signed_1.51.1~22.04.1+1.4-0ubuntu0.1_amd64.deb ... Unpacking fwupd-signed (1.51.1~22.04.1+1.4-0ubuntu0.1) over (1.51~22.04.1+1.2-3u buntu0.2) ... Setting up google-chrome-stable (114.0.5735.133-1) ... Setting up libfwupd2:amd64 (1.7.9-1~22.04.3) ... Setting up fwupd-signed (1.51.1~22.04.1+1.4-0ubuntu0.1) ... Setting up grub-common (2.06-2ubuntu7.2) ... Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142. update-rc.d: warning: start and stop actions are no longer supported; falling ba ck to defaults Job for grub-common.service failed because the control process exited with error code. See "systemctl status grub-common.service" and "journalctl -xeu grub-common.serv ice" for details. invoke-rc.d: initscript grub-common, action "restart" failed. × grub-common.service - Record successful boot for GRUB Loaded: loaded (/lib/systemd/system/grub-common.service; enabled; vendor pr eset: enabled) Active: failed (Result: exit-code) since Wed 2023-06-14 12:43:46 IST; 11ms ago Process: 5081 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /bo ot/grub/grubenv; mkdir -p /boot/grub (code=exited, status=0/SUCCESS) Process: 5086 ExecStart=grub-editenv /boot/grub/grubenv unset recordfail (co de=exited, status=1/FAILURE) Main PID: 5086 (code=exited, status=1/FAILURE) CPU: 8ms Jun 14 12:43:46 c1 systemd[1]: Starting Record successful boot for GRUB... Jun 14 12:43:46 c1 grub-editenv[5086]: grub-editenv: error: invalid environment block. Jun 14 12:43:46 c1 systemd[1]: grub-common.service: Main process exited, code=ex ited, status=1/FAILURE Jun 14 12:43:46 c1 systemd[1]: grub-common.service: Failed with result 'exit-cod e'. Jun 14 12:43:46 c1 systemd[1]: Failed to start Record successful boot for GRUB. dpkg: error processing package grub-common (--configure): installed grub-common package post-installation script subprocess returned erro r exit status 1 Setting up libfwupdplugin5:amd64 (1.7.9-1~22.04.3) ... Setting up fwupd (1.7.9-1~22.04.3) ... fwupd-offline-update.service is a disabled or a static unit not running, not sta rting it. fwupd-refresh.service is a disabled or a static unit not running, not starting i t. fwupd.service is a disabled or a static unit not running, not starting it. dpkg: dependency problems prevent configuration of grub2-common: grub2-common depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. dpkg: error processing package grub2-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of grub-pc-bin: grub-pc-bin depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. No apport report written because the error message indicates its a followup erro r from a previous failure. No apport report written because the error message ind icates its a followup error from a previous failure. dpkg: error processing packa ge grub-pc-bin (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of grub-pc: grub-pc depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. grub-pc depends on grub2-common (= 2.06-2ubuntu7.2); however: Package grub2-common is not configured yet. grub-pc depends on grub-pc-bin (= 2.06-2ubuntu7.2); however: Package grub-pc-bin is not configured yet. dpkg: error processing package grub-pc (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Processing trigger s for mailcap (3.70+nmu1ubuntu1) ... Processing triggers for desktop-file-utils (0.26-1ubuntu3) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu3) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for dbus (1.12.20-2ubuntu4.1) ... Errors were encountered while processing: grub-common grub2-common grub-pc-bin grub-pc # sudo dpkg --configure -a output Setting up grub-common (2.06-2ubuntu7.2) ... Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142. update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Job for grub-common.service failed because the control process exited with error code. See "systemctl status grub-common.service" and "journalctl -xeu grub-common.service" for details. invoke-rc.d: initscript grub-common, action "restart" failed. × grub-common.service - Record successful boot for GRUB Loaded: loaded (/lib/systemd/system/grub-common.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2023-06-14 12:48:19 IST; 10ms ago Process: 7912 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub (code=exited, status=0/SUCCESS) Process: 7914 ExecStart=grub-editenv /boot/grub/grubenv unset recordfail (code=exited, status=1/FAILURE) Main PID: 7914 (code=exited, status=1/FAILURE) CPU: 7ms Jun 14 12:48:19 c1 systemd[1]: Starting Record successful boot for GRUB... Jun 14 12:48:19 c1 grub-editenv[7914]: grub-editenv: error: invalid environment block. Jun 14 12:48:19 c1 systemd[1]: grub-common.service: Main process exited, code=exited, status=1/FAILURE Jun 14 12:48:19 c1 systemd[1]: grub-common.service: Failed with result 'exit-code'. Jun 14 12:48:19 c1 systemd[1]: Failed to start Record successful boot for GRUB. dpkg: error processing package grub-common (--configure): installed grub-common package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of grub2-common: grub2-common depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. dpkg: error processing package grub2-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of grub-pc-bin: grub-pc-bin depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. dpkg: error processing package grub-pc-bin (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of grub-pc: grub-pc depends on grub-common (= 2.06-2ubuntu7.2); however: Package grub-common is not configured yet. grub-pc depends on grub2-common (= 2.06-2ubuntu7.2); however: Package grub2-common is not configured yet. grub-pc depends on grub-pc-bin (= 2.06-2ubuntu7.2); however: Package grub-pc-bin is not configured yet. dpkg: error processing package grub-pc (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: grub-common grub2-common grub-pc-bin grub-pc ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: apt 2.4.9 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Wed Jun 14 12:52:26 2023 InstallationDate: Installed on 2023-05-04 (41 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) ProcEnviron: LANGUAGE=en_IN:en PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=en_IN SHELL=/bin/bash SourcePackage: apt UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2023745/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp