My hard disk filled up suddenly and now cannot reboot

Asked by Chris

I am running 10.04 on Acer notebook and in the space of a few hours ate up 70+Gb of free space. I could not see what was causing the problem and using the space, but possibly had something to do with encryption although I don't think I requested any. I rebooted hoping that what appeared to be temporary files would be cleared and whatever process was causing it would be stopped, but now can't restart and after booting from a live CD (USB stick) can't access my home directory because says the encryption is not complete. How can I get my data out of my home directory please?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Boot to root recovery mode and run:

uname -a

this is your CURRENT kernel

if you run:

dpkg -l | grep linux-image-2

These are the INSTALLED kernels. If your current kernel is ok then you can remove the other kernels and you will gain ~120Mb per kernel back.

You should also run:

sudo apt-get clean

To clean out the apt cache, these should get you enough space to boot. If not then run:

sudo apt-get --purge remove openoffice.org*

You can then install bleachbit and clear out tonnes of space but watch your options or it'll clean options you want to keep, also do NOT use options stating they will take a long time to run. Make sure you have as many apps closed as you can so the files do not get locked.

Revision history for this message
Chris (chris-chrisbragg) said :
#2

How do I get to Root recovery mode?
When I restart UBuntu comes up with an altered (different from before) log in dialogue, and a message that says Configuration defaults for Gnome power manager have not been installed correctly and suggest I contact the administrator.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Reboot and hold shift, you can then select recovery mode then select root

Revision history for this message
Chris (chris-chrisbragg) said :
#4

OK - rebooted - will try and clean more space but as an added comment, before I tried to reboot, I deleted (not moved to trash) some 2 Gb of space and it just ate it up immediately

Revision history for this message
Chris (chris-chrisbragg) said :
#5

How do I remove the old kernels? Should I keep one old one at least in case I have a kernel problem?
Currently have 7 versions of 2.6.31 and 3 of 2.6.32(-23.37, -24.43, -25.45)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

The leftmost colomn is the package name, you can use:

sudo apt-get --purge remove packagename

to remove it, do NOT remove the current kernel or you will get problems. Using this you will free up about 660Mb which should get you a boot

Revision history for this message
Chris (chris-chrisbragg) said :
#7

when I run sudo apt-get purge linux-image-2.6.31-16-generic-pae apt-get says it can't find anything to delete
Same for others in the list - have not tried current kernel of course
(Does not recognise '-purge' parameter)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

sudo apt-get --purge remove linux-image-2.6.31-16-generic-pae

If the output of the kernel list has 'rc' on the VERY left and not 'ii' then it's not installed but there is residual configs and such. in this case you can run:

sudo dpkg -P linux-image-2.6.31-16-generic-pae

and remove the item from the list. This will free up a few megabytes but removing full kernels will do more, also I recommend you remove openoffice for the now while you get a boot and can remove more fluff, you can then reinstall openoffice. Alternatively if you ONLY use writer you can install Abiword and save a tonne of space, Openoffice is 300Mb, Abiword is 12Mb. You can also install gnumeric if you need a spreadsheet app, Abiword and gnumeric together use a fraction of the space occupied by OpenOffice.

Revision history for this message
Chris (chris-chrisbragg) said :
#9

OK - can I delete the first two of the following safely, that have 'ii' next to them?
linux-image-2.6.32-23-generic-pae
linux-image-2.6.32-24-generic-pae
linux-image-2.6.32-25-generic-pae - this is the latest one
I use Open Office extensively but can reload it - however - I am still concerned that the machine ate up 3 Gb in a second before I shut it down.

Revision history for this message
delance (olivier-delance) said :
#10

I propose another process.
Boot on Ubuntu CD with "Try without install".
Going in Places, and open hard drive.
Then using Applications->Accessories->Disk Analyzer, and identifying which folder takes so much spaces.
It could be /var/log.
Then identifying the increasing file, and guessing what is root problem.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Sure as long as they are not the current kernel you can run:

sudo apt-get --purge -y remove linux-image-2.6.32-23-generic-pae linux-image-2.6.32-24-generic-pae; sudo apt-get -y --purge autoremove

And it will remove both kernels and their modules

You must leave at least one kernel (the current one) and do NOT remove the package named simply:

linux-image-pae

as this can cause issues too, just remove the excess ones with version numbers.

Revision history for this message
Chris (chris-chrisbragg) said :
#12

OK have live booted and disk analyser shows the bulk of the disk is taken up by the home folder - however .ecryptfs is preventing access so it can't look inside it. I think it is ecryptfs that filled my disk as well possibly, as it seemed there was some activity around this in the logs before i closed down - there were thousands of 5 or 6 character entries being created with 0 bytes

Revision history for this message
Chris (chris-chrisbragg) said :
#13

Have rebooted in root recovery mode and removed the remaining two 'old' linux kernels - removed some 800Mb in all so far but it has all been eaten up again - df shows zero free space

Revision history for this message
Chris (chris-chrisbragg) said :
#14

If I copy all my Home directory off (or from backup) and then reload my machine from scratch with 10.04 and the restore my Home Directory will this work?
Are there other files I must backup outside the Home Directory?
Are there files I may restore from the Home Directory that would lead to the same problem e.g. configuration of BackitUp or encryption of some type?

I can now access my Home Directory in recovery mode but cannot get past the Install Error; power message when booting normally, and can only use an external screen.
Advice on recovering elegantly would be appreciated.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

I am not sure as I don't use encryped file systems, they cause all sorts of stupid headaches like this and imho its not worth it.

You'll probably find they are temporary internet files and flash stuffs from the web bloating the partition as well as emails with attatchments being stored too can take up space. You could see how large they are with:

du -h folder | tail -n 1

so for example if you use (crappy) firefox then you can use:

du -h /home/username/.mozilla | tail -n 1

to see how big the web cache (and emails, if you use thunderbird) is. You may also want to fsck the partition in liveCD to make sure thepartitions are healthy.

Revision history for this message
Chris (chris-chrisbragg) said :
#16

I didn't think I was using encryption either - I had no intention to use it on my Home directory - but it does not seem to be the problem on further examination - or at least not on the Home directory anyway as I have managed to access the directory OK now via command line.

I don't think there are any web cache or email things that I have that would use up 80Gb in a few minutes - certainly none of these are anywhere near big enough to cause this on the machine currently, and when I first freed up space they were not even running, and so whatever took the space I freed so quickly was something else. I suspect BackinTime as the most likely option.

Anyway - I have now made sure I have everything backed up again (nearly) despite the fact I have existing backups (just not sure they were closed cleanly so don't want to rely on them), but I still need an answer about whether reloading from scratch and then restoring my Home Directory will work.

Is everything I need normally in the Home directory or downloadable from Ubuntu Software Centre, given that I have not added any home grown scripts or anything? I will not reload possible culprits (e.g. BackinTime, VirtualBox) until I am sure al else is working cleanly.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#17

Yeah configs are stored per user in $HOME and restoring the configs from backup then launching the app in question will make it use that config.

Can you help with this problem?

Provide an answer of your own, or ask Chris for more information if necessary.

To post a message you must log in.