Running VirtualBox 6.1 on Windows 10, I cloned Xubuntu 18.04 VM to new ssd and 
resized the .vhd which ran gparted to move swap are resizing the root 
partition. Then upgraded to 20.04. This caused all sorts of problems and I 
followed: 
https://askubuntu.com/questions/1231849/how-to-fix-update-problems-ubuntu-20-04
to get a running system. 

I got the following before and continue to get it even after following the 
above URL: 
  "installed grub-pc package post-installation script subprocess returned error 
exit status 1"
when anything is installed. 

By modiging /var/lib/dpkg/info/grub-pc.postinst:
-- grub-pc.postinst.dee.orig    2020-09-26 14:04:44.012323484 -0500
+++ grub-pc.postinst    2020-09-26 14:05:50.028324633 -0500
@@ -1,6 +1,8 @@
 #!/bin/bash
 set -e
-
+PS4='Line ${LINENO}: '
+set -x
+set -v
 # Apply a sed expression using extended regular expressions in place to a
 # file, if it exists.  The file is the first argument in order to work
 # neatly with apply_conf_tweaks.

Then running:
sudo dpkg --configure -a
The last few lines are:

Line 677: '[' true = false ']'
Line 680: db_input critical grub-pc/install_devices_empty
Line 66: _db_cmd 'INPUT critical' grub-pc/install_devices_empty
Line 42: _db_internal_IFS='     
'
Line 43: IFS=' '
Line 44: printf '%s\n' 'INPUT critical grub-pc/install_devices_empty'
Line 47: IFS='
'
Line 48: read -r _db_internal_line
Line 49: IFS='  
'
Line 52: RET='30 question skipped'
Line 53: case ${_db_internal_line%%[    ]*} in
Line 59: return 30
Line 690: exit 1
rm -f /tmp/grub.ekWa3OkQHZ
Line 1: rm -f /tmp/grub.ekWa3OkQHZ
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

-----
This shows problem is with "grub-pc/install_devices_empty"

I can provide other debugging info, or test a fix if that would help.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1876943

Title:
  package grub-pc 2.04-1ubuntu26 failed to install/upgrade: installed
  grub-pc package post-installation script subprocess returned error
  exit status 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1876943/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to