Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently when running "software updater", I received the message that my /boot filesystem is low on memory. This is what I found my disk space usage was:

~$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu-root  145G  4.3G  134G   4% /
udev                     871M  4.0K  871M   1% /dev
tmpfs                    353M  804K  352M   1% /run
none                     5.0M     0  5.0M   0% /run/lock
none                     882M  160K  881M   1% /run/shm
none                     100M   28K  100M   1% /run/user
/dev/sda1                228M  211M  5.0M  98% /boot
/home/me/.Private        145G  4.3G  134G   4% /home/me

How do I reallocate more space to /boot? Should I be considering a better alternative solution?

I am running Ubuntu 12.10. This level of OS management is still very new to me.

share|improve this question

migrated from stackoverflow.com Jun 23 '13 at 14:54

This question came from our site for professional and enthusiast programmers.

    
Please provide content of /boot directory: # ls -la /boot/ –  september Jun 23 '13 at 15:30
    
@september, here is part of the output: -rw-r--r-- 1 root root 853738 Oct 9 2012 abi-3.5.0-17-generic -rw-r--r-- 1 root root 860818 Mar 25 15:29 abi-3.5.0-27-generic -rw-r--r-- 1 root root 861067 Jun 6 15:49 abi-3.5.0-34-generic -rw-r--r-- 1 root root 154429 Oct 9 2012 config-3.5.0-17-generic -rw-r--r-- 1 root root 154652 Mar 25 15:29 config-3.5.0-27-generic -rw-r--r-- 1 root root 154689 Jun 6 15:49 config-3.5.0-34-generic –  Cameron M Jun 30 '13 at 17:40
    
drwxr-xr-x 5 root root 1024 Jun 21 18:38 grub -rw-r--r-- 1 root root 22196750 Nov 29 2012 initrd.img-3.5.0-17-generic -rw-r--r-- 1 root root 22286401 Apr 15 21:36 initrd.img-3.5.0-27-generic -rw-r--r-- 1 root root 22290842 Jun 21 18:38 initrd.img-3.5.0-34-generic -rw-r--r-- 1 root root 178944 Jan 3 16:47 memtest86+_multiboot.bin -rw------- 1 root root 2320733 Oct 9 2012 System.map-3.5.0-17-generic -rw------- 1 root root 2321612 Oct 19 2012 System.map-3.5.0-18-generic -rw------- 1 root root 2321450 Jun 6 15:49 System.map-3.5.0-34-generic –  Cameron M Jun 30 '13 at 17:41

3 Answers 3

up vote 1 down vote accepted

You have 228M /boot partition. It is more then enough and you do not need to resize it. It is difficult and dangerous procedure for not advanced user. I'm sure that you need just remove 2-3 files (old kernel versions) there.

Here is my example (for Gentoo):

# df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        97M   52M   41M  56% /boot
# ls -la /boot/
total 50392
drwxr-xr-x  4 root root    1024 Jun 20 11:51 .
drwxr-xr-x 22 root root    4096 Feb  5 23:04 ..
-rw-r--r--  1 root root       0 Jun 20  2012 .keep
-rw-r--r--  1 root root 2839981 Nov 13  2012 System.map-3.5.7-gentoo
lrwxrwxrwx  1 root root       1 Sep 16  2012 boot -> .
-rw-r--r--  1 root root   88815 Nov 13  2012 config-3.5.7-gentoo
drwxr-xr-x  2 root root    1024 Jun 20 11:52 grub
-rw-r--r--  1 root root 5980096 Mar  1 15:26 kernel-3.7.10-gentoo
-rw-r--r--  1 root root 5980032 Apr 20 01:54 kernel-3.7.10-gentoo_2
-rw-r--r--  1 root root 6020960 May 10 13:52 kernel-3.7.10-gentoo_3
-rw-r--r--  1 root root 5966912 Feb 25 19:47 kernel-3.7.9-gentoo
-rw-r--r--  1 root root 6179840 May 16 19:14 kernel-3.8.13-gentoo
-rw-r--r--  1 root root 6231072 May 21 12:52 kernel-3.8.13-gentoo_2
-rw-r--r--  1 root root 6233696 Jun 20 11:51 kernel-3.8.13-gentoo_3
drwx------  2 root root   12288 Sep 15  2012 lost+found
-rw-r--r--  1 root root 5844768 Nov 13  2012 vmlinuz-3.5.7-gentoo
#

I can delete kernel-3.7* to clean 40-50% disk space. If you afraid, just move these files to another partition.

share|improve this answer
    
This is exactly what I needed. Thank you! –  Cameron M Jul 5 '13 at 22:18
    
I wouldn't call 228M "more than enough" if it requires manual user intervention from time to time. Isn't there something that reclaims old kernel versions automatically? –  BlueBomber Dec 19 at 18:40

this is one easy way to do it:

share|improve this answer
    
Link only answers aren't considered to be great since links die, so please add more details. –  Karan Jun 26 '13 at 22:01

Specialist tools exist to allow you to change the size of your file systems. I use Mint, rather than Ubuntu, but a tool like GParted should allow you to do this. You'll probably need to shrink a different partition to free some space up.

Before you start doing this it is extremely wise to back up your data. It's a fairly safe operation, but it does have the potential to lose your data.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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