0

I'm a noob. Suddenly my fileserver stopped working. When I went to see, it told me that there was no space left in boot. I do have "older" versions which I was trying to uninstall. I went through a lot of the answers and try them to no avail. I keep running with:

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

And:

mauricio@FileServer:/boot$ sudo apt-get remove linux-image-3.19.0-15-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-extra-3.19.0-15-generic : Depends: linux-image-3.19.0-15-generic but it is not going to be installed
 linux-image-extra-3.19.0-32-generic : Depends: linux-image-3.19.0-32-generic but it is not going to be installed
 linux-image-extra-3.19.0-68-generic : Depends: linux-image-3.19.0-68-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-3.19.0-68-generic but it is not going to be installed
                       Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

This is what I have:

mauricio@FileServer:/boot$ sudo dpkg --list 'linux-image*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version              Architecture         Description
+++-==============================-====================-====================-==================================================================
un  linux-image                    <none>               <none>               (no description available)
un  linux-image-3.0                <none>               <none>               (no description available)
ii  linux-image-3.19.0-15-generic  3.19.0-15.15         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-3.19.0-22-generic  3.19.0-22.22         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-3.19.0-23-generic  3.19.0-23.24         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-3.19.0-25-generic  3.19.0-25.26         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-3.19.0-26-generic  3.19.0-26.28         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
iF  linux-image-3.19.0-28-generic  3.19.0-28.30         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
iF  linux-image-3.19.0-30-generic  3.19.0-30.34         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
iF  linux-image-3.19.0-31-generic  3.19.0-31.36         i386                 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
in  linux-image-3.19.0-32-generic  <none>               i386                 (no description available)
in  linux-image-3.19.0-68-generic  <none>               i386                 (no description available)
ii  linux-image-extra-3.19.0-15-ge 3.19.0-15.15         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-extra-3.19.0-22-ge 3.19.0-22.22         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-extra-3.19.0-23-ge 3.19.0-23.24         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-extra-3.19.0-25-ge 3.19.0-25.26         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii  linux-image-extra-3.19.0-26-ge 3.19.0-26.28         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-extra-3.19.0-28-ge 3.19.0-28.30         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-extra-3.19.0-30-ge 3.19.0-30.34         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-extra-3.19.0-31-ge 3.19.0-31.36         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-extra-3.19.0-32-ge 3.19.0-32.37         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-extra-3.19.0-68-ge 3.19.0-68.76         i386                 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
iU  linux-image-generic            3.19.0.68.66         i386                 Generic Linux kernel image

I'm running this version:

mauricio@FileServer:/boot$ uname -r
3.19.0-26-generic

I don't know what to do. If you could please help, I'd appreciate it.

I typed df as requested:

mauricio@FileServer:/boot$ df
Filesystem                      1K-blocks     Used Available Use% Mounted on
udev                              2013992        0   2013992   0% /dev
tmpfs                              405876     7316    398560   2% /run
/dev/mapper/FileServer--vg-root  72422704 20125860  48594880  30% /
tmpfs                             2029376      424   2028952   1% /dev/shm
tmpfs                                5120        4      5116   1% /run/lock
tmpfs                             2029376        0   2029376   0% /sys/fs/cgroup
/dev/sda1                          240972   238260         0 100% /boot
cgmfs                                 100        0       100   0% /run/cgmanager/fs
tmpfs                              405876       52    405824   1% /run/user/1000
/home/mauricio/.Private          72422704 20125860  48594880  30% /home/mauricio
mauricio@FileServer:/boot$ 

1 Answers1

0

Your space problem may not be because /boot is full.

First, open a terminal window and type

df

If you see separate line in the output for "/boot", you have a separate boot partition. In this case, you need to make some space on /boot.

OTHERWISE, "/boot" is just a directory in a larger partition, which contains other files. So, /boot is competing for space with other kinds of files. You may be out of space more because you have filled up your disk with files, not because you have too many versions of the OS in boot. In this case, you need to do something about all the other files, and you can pretty much ignore the extra versions of the OS.

Finally, if you really do need to remove the older copies of the OS, you can simply delete them from your boot directory. You can start with the oldest images (in your case linux-image-3.19.0-15-generic, initramfs-3.19.0-15*, etc. While it is perhaps cleanest to uninstall with apt-get, you can recover most or all of this space from your boot partition without officially doing an uninstall.

NOTE: You will not cause any "dependency" issues deleting old "linux-image-3.19.0..." or "initramfs-3.19.0..." files which are previous versions of boot images. The dependency issues you are seeing are for packages, libraries, etc. which are not in your boot directory, but which are used in common by the various revisions of the OS.

The idea is avoid the package manager, and just remove the images from the boot directory you don't intend to use:

First, in a terminal window, use

ls

to see the names of all of the boot images.

You will files with names like

initramfs-3.19.0-15...img
vmlinuz-3.19.0-15...
config-3.19.0-15...
System.map-3.19.0-15...

(I am using "..." to indicate uncertainty about these file names.)

These are the files in your boot directory which are from the oldest (3.19.0-15) version of the OS on your boot directory. Instead of using a package manager to remove these files, you can just use rm. Do this carefully, being sure that you don't delete the most recent boot image files. If you delete 2 or 3 of the oldest sets (by version number 3.19.0-15, 3.19.0-22, etc.) you will have enough space to do the latest update.

In a terminal, you will type

sudo rm initramfs-3.19.0-15...img
sudo rm vmlinuz-3.19.0-15...

etc.

where the precise spelling of the file names is what you get with ls. You need sudo because you must have privilege to remove these files. "rm" is the unix terminal command to remove or delete a file.

Finally, you might want to research how to configure your system to only keep the 2 or 3 latest images. In this way, when you update, the older files in /boot will automatically be removed. You only need the last few versions as a fall back, in case you have trouble with the newest version.

CliffC
  • 71
  • Mr. Cliff: I tried to post the answer here, but the space given was too short. I edited my original question. – Francisco Scaramanga Sep 19 '16 at 16:56
  • Also, I tried removing them individually but with the same result. For some reason, when trying to delete an image, it tries to install the latest kernel version. When no space is available, it shuts the removal process. – Francisco Scaramanga Sep 19 '16 at 16:59
  • See the last section of my answer -- I have added a few paragraphs. – CliffC Sep 19 '16 at 20:41