I happen to have deleted the /boot
directory on my system instead of on the one I was supposed to.. I found this in order to restore it, however I had problems with apt --reinstall
so I decided to remove and install the packages manually. Probably not the brightest idea, now have 2 broken images that I do not know how to fix.
Running dpkg --audit
tells me
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
linux-image-4.15.0-42-generic Signed kernel image generic
linux-image-4.15.0-43-generic Signed kernel image generic
Running dpkg --configure linux-image-4.15.0-42-generic
Setting up linux-image-4.15.0-42-generic (4.15.0-42.45) ...
Processing triggers for linux-image-4.15.0-42-generic (4.15.0-42.45) ...
/etc/kernel/postinst.d/dkms:
run-parts: failed to exec /etc/kernel/postinst.d/dkms: No such file or directory
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-4.15.0-42-generic (--configure):
installed linux-image-4.15.0-42-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-42-generic
However /etc/kernel/postinst.d/dkms
exists
~$ ls -l /etc/kernel/postinst.d/dkms
-rwxr-xr-x 1 root root 1120 авг 31 2016 /etc/kernel/postinst.d/dkms
My machine is still running though, is it possible to save it?
EDIT:
Just tried to run dkms
manually and found out /bin/bash
was missing. Installed it with apt install bash
and then issued the commands
dpkg --audit
apt install -f
update-grub
Everything looks normal now, however after reboot there is no ubuntu boot option in grub..
– php_nub_qq Jan 12 '19 at 14:01grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map. Found Windows Boot Manager on /dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for EFI firmware configuration
where/dev/sdc1
is my ubutnu live flash drivefsck
andapt install -f
from Ubuntu live DVD/USB drive. – Vijay Jan 12 '19 at 20:38apt install -f
just says there is 0 packages to be updated or installed and I'm not familiar withfsck
– php_nub_qq Jan 12 '19 at 20:42fsck
before mount andapt install -f
after chroot. (Writing from mobile) – Vijay Jan 12 '19 at 20:46