Error after updating Yunohost - "dpkg/APT (the system package managers) seems to be in a broken state"

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.1.40.1
How are you able to access your server: SSH

Describe your issue

I updated Yunohost for the first time in a while today. It seemed to update packages OK, but it looked like it didn’t update everything. When I tried to run update again, I get the error:

“You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running sudo apt install --fix-broken and/or sudo dpkg --configure -a and/or sudo dpkg --audit.”

I ran the commands indicated, I get the errors below.

Share relevant logs or error messages

user@yh:/etc/initramfs-tools$ sudo apt install --fix-broken
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-pc (2.06-13+deb12u2) ...
grub-pc: Running grub-install ...
Installing for i386-pc platform.
Installation finished. No error reported.
  grub-install success for /dev/sda
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
  grub-install success for /dev/sda1
Installing for i386-pc platform.
grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
  grub-install failure for /dev/sda5
Installing for i386-pc platform.
File descriptor 3 (pipe:[20407]) leaked on vgs invocation. Parent PID 2506: grub-install
File descriptor 3 (pipe:[20407]) leaked on vgs invocation. Parent PID 2506: grub-install
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: error: embedding is not possible, but this is required for RAID and LVM install.
  grub-install failure for /dev/dm-1
You must correct your GRUB install devices before proceeding:

  DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
  dpkg --configure -a
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 grub-pc
Updating coolwsd systemplate
E: Sub-process /usr/bin/dpkg returned an error code (1)
user@yh:/etc/initramfs-tools$ sudo dpkg --configure -a
Setting up grub-pc (2.06-13+deb12u2) ...
grub-pc: Running grub-install ...
Installing for i386-pc platform.
Installation finished. No error reported.
  grub-install success for /dev/sda
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
  grub-install success for /dev/sda1
Installing for i386-pc platform.
grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
  grub-install failure for /dev/sda5
Installing for i386-pc platform.
File descriptor 3 (pipe:[21307]) leaked on vgs invocation. Parent PID 3037: grub-install
File descriptor 3 (pipe:[21307]) leaked on vgs invocation. Parent PID 3037: grub-install
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: error: embedding is not possible, but this is required for RAID and LVM install.
  grub-install failure for /dev/dm-1
You must correct your GRUB install devices before proceeding:

  DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
  dpkg --configure -a
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 grub-pc
user@yh:/etc/initramfs-tools$ sudo dpkg --configure grub-pc
Setting up grub-pc (2.06-13+deb12u2) ...
grub-pc: Running grub-install ...
Installing for i386-pc platform.
Installation finished. No error reported.
  grub-install success for /dev/sda
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
  grub-install success for /dev/sda1
Installing for i386-pc platform.
grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
  grub-install failure for /dev/sda5
Installing for i386-pc platform.
File descriptor 3 (pipe:[22091]) leaked on vgs invocation. Parent PID 3507: grub-install
File descriptor 3 (pipe:[22091]) leaked on vgs invocation. Parent PID 3507: grub-install
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: error: embedding is not possible, but this is required for RAID and LVM install.
  grub-install failure for /dev/dm-1
You must correct your GRUB install devices before proceeding:

  DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
  dpkg --configure -a
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 grub-pc
user@yh:/etc/initramfs-tools$ df -h
Filesystem               Size  Used Avail Use% Mounted on
udev                     1.9G     0  1.9G   0% /dev
tmpfs                    392M  708K  392M   1% /run
/dev/mapper/system-root  200G  102G   90G  54% /
tmpfs                    2.0G   16K  2.0G   1% /dev/shm
tmpfs                    5.0M     0  5.0M   0% /run/lock
/dev/sda1                230M  100M  114M  47% /boot
tmpfs                    392M     0  392M   0% /run/user/56362

I am not sure how to fix the issue with grub. It seem the install to /dev/sda5 is failing, but there shouldn’t be a /dev/sda5?

I would appreciate detailed instructions. Thank you

So apparently I had a similar problem I posted here about over a year ago: Migration to bookworm did not complete / "You must correct your GRUB install devices before proceeding"

Using the same solution, the grub issue seems to be fixed. Now I have a different issue, I will make a separate thread.

2 Likes

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