1

After consecutively upgrading from 17.xx to 18.04 and the 20.04 I can not install apps from softwaremanager and grub does not show up anymore while booting so that I can not access my windows installation. There seems to be a problem with old kernels not being removed. Please help.

sudo apt autoremove gives:

marco@marco-ThinkPad:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-4.10.0-37-generic linux-image-4.13.0-45-generic linux-image-4.13.0-46-generic
  linux-image-extra-4.13.0-45-generic linux-image-extra-4.13.0-46-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 547 MB disk space will be freed.
Do you want to continue? [J/n] j
(Reading database ... 426584 files and directories currently installed.)
Removing linux-image-4.10.0-37-generic (4.10.0-37.41) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-g
eneric
update-initramfs: Deleting /boot/initrd.img-4.10.0-37-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-ge
neric
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found linux image: /boot/vmlinuz-4.15.0-128-generic
Found initrd image: /boot/initrd.img-4.15.0-128-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.0.0: cannot open 
shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.10.0-37-generic.postrm lin
e 330.
dpkg: error processing package linux-image-4.10.0-37-generic (--remove):
 installed linux-image-4.10.0-37-generic package post-removal script subprocess returned error exit s
tatus 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-4.10.0-37-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

ls -al /etc/grub.d gives:

marco@marco-ThinkPad:~$ ls -al /etc/grub.d
insgesamt 196
drwxr-xr-x   5 root root  4096 Dez 19 14:48 .
drwxr-xr-x 150 root root 12288 Dez 19 16:45 ..
-rwxr-xr-x   1 root root 10627 Nov 13 00:15 00_header
-rwxr-xr-x   1 root root  6258 Mär 15  2016 05_debian_theme
-rwxr-xr-x   1 root root 17622 Nov 13 00:15 10_linux
-rwxr-xr-x   1 root root   948 Jan 21  2017 10_linux_proxy
-rwxr-xr-x   1 root root 42359 Nov 13 00:15 10_linux_zfs
-rwxr-xr-x   1 root root 12894 Nov 13 00:15 20_linux_xen
-rwxr-xr-x   1 root root 12059 Jun 14  2017 30_os-prober.dpkg-dist
-rwxr-xr-x   1 root root   198 Jan 21  2017 30_os-prober_proxy
-rwxr-xr-x   1 root root  1424 Nov 13 00:15 30_uefi-firmware
-rwxr-xr-x   1 root root   948 Jan 21  2017 31_linux_proxy
-rwxr-xr-x   1 root root 11082 Jun 17  2016 32_linux_xen
-rwxr-xr-x   1 root root  1992 Jan 28  2016 33_memtest86+
-rwxr-xr-x   1 root root   198 Jan 21  2017 34_os-prober_proxy
-rwxr-xr-x   1 root root  1418 Jun 17  2016 35_uefi-firmware
-rwxr-xr-x   1 root root   214 Jun 17  2016 40_custom
-rwxr-xr-x   1 root root   216 Jun 17  2016 41_custom
drwxr-xr-x   4 root root  4096 Aug 10  2016 backup
drwxr-xr-x   2 root root  4096 Aug 10  2016 bin
drwxr-xr-x   2 root root  4096 Jan 21  2017 proxifiedScripts
-rw-r--r--   1 root root   483 Jun 17  2016 README
-rw-r--r--   1 root root   210 Jan 21  2017 .script_sources.txt
marco@marco-ThinkPad:

All the commands from the 1st answer below gave:

