FishNChipPapers
Posts: 27
Joined: Sat Jun 09, 2012 10:47 am

rootfs out of space

Tue Oct 16, 2012 6:33 pm

I just ran an rpi-update and now the rootfs filesystem is 100% full. During the boot process I am seeing the following messages:

gzip: /var/log/dmesg.0.gz - No space left on device
Starting system message bus: dBusFailed to start message bus: Failed to close "/var/run/dbus/pid": No space left on device

I have a 4GB SD card.

df -k shows the rootfs is 1602524 in size

uname - a
Linux raspberrypi 3.1.9+ PREEMPT Wed Jul 25 22:11:06 BST 2012 armv61 GNU/Linux

Any help on releasing some space gratefully received

User avatar
jecxjo
Posts: 158
Joined: Sat May 19, 2012 5:22 pm
Location: Minneapolis, MN (USA)

Re: rootfs out of space

Tue Oct 16, 2012 7:38 pm

Here's a handy little script that might help.

In a shell type:

Code: Select all

alias ducks='sudo du -cms * | sort -rn | head -n 11'
Now whenever you are in a directory type ducks and you get get a list of the largest files/directories in your current location. Start out at / and work your way to these large files.
xmpp: [email protected]
Blog: http://jecxjo.motd.org/code

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: rootfs out of space

Wed Oct 17, 2012 5:48 pm

If you do not have the raspi-config command which ships with the latest distributions for expanding root to fill the card, then the information at http://elinux.org/RPi_Resize_Flash_Partitions may be what you need?

thibaultd
Posts: 23
Joined: Mon Oct 01, 2012 7:30 pm

Re: rootfs out of space

Thu Oct 18, 2012 5:14 pm

There are plenty of tutorials on the wild that explain how to expand your partition to use the whole card.

dave_p
Posts: 28
Joined: Sun Mar 04, 2012 2:11 pm

Re: rootfs out of space

Thu Oct 18, 2012 7:29 pm

When you get enough free space to let the system boot properly, here are a couple of ways I've used to keep SD space under control:

1. Run

apt-get clean

This deletes the package files for updates which you have applied, and which are stored in /var/cache/apt/archives/ - depending on how many updates you have applied since installing there can be hundreds of megabytes in there. Re-run the command after every update.

2. Install the 'localepurge' package. During installation you are asked which locale(s) you want to use, then all of the others are deleted - again possibly hundreds of megabytes. Every time you install a new package or update an old one, localepurge again removes unwanted language files to keep your system fresh.

Return to “Troubleshooting”