0

I can't seem to fix this bug, I tried searching for a solution for days now and can't find the solution to my particular problem, I hope if someone could help.

This error occurred after I was trying to downgrade my python==3.8 to python==3.7, but I had to stop the operation for some reason, later I also installed an SSD on my laptop(Inspiron 15 55575). When tried to set up my SSD I was unable to do anything since the same error kept on occurring.

These are some of the solutions I have tried.

After running sudo apt full-upgrade that was suggested from some forums, this was the error I kept on getting.

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.
Need to get 0 B/9,499 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-5.8.0-48-generic (5.8.0-48.54~20.04.1) ...
Setting up grub-pc (2.04-1ubuntu26.9) ...
/var/lib/dpkg/info/grub-pc.config: 10: /etc/default/grub: splash: not found
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit statu
s 127
Setting up linux-image-5.8.0-44-generic (5.8.0-44.50~20.04.1) ...
Processing triggers for linux-image-5.8.0-48-generic (5.8.0-48.54~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-48-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.8.0-48-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: splash: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.8.0-48-generic (--configure):
 installed linux-image-5.8.0-48-generic package post-installation script subprocess retu
rned error exit status 1
Processing triggers for linux-image-5.8.0-44-generic (5.8.0-44.50~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-44-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.8.0-44-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: splash: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.8.0-44-generic (--configure):
 installed linux-image-5.8.0-44-generic package post-installation script subprocess retu
rned error exit status 1
Errors were encountered while processing:
 grub-pc
 linux-image-5.8.0-48-generic
 linux-image-5.8.0-44-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

and when running sudo apt-get upgrade.

Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-5.8.0-41-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 9,748 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 418768 files and directories currently installed.)
Removing linux-image-5.8.0-41-generic (5.8.0-41.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.8.0-41-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: splash: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.8.0-41-generic (--remove):
 installed linux-image-5.8.0-41-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.8.0-41-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

output of df-h

tmpfs           767M  2.2M  765M   1% /run
/dev/sda2       916G  264G  605G  31% /
tmpfs           3.8G     0  3.8G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/loop1       56M   56M     0 100% /snap/core18/1997
/dev/loop0      185M  185M     0 100% /snap/blender/65
/dev/loop4       56M   56M     0 100% /snap/core18/1988
/dev/loop2       70M   70M     0 100% /snap/cherrytree/28
/dev/loop5       52M   52M     0 100% /snap/snap-store/518
/dev/loop6      273M  273M     0 100% /snap/telegram-desktop/2551
/dev/loop3       33M   33M     0 100% /snap/snapd/11107
/dev/loop7      2.3M  2.3M     0 100% /snap/gnome-system-monitor/157
/dev/loop8      219M  219M     0 100% /snap/gnome-3-34-1804/66
/dev/loop9      244M  244M     0 100% /snap/fakecam/102
/dev/loop13     2.3M  2.3M     0 100% /snap/gnome-system-monitor/148
/dev/loop12      76M   76M     0 100% /snap/discord/121
/dev/loop10     240M  240M     0 100% /snap/zoom-client/136
/dev/loop16     157M  157M     0 100% /snap/code/59
/dev/loop15     100M  100M     0 100% /snap/core/10908
/dev/loop14     241M  241M     0 100% /snap/zoom-client/138
/dev/loop17      65M   65M     0 100% /snap/gtk-common-themes/1513
/dev/loop11      21M   21M     0 100% /snap/ubuntu-make/845
/dev/loop19     162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop21      21M   21M     0 100% /snap/ubuntu-make/851
/dev/loop18     199M  199M     0 100% /snap/flutter/62
/dev/loop20      62M   62M     0 100% /snap/core20/904
/dev/loop22     398M  398M     0 100% /snap/datagrip/101
/dev/loop26      77M   77M     0 100% /snap/discord/122
/dev/loop24      33M   33M     0 100% /snap/snapd/11402
/dev/loop27     139M  139M     0 100% /snap/chromium/1514
/dev/loop23     244M  244M     0 100% /snap/fakecam/104
/dev/loop25     218M  218M     0 100% /snap/gnome-3-34-1804/60
/dev/loop29     163M  163M     0 100% /snap/gnome-3-28-1804/145
/dev/loop31      62M   62M     0 100% /snap/core20/875
/dev/loop28      52M   52M     0 100% /snap/snap-store/498
/dev/loop34     256K  256K     0 100% /snap/gtk2-common-themes/13
/dev/loop32     188M  188M     0 100% /snap/blender/111
/dev/loop35     139M  139M     0 100% /snap/chromium/1523
/dev/loop30      43M   43M     0 100% /snap/leafpad/79
/dev/loop37      65M   65M     0 100% /snap/gtk-common-themes/1514
/dev/loop39     199M  199M     0 100% /snap/flutter/56
/dev/loop36     153M  153M     0 100% /snap/code/58
/dev/loop33     395M  395M     0 100% /snap/datagrip/100
/dev/loop38     273M  273M     0 100% /snap/telegram-desktop/2480
/dev/loop40     100M  100M     0 100% /snap/core/10859
/dev/sda1       511M  7.9M  504M   2% /boot/efi
tmpfs           767M   16K  767M   1% /run/user/125
tmpfs           767M   36K  767M   1% /run/user/1000

I am currently using 5.8.0-43-generic

The links above are just some of the solutions, I have tried plenty but nothing worked for me, perhaps it's a hardware issue I suppose.

No matter what I tried nothing worked, I can't update my system, I can't set up my SSD, I can't do anything with apt or apt-get.

If more information is required please let me know, I will be active since this is an important issue for me, and I cant resume the work on my project unless I fix this.

  • Line 11 of your output: /var/lib/dpkg/info/grub-pc.config: 10: /etc/default/grub: splash: not found. – user535733 Mar 29 '21 at 22:21
  • If this is a bug as you open with, it belongs on a bug tracking site (https://help.ubuntu.com/community/ReportingBugs), as this is a user support site intended for support, and not bug tracking. What is the bug ID? as providing the ID will allow us to get more detail from the bug tracking sites if it's already reported. – guiverc Mar 29 '21 at 23:03
  • Why downgrade python? Messing with python seems to be one of the quickest ways to break your system. What does "but I had to stop the operation for some reason" mean? And then you installed an SSD? How many variables do you want us to consider?? Reinstall and reload from backups. And don't mess with your system's python installation. – Organic Marble Mar 29 '21 at 23:22
  • Please show the contents of /etc/default/grub . – N0rbert Mar 30 '21 at 07:06
  • @OrganicMarble I had an emergency in which I had to close my laptop asap, which lead to the installation being paused or interrupted. Apologies I forgot to mention, I downgraded python from my anaconda environment, not the system python. – Salman.S Mar 30 '21 at 10:24

1 Answers1

2

After user535733 pointed out the root of the bug, I found the solution here: Ubuntu – Grub error: /usr/sbin/grub-mkconfig

the output of /etc/default/grub before applying the solution.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="lsb_release -i -s 2> /dev/null || echo Debian"

GRUB_CMDLINE_LINUX_DEFAULT=“GRUB_CMDLINE_LINUX_DEFAULT=quiet splash acpi_os_name=Linux acpi_osi=! acpi_osi=Linux acpi_backlight=vendor modprobe.blacklist=nouveau“ GRUB_CMDLINE_LINUX=""

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

On line 11 i had a fancy double quote written by default “TEXT GOES HERE“

I had to remove it and replace it with normal double quotes "TEXT GOES HERE"

Output of /etc/default/grub after applying the solution.

# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="lsb_release -i -s 2> /dev/null || echo Debian"

GRUB_CMDLINE_LINUX_DEFAULT="GRUB_CMDLINE_LINUX_DEFAULT=quiet splash acpi_os_name=Linux acpi_osi=! acpi_osi=Linux acpi_backlight=vendor modprobe.blacklist=nouveau" GRUB_CMDLINE_LINUX=""

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

Output after running sudo update-grub.

Sourcing file /etc/default/grub.d/init-select.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-48-generic
Found initrd image: /boot/initrd.img-5.8.0-48-generic
Found linux image: /boot/vmlinuz-5.8.0-44-generic
Found initrd image: /boot/initrd.img-5.8.0-44-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Adding boot menu entry for UEFI Firmware Settings
done

After that all my apt and apt-get commands worked.

  • 1
    So neither the python, closing the laptop, or the SSD had any bearing at all to the problem...it was manual grub editing! Glad you figured it out. – Organic Marble Mar 30 '21 at 11:50