marco@marco-ThinkPad:~$ sudo chmod -x /etc/grub.d/30_os-prober_proxy
[sudo] Passwort für marco: 
marco@marco-ThinkPad:~$ sudo chmod -x /etc/grub.d/10_linux_proxy
marco@marco-ThinkPad:~$ sudo chmod -x /etc/grub.d/31_linux_proxy
marco@marco-ThinkPad:~$ sudo mv /etc/grub.d/proxifiedScripts $HOME
marco@marco-ThinkPad:~$ sudo mv /etc/grub.d/bin $HOME/bin.bak
marco@marco-ThinkPad:~$ sudo mv /etc/grub.d/backup  $HOME/backup.bak
marco@marco-ThinkPad:~$ sudo mv /etc/grub.d/30_os-prober.dpkg-dist  /etc/grub.d/30_os-prober
marco@marco-ThinkPad:~$ df -h;df -i
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
udev            3,9G       0  3,9G    0% /dev
tmpfs           785M    2,1M  783M    1% /run
/dev/sda7       106G     29G   72G   29% /
tmpfs           3,9G       0  3,9G    0% /dev/shm
tmpfs           5,0M    4,0K  5,0M    1% /run/lock
tmpfs           3,9G       0  3,9G    0% /sys/fs/cgroup
/dev/loop0      119M    119M     0  100% /snap/chromium/1424
/dev/loop2      144M    144M     0  100% /snap/firefox/372
/dev/loop3       62M     62M     0  100% /snap/core20/904
/dev/loop4       55M     55M     0  100% /snap/core18/1754
/dev/loop6      151M    151M     0  100% /snap/git-cola/136
/dev/loop5      147M    147M     0  100% /snap/git-cola/61
/dev/loop1       98M     98M     0  100% /snap/core/10577
/dev/loop7      147M    147M     0  100% /snap/firefox/469
/dev/loop8      163M    163M     0  100% /snap/gnome-3-28-1804/145
/dev/loop9      291M    291M     0  100% /snap/vlc/1620
/dev/loop10     261M    261M     0  100% /snap/kde-frameworks-5-core18/32
/dev/loop11     291M    291M     0  100% /snap/vlc/1700
/dev/loop12      65M     65M     0  100% /snap/gtk-common-themes/1514
/dev/loop13      63M     63M     0  100% /snap/gtk-common-themes/1506
/dev/loop14      98M     98M     0  100% /snap/core/9289
/dev/loop15     173M    173M     0  100% /snap/spotify/43
/dev/loop16     256M    256M     0  100% /snap/gnome-3-34-1804/36
/dev/loop17      56M     56M     0  100% /snap/core18/1944
/dev/loop18      52M     52M     0  100% /snap/snap-store/518
/dev/loop19     164M    164M     0  100% /snap/spotify/41
/dev/loop20     234M    234M     0  100% /snap/gimp/322
/dev/loop21     162M    162M     0  100% /snap/gnome-3-28-1804/128
/dev/loop22     218M    218M     0  100% /snap/gnome-3-34-1804/60
/dev/loop23     2,3M    2,3M     0  100% /snap/gnome-system-monitor/148
/dev/loop24     141M    141M     0  100% /snap/gnome-3-26-1604/100
/dev/sda2       256M     62M  195M   24% /boot/efi
tmpfs           785M     48K  785M    1% /run/user/1000
Dateisystem     Inodes IBenutzt   IFrei IUse% Eingehängt auf
udev            996636      644  995992    1% /dev
tmpfs          1003741     1314 1002427    1% /run
/dev/sda7      7061504   517323 6544181    8% /
tmpfs          1003741        1 1003740    1% /dev/shm
tmpfs          1003741        5 1003736    1% /run/lock
tmpfs          1003741       18 1003723    1% /sys/fs/cgroup
/dev/loop0        1330     1330       0  100% /snap/chromium/1424
/dev/loop2        2700     2700       0  100% /snap/firefox/372
/dev/loop3       11713    11713       0  100% /snap/core20/904
/dev/loop4       10764    10764       0  100% /snap/core18/1754
/dev/loop6       30231    30231       0  100% /snap/git-cola/136
/dev/loop5       30131    30131       0  100% /snap/git-cola/61
/dev/loop1       12867    12867       0  100% /snap/core/10577
/dev/loop7        2701     2701       0  100% /snap/firefox/469
/dev/loop8       27807    27807       0  100% /snap/gnome-3-28-1804/145
/dev/loop9       51065    51065       0  100% /snap/vlc/1620
/dev/loop10      35005    35005       0  100% /snap/kde-frameworks-5-core18/32
/dev/loop11      51155    51155       0  100% /snap/vlc/1700
/dev/loop12      63978    63978       0  100% /snap/gtk-common-themes/1514
/dev/loop13      62342    62342       0  100% /snap/gtk-common-themes/1506
/dev/loop14      12860    12860       0  100% /snap/core/9289
/dev/loop15      24071    24071       0  100% /snap/spotify/43
/dev/loop16      24339    24339       0  100% /snap/gnome-3-34-1804/36
/dev/loop17      10809    10809       0  100% /snap/core18/1944
/dev/loop18      15847    15847       0  100% /snap/snap-store/518
/dev/loop19      24012    24012       0  100% /snap/spotify/41
/dev/loop20      16728    16728       0  100% /snap/gimp/322
/dev/loop21      27798    27798       0  100% /snap/gnome-3-28-1804/128
/dev/loop22      18513    18513       0  100% /snap/gnome-3-34-1804/60
/dev/loop23        784      784       0  100% /snap/gnome-system-monitor/148
/dev/loop24      27624    27624       0  100% /snap/gnome-3-26-1604/100
/dev/sda2            0        0       0     - /boot/efi
tmpfs          1003741      101 1003640    1% /run/user/1000
marco@marco-ThinkPad:~$ sudo dpkg --configure -a && sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-4.10.0-37-generic linux-image-4.13.0-45-generic linux-image-4.13.0-46-generic
  linux-image-extra-4.13.0-45-generic linux-image-extra-4.13.0-46-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 547 MB disk space will be freed.
