Grub-pc is broken or not fully installed

Hello,I'm new to the linux world .I've installed Zorin os 16 and i absolutely loving it..recently i tried apt upgrade ..i think grub broke while doing so..

`reaper@asus-tuf ~> sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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-common (2.04-1ubuntu26.13+zorin1) ...
Job for grub-initrd-fallback.service failed because the control process exited with error code.
See "systemctl status grub-initrd-fallback.service" and "journalctl -xe" for details.
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 -xe" 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 2021-09-15 09:38:15 IST; 5ms a
go
Process: 8641 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /bo
ot/grub/grubenv; mkdir -p /boot/grub (code=exited, status=0/SUCCESS)
Process: 8643 ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset recor
dfail (code=exited, status=1/FAILURE)
Main PID: 8643 (code=exited, status=1/FAILURE)

Sep 15 09:38:15 asus-tuf systemd[1]: Starting Record successful boot for GRUB...
Sep 15 09:38:15 asus-tuf grub-editenv[8643]: /usr/bin/grub-editenv: error: inval
id environment block.
Sep 15 09:38:15 asus-tuf systemd[1]: grub-common.service: Main process exited, c
ode=exited, status=1/FAILURE
Sep 15 09:38:15 asus-tuf systemd[1]: grub-common.service: Failed with result 'ex
it-code'.
Sep 15 09:38:15 asus-tuf 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
dpkg: dependency problems prevent configuration of grub2-common:
grub2-common depends on grub-common (= 2.04-1ubuntu26.13+zorin1); 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.04-1ubuntu26.13+zorin1); 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.04-1ubuntu26.13+zorin1); however:
Package grub-common is not configured yet.
grub-pc depends on grub2-common (= 2.04-1ubuntu26.13+zorin1); however:
Package grub2-common is not configured yet.
grub-pc depends on grub-pc-bin (= 2.04-1ubuntu26.13+zorin1); 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
E: Sub-process /usr/bin/dpkg returned an error code (1)`

sudo apt-get install -f
sudo dpkg --configure -a
1 Like

hello..thank you for replying..
ive got the following errors after running above commands

sudo apt-get install -f && sudo dpkg --configure -a
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-common (2.04-1ubuntu26.13+zorin1) ...
Job for grub-initrd-fallback.service failed because the control process exited with error code.
See "systemctl status grub-initrd-fallback.service" and "journalctl -xe" for details.
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 -xe" 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 2021-09-15 13:07:32 IST; 5ms ago
    Process: 11343 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub (code=exited, status=0/SUCCESS)
    Process: 11345 ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset recordfail (code=exited, status=1/FAILURE)
   Main PID: 11345 (code=exited, status=1/FAILURE)

Sep 15 13:07:32 asus-tuf systemd[1]: Starting Record successful boot for GRUB...
Sep 15 13:07:32 asus-tuf grub-editenv[11345]: /usr/bin/grub-editenv: error: invalid environment block.
Sep 15 13:07:32 asus-tuf systemd[1]: grub-common.service: Main process exited, code=exited, status=1/FAILURE
Sep 15 13:07:32 asus-tuf systemd[1]: grub-common.service: Failed with result 'exit-code'.
Sep 15 13:07:32 asus-tuf 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.04-1ubuntu26.13+zorin1); 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.04-1ubuntu26.13+zorin1); 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.04-1ubuntu26.13+zorin1); however:
  Package grub-common is not configured yet.
 grub-pc depends on grub2-common (= 2.04-1ubuntu26.13+zorin1); however:
  Package grub2-common is not configured yet.
 grub-pc depends on grub-pc-bin (= 2.04-1ubuntu26.13+zorin1); 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
E: Sub-process /usr/bin/dpkg returned an error code (1)

Recommend running Boot Repair;

2 Likes

When you start grub. Did you see a boot screen? Try click edit and check what is it wrong from live grub. Then you can find what is wrong and change a diffrents and then update a grub.

System boots fine...this occurs when i try to update via terminal..

I'll try that....

Hello people...I managed to fix this problem using live usb...I used boot repair tool to completely purge grub and Reinstall Grub ..and that worked like a charm..this problem was caused by conflicting system76 driver which I've installed previously....thank you @Aravisian :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.