PClOStinspace |
07-27-2016 03:17 PM |
dpkg error when trying to reinstall kernal from a live session using chroot
I have messed up using a boot-repair CD and have ended up either removing or partially removing (not sure which tbh) my kernal.
I have booted up an Ubuntu-Gnome 16.04 live session (this is the same distro/release as the damaged system, not sure if it helps at all but though it sensible) chrooted into the damaged system using instructions found here:-
http://askubuntu.com/questions/28099.../166010#166010
I have got as far as the command to install the new kernel and am getting:-
Code:
root@ubuntu-gnome:/# apt-get install linux-image-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
linux-image-4.4.0-31-generic thermald
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools linux-headers-4.4.0-31-generic
The following packages will be REMOVED:
linux-image-extra-4.4.0-28-generic
The following NEW packages will be installed:
linux-image-4.4.0-31-generic linux-image-generic thermald
0 upgraded, 3 newly installed, 1 to remove and 3 not upgraded.
2 not fully installed or removed.
Need to get 0 B/57.8 MB of archives.
After this operation, 106 MB disk space will be freed.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
(Reading database ... 333847 files and directories currently installed.)
Removing linux-image-extra-4.4.0-28-generic (4.4.0-28.47) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-28-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
/usr/sbin/mkinitramfs: 63: .: Can't open /usr/share/initramfs-tools/scripts/functions
update-initramfs: failed for /boot/initrd.img-4.4.0-28-generic with 2.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 2
dpkg: error processing package linux-image-extra-4.4.0-28-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-28-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone with more brains than me tell me how I get out of this mess! I have tried removing 'linux-image-extra-4.4.0-28-generic' both with apt and directly with dpkg to no avail and now run entirely out of ideas!!
|