2

I lost power during a do-release-upgrade from trusty to wiley. I booted with a live USB stick and ran the following:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /boot /mnt/boot
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
sudo apt-get dist-upgrade

and got:

root@lubuntu:/# sudo apt-get dist-upgrade
Reading package lists... Done
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.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Setting up linux-image-4.2.0-36-generic (4.2.0-36.42) ...
Internal Error: Could not find image (/boot/vmlinuz-4.2.0-36-generic)
dpkg: error processing package linux-image-4.2.0-36-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.2.0-36-generic:
 linux-image-extra-4.2.0-36-generic depends on linux-image-4.2.0-36-generic; however:
  Package linux-image-4.2.0-36-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.2.0-36-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.2.0-36-generic; however:
  Package linux-image-4.2.0-36-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-4.2.0-36-generic; however:
  Package linux-image-extra-4.2.0-36-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.2.0.36.39); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 linux-image-4.2.0-36-generic
 linux-image-extra-4.2.0-36-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

How would I fix this?

4

I was able to boot up from the oldest kernel from the advanced menu from grub. Running apt-get install -f to repair then reboot into the new kernel and it all worked just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.