the itjerk

my adventures with technology

Monthly Archives: August 2014

gear…

10552619_587868511324026_138143329154628104_n

ubuntu not enough free space

I went to do updates today and I got the following message. Seems my /boot partition doesn’t have enough space to update to the newest kernel.
Screenshot from 2014-08-14 20:42:55
Seems autoremove isn’t working. This is easy to fix, but the potential for n00b disaster is high. First, get your current kernel version by issuing:

 uname -r
3.13.0-33-generic

Now let’s go to /boot and take a look at what’s taking up all the room /boot:

cd /boot
ls
total 152330
drwxr-xr-x 4 root root 3072 Aug 12 17:41 .
drwxr-xr-x 23 root root 4096 Aug 12 17:41 ..
-rw-r--r-- 1 root root 1161764 Jun 4 16:57 abi-3.13.0-29-generic
-rw-r--r-- 1 root root 1162257 Jul 4 17:18 abi-3.13.0-30-generic
-rw-r--r-- 1 root root 1162712 Jul 14 23:29 abi-3.13.0-32-generic
-rw-r--r-- 1 root root 1162712 Jul 29 12:41 abi-3.13.0-33-generic
-rw-r--r-- 1 root root 165544 Jun 4 16:57 config-3.13.0-29-generic
-rw-r--r-- 1 root root 165576 Jul 4 17:18 config-3.13.0-30-generic
-rw-r--r-- 1 root root 165611 Jul 14 23:29 config-3.13.0-32-generic
-rw-r--r-- 1 root root 165611 Jul 29 12:41 config-3.13.0-33-generic
drwxr-xr-x 5 root root 1024 Aug 12 17:41 grub
-rw-r--r-- 1 root root 28137510 Jun 13 08:43 initrd.img-3.13.0-29-generic
-rw-r--r-- 1 root root 28189493 Jul 6 09:09 initrd.img-3.13.0-30-generic
-rw-r--r-- 1 root root 28223565 Jul 23 16:24 initrd.img-3.13.0-32-generic
-rw-r--r-- 1 root root 28222396 Aug 12 17:41 initrd.img-3.13.0-33-generic
drwx------ 2 root root 12288 May 22 13:20 lost+found
-rw-r--r-- 1 root root 176500 Mar 12 07:31 memtest86+.bin
-rw-r--r-- 1 root root 178176 Mar 12 07:31 memtest86+.elf
-rw-r--r-- 1 root root 178680 Mar 12 07:31 memtest86+_multiboot.bin
-rw------- 1 root root 3378267 Jun 4 16:57 System.map-3.13.0-29-generic
-rw------- 1 root root 3378641 Jul 4 17:18 System.map-3.13.0-30-generic
-rw------- 1 root root 3381262 Jul 14 23:29 System.map-3.13.0-32-generic
-rw------- 1 root root 3381262 Jul 29 12:41 System.map-3.13.0-33-generic
-rw------- 1 root root 5792544 Jun 4 16:57 vmlinuz-3.13.0-29-generic
-rw------- 1 root root 5792608 Jul 4 17:18 vmlinuz-3.13.0-30-generic
-rw------- 1 root root 5798112 Jul 14 23:29 vmlinuz-3.13.0-32-generic
-rw------- 1 root root 5798688 Jul 29 12:41 vmlinuz-3.13.0-33-generic

Yep, a whole bunch o’ files, previous kernels that I no longer need. Let’s delete them by purging them with apt-get. Remember, don’t delete your current kernel!

sudo apt-get purge linux-image-3.13.0-29-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-3.13.0-29-generic* linux-image-extra-3.13.0-29-generic*
0 upgraded, 0 newly installed, 2 to remove and 15 not upgraded.
After this operation, 193 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 347115 files and directories currently installed.)
Removing linux-image-extra-3.13.0-29-generic (3.13.0-29.53) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-29-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.13.0-33-generic
Found initrd image: /boot/initrd.img-3.13.0-33-generic
Found linux image: /boot/vmlinuz-3.13.0-32-generic
Found initrd image: /boot/initrd.img-3.13.0-32-generic
Found linux image: /boot/vmlinuz-3.13.0-30-generic
Found initrd image: /boot/initrd.img-3.13.0-30-generic
Found linux image: /boot/vmlinuz-3.13.0-29-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Purging configuration files for linux-image-extra-3.13.0-29-generic (3.13.0-29.53) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
Removing linux-image-3.13.0-29-generic (3.13.0-29.53) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-29-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.13.0-33-generic
Found initrd image: /boot/initrd.img-3.13.0-33-generic
Found linux image: /boot/vmlinuz-3.13.0-32-generic
Found initrd image: /boot/initrd.img-3.13.0-32-generic
Found linux image: /boot/vmlinuz-3.13.0-30-generic
Found initrd image: /boot/initrd.img-3.13.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Purging configuration files for linux-image-3.13.0-29-generic (3.13.0-29.53) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic
# 

Gone! Now do those updates.