Do you want to continue? [J/n] j
(Reading database ... 426584 files and directories currently installed.)
Removing linux-image-4.10.0-37-generic (4.10.0-37.41) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.10.0-37-generic /boot/vmlinuz-4.10.0
-37-generic
update-initramfs: Deleting /boot/initrd.img-4.10.0-37-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-37-generic /boot/vmlinuz-4.10.0-
37-generic
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found linux image: /boot/vmlinuz-4.15.0-128-generic
Found initrd image: /boot/initrd.img-4.15.0-128-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
/etc/grub.d/34_os-prober_proxy: 3: /etc/grub.d/34_os-prober_proxy: 3: /etc/grub.d/bin/grubcfg_pr
oxy: not found/etc/grub.d/proxifiedScripts/os-prober: not found

run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.10.0-37-generic.postr
m line 330.
dpkg: error processing package linux-image-4.10.0-37-generic (--remove):
 installed linux-image-4.10.0-37-generic package post-removal script subprocess returned error e
xit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-4.10.0-37-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
marco@marco-ThinkPad:
2
  • played around with grub-customizer ? ls -al /etc/grub.d please add this to your question.
    – nobody
    Dec 19, 2020 at 17:40
  • I added the command, I have grub-customizer installed but honestly don't know. It can be that I changed the order of the entries at one point.
    – M.Hoppe
    Dec 19, 2020 at 18:16

1 Answer 1

1
sudo chmod -x /etc/grub.d/30_os-prober_proxy

the same for

/etc/grub.d/10_linux_proxy and /etc/grub.d/31_linux_proxy these will remove exexutable flag from the skripts. Then we have a folder created with the same date.

sudo mv /etc/grub.d/proxifiedScripts $HOME

@M.Hoppe I'm sorry, I oversaw one file. sudo chmod -x /etc/grub.d/34_os-prober_proxy

and why in havens name is an bin and backup folder there?

sudo mv /etc/grub.d/bin $HOME/bin.bak

and

sudo mv /etc/grub.d/backup  $HOME/backup.bak

So it will not disturb.

sudo mv /etc/grub.d/30_os-prober.dpkg-dist  /etc/grub.d/30_os-prober

Make sure that you have enough place and inodes free with

df -h;df-i

you can control it.

sudo dpkg --configure -a && sudo apt -f install

good luck the files from year 2017 and I have no idea how much your Paketmanagment is really damaged.

Do not use grub-customizer it makes more work, than the work were to make changes in grub2 manually.

@M.Hoppe I'm sorry, I oversaw one file.

sudo chmod -x /etc/grub.d/34_os-prober_proxy
4
  • Hello, thank you for you help. I used your set of instructions but the last one gave the same error. I posted the result at the end of my original question.
    – M.Hoppe
    Dec 19, 2020 at 22:58
  • Thank you very much, this did the trick! Afterwards i was able to use sudo dpkg --configure -a && sudo apt -f installand now i can install apps again from the softwaremanager. I'm sorry, that i go on asking, but grub is still not showing up during boot. Do you also have an idea for that?
    – M.Hoppe
    Dec 20, 2020 at 12:21
  • askubuntu.com/questions/182248/…
    – nobody
    Dec 20, 2020 at 12:30
  • Thank you again! Have a nice Christmas
    – M.Hoppe
    Dec 20, 2020 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .