Code:
ii linux-image-4.4.0-87-generic
pi linux-image-4.4.0-89-generic
iF linux-image-4.4.0-91-generic
iF linux-image-4.4.0-92-generic
This right here would have freaked me out looking at it.
"ii" means it is installed...making me think the last good kernel installed is 4.4.0-87
"pi" means it wants to be purged but is currently installed so 4.4.0-89 is subject to being removed with an "apt-get autoremove" command.
"iF" means these are installed but failed during install and since these are the 2 newest kernels, I would suspect you were out of room when 4.4.0-91 tried to install and 4.4.0-92 failed as well.
I would use 4.4.0-87 as the current kernel to boot and purge all others.
You will need to clean up the root partition too since it was unfortunate that everything else is in the same partition (thus if /var or /opt fill up, it affects the entire OS....you should NEVER let root fill up)
Once room has been made on /boot and the other partition (and only then), you can then do an "apt-get upgrade" to install the latest kernel...although you will likely need to do "apt-get install -f" to fix the packages that could not finish installing.
Also, the "uname -a" command gives you the kernel that is loaded which you can match to the files in /boot.
To fix where you are at right now may require help from others more experienced in this kind of situation. A Live CD may help you with clearing out files so you can repair the boot partition.
I avoid these situations by manually setting up the partition during the initial install of the OS. See my sig for a link to a tutorial on installing Ubuntu Server...it has a detailed section that talks about how to carve up the partitions to prevent this and help manage growth no matter where it is at on the server.
Speaking of growth, you said you didn't know what was taking up space. The small /boot partition is obvious, old kernels were never purged and just kept consuming space. That happens on every system. Solution is to purge old kernels at least every couple months depending on our large your /boot partition was initially configured. As for the rest of the space, you can find out what is taking up the most space by using the following command in the various directories:
Code:
du -sh /usr /opt /home /tmp /var /srv
Example output:
Code:
880M /usr
4.0K /opt
44K /home
32K /tmp
950M /var
4.0K /srv
Let's say you didn't expect /var to be that big, you then run this command:
Example output:
Code:
8.4M /var/backups
415M /var/cache
4.0K /var/crash
357M /var/lib
4.0K /var/local
0 /var/lock
22M /var/log
4.0K /var/mail
4.0K /var/opt
0 /var/run
16K /var/scripts
32K /var/spool
12K /var/tmp
150M /var/www
We now see that the largest directory under /var is cache @ 415 MB, then lib @ 357 MB and www @ 150 MB
I hope this helps prevents future mishaps.
LHammonds
Bookmarks