1

I'm running 14.04. I ran sudo apt-get update and sudo apt-get upgrade, which failed with an error:

dpkg: error processing archive /var/cache/apt/archives/
    linux-image-3.19.0-66-generic_3.19.0-66.74~14.04.1_amd64.deb (--unpack): 
    cannot copy extracted data for './boot/System.map-3.19.0-66-generic' 
    to /boot/System.map-3.19.0-66-generic.dpkg-new': 
    failed to write (No space left on device)

Now, my machine won't boot. I can get to the login screen, but when I enter my password, I immediately get logged out after seeing a glitchy screen like this (sorry for the glare):

img Trying to boot in recovery mode gives me this output:

img (mountall: fsck /boot [957] terminated with status 1)

It looks like there's a problem with /boot, but I can't figure out how to repair it.

I've also had trouble booting from more recent kernels, so I've been booting from 3.19.0-49.

Byte Commander
  • 105,631
  • 46
  • 284
  • 425
Joe Mornin
  • 165
  • 1
  • 12
  • 1
    Please log in to a TTY (press CTRL+ALT+F1 on the login screen and enter username and password) and then check your `/var/log/apt/term.log` which contains a copy of the full terminal output of your last `apt` commands. Find your last session and please copy the error and add it to your question. Let's see if that's related. – Byte Commander Sep 23 '16 at 18:21
  • 1
    Seems like `/boot` ran out of space. Try http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot and reinstall that kernel update afterwards. – Byte Commander Sep 23 '16 at 18:36
  • OK, thanks. I'm in the shell in recovery mode, but `$ ls /boot` lists nothing... any ideas? – Joe Mornin Sep 23 '16 at 18:46
  • I figured it out--see my answer. Thank you for the help. – Joe Mornin Sep 23 '16 at 19:57

1 Answers1

1

With the help of Byte Commander's comments, I was able to fix this using these steps:

  • Open a root shell in recovery mode
  • Make the filesystem writable: mount -o remount,rw /
  • Mount the boot partition: mount /dev/sda1 /boot
  • Configure a network connection: dhclient eth0
  • Remove unused kernels; this took some improvising, but it was mainly a combination of apt-get purge linux-image-x.x.x-x, dpkg --force-all -P linux-image-x.x.x-x-xxxxxx, and apt-get install -f.

tl;dr: don't let your boot partition get full.

Joe Mornin
  • 165
  • 1
  • 12