2

I need to install some applications on my ubuntu, but apparently my /boot partition is full.

running apt-get -f install

Unpacking linux-image-3.13.0-49-generic (3.13.0-49.83) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-49-generic_3.13.0-49.83_amd64.deb (--unpack):

cannot copy extracted data for './boot/abi-3.13.0-49-generic' to '/boot/abi-3.13.0-49-generic.dpkg-new': failed to write (No space left on device)

I just removed lots of old kernels from boot folder. I think i removed around 200 mb from this folder, but I still get the same error from apt-get!

Since the server is on the hosting company outside the city, direct access to the server is not possible (For example installing Gparted on live CD and expanding /boot partition)

I need to do it remotely! There is also another problem, Since I removed lots of files from /boot folder I am afraid that the server won't boot up again!

Output of df -ih:

root@iscanews:/home/ehsan# df -ih
Filesystem                    Inodes IUsed IFree IUse% Mounted on
/dev/mapper/iscanews--vg-root   171M  6.2M  165M    4% /
none                             16M    11   16M    1% /sys/fs/cgroup
udev                             16M   500   16M    1% /dev
tmpfs                            16M   805   16M    1% /run
none                             16M     8   16M    1% /run/lock
none                             16M    19   16M    1% /run/shm
none                             16M    22   16M    1% /run/user
/dev/sda2                        62K   383   61K    1% /boot

Any kind of help would be appreciated here, thanks

UPDATE

result of df -h

root@iscanews:/home/ehsan# df -h
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/iscanews--vg-root  5.3T  850G  4.2T  17% /
none                           4.0K     0  4.0K   0% /sys/fs/cgroup
udev                            63G  8.0K   63G   1% /dev
tmpfs                           13G  2.1M   13G   1% /run
none                           5.0M     0  5.0M   0% /run/lock
none                            63G  2.6M   63G   1% /run/shm
none                           100M   36K  100M   1% /run/user
/dev/sda2                      237M  237M     0 100% /boot

I also removed old kernels manually. for example there was lots of files config-3.13.0-xx-generic and the latest file was config-3.13.0-48-generic so I removed all config-3.13.0-xx-generic which was older than 48-generic I also did that with vmlinuz-3.13.0-xx-generic files too, and also config-3.13.0-xx-generic, I only kept 48-generic files, I'm not sure if it's the right version to keep! I regret my actions!

UPDATE

root@iscanews:/boot# uname -r
3.13.0-44-generic

Does that mean I deleted the wrong files?? What can I do now?!

UPDATE

root@iscanews:/boot# sudo apt-get autoremove
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.13.0-46-generic : Depends: linux-image-3.13.0-46-generic but it is not installed
 linux-image-extra-3.13.0-49-generic : Depends: linux-image-3.13.0-49-generic but it is not installed
 linux-image-generic : Depends: linux-image-3.13.0-49-generic but it is not installed
E: Unmet dependencies. Try using -f.

UPDATE

root@iscanews:/home/ehsan# du -h /boot
12K     /boot/lost+found
43K     /boot/.Trash-0/info
220M    /boot/.Trash-0/files
220M    /boot/.Trash-0
9.0K    /boot/grub/locale
2.1M    /boot/grub/i386-pc
2.4M    /boot/grub/fonts
4.4M    /boot/grub
235M    /boot

Thanks to user A.B I recovered my removed files from trash, and permanently removed old kernerls from boot directory.

7
  • 1
    Can you post just df -h? Posting inode counts confused me. Apr 28, 2015 at 14:12
  • 1
    Which files did you remove from /boot already and how did you do it, by apt-get remove --purge <package> or by deleting files directly? Apr 28, 2015 at 14:13
  • 1
    If you are in doubt, just do sudo apt-get install --reinstall linux-headers-3.13.0-44 linux-headers-3.13.0-44-generic as soon as your space problems have been solved.
    – Jos
    Apr 28, 2015 at 14:28
  • Have you tried sudo apt-get autoremove?
    – psukys
    Apr 28, 2015 at 14:28
  • 1
    What says du -h /boot
    – A.B.
    Apr 28, 2015 at 14:50

1 Answer 1

1

First in order to see what's filling up the Boot folder use:

du -h /boot

root@iscanews:/home/ehsan# du -h /boot
12K     /boot/lost+found
43K     /boot/.Trash-0/info
220M    /boot/.Trash-0/files
220M    /boot/.Trash-0
9.0K    /boot/grub/locale
2.1M    /boot/grub/i386-pc
2.4M    /boot/grub/fonts
4.4M    /boot/grub
235M    /boot

Since I removed my files on KDE then somehow ubuntu moved them to trash folder, so my boot folder remained with 0% available space. I restored all files from this folder to avoid further problems with boot-loader.

Using uname -r I retrevied my kernel version and removed some old files permanently with Shift+DEL on kde.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .