delfinnium: (Default)
Drel ([personal profile] delfinnium) wrote in [community profile] linux4all2012-02-10 11:07 am

root directory being filled?

Hi all

I've had a clean reinstall of my linux mint and everything is good... until just today a thing popped up to say that my root is full.

D: I had given it 4GB when I reinstalled linux mint, leaving everything to my home drive. Now what I read is that root IS required in larger volumes.

So what can I do? I have plenty of space in /home, and I don't particularly want to reinstall everything. Where is the files where I can delete/clear my cache? How do I go about doing it?

(In nice easy steps because I can't actually find this .tmp or .var folders that other websites say I must look in.)
blnchflr: Remus/Ghost!Sirius (Ubuntu)

[personal profile] blnchflr 2012-02-10 05:26 am (UTC)(link)
Without knowing a whole lot, deleting .tmp files sounds … temporary - I don't think you'll get much day-to-day use out of the system without a re-install. But if you don't want to move your home partition, create a large enough partition at the end of it, and reinstall / there?
kerravonsen: 9th Doctor wearing his headlamp: Technical wizard (technical-wiz)

[personal profile] kerravonsen 2012-02-10 08:17 am (UTC)(link)
Okay, if your root is full, then you certainly have problems, and they aren't trivial. No, I don't want to scare you, but you do need to be very careful, or you will have to reinstall everything from scratch.

In nice easy steps because I can't actually find this .tmp or .var folders that other websites say I must look in.

Possibly because you should be looking for "/tmp" and "/var"?

Deleting files from those directories is only a temporary short-term solution. For a long-term solution, you really really need to have a larger root partition.

If you've managed to find files to delete in /tmp and /var, fine. (And, no, I'm not going to give you detailed, step-by-step instructions for that, because I don't know what desktop environment you're using, I don't know if you even know how to use the command line, and it would be much quicker and more useful for you to Read The Fine Manual).

The second short-term thing you can do is remove packages which are taking up a lot of space. To find out that, you need the "dpigs" command.

apt-get install debian-goodies

A common one that takes up a lot of space is OpenOffice.org/LibreOffice.
Note that removing this is only temporary, you can re-install it after you've fixed the main problem. It's just that getting rid of large packages will give you a bit of breathing room.

But the only long-term solution to your problem apart from reinstalling from scratch, is to re-partition your drive. Whichever one you choose to do, you must do one thing first:

BACK UP YOUR DATA! RIGHT NOW! I MEAN IT!

Doesn't matter how you do it, whether you burn it to a DVD or copy it to a flash drive or email it to yourself, back up all your personal data NOW.

Ahem.

To re-partition your disks without wiping them, you will need
1. a Linux system on a live-CD that you can boot from
2. that Linux system must have the "gparted" program on it.

I don't know if the Linux Mint install disks have gparted on them, so you will have to look. Shut down your system, put the CD in the drive, and boot. Hopefully the Linux Mint install disks give you an option of trying out Linux Mint from the CD rather than just installing it. If it doesn't, don't worry, I just thought it would save you time since presumably you already have a Linux Mint install disk. If it does allow you to run Mint from the CD, then do so, and look around in the menu for "gparted" - it will probably be in the "System" menu.

Start up gparted.
It will show you your disks, and the partitions on them. Presumably you want to re-partition the first hard drive, which is likely to be called "/dev/sda".
Now, be very, very careful.
The first thing that you want to do is shrink the size of your /home partition.
This can be done with the "Resize/Move" command.
Click on the /home partition. Click on the "Resize/Move" button. A window will pop up. Adjust the slider to reduce the size of the partition. Make sure that you do it in the direction that will free up space NEXT TO the root partition. That is, if the root partition comes first on the disk, and then the /home partition, then you need to remove space from the FRONT of the /home partition. If it's the other way around, you need to remove space from the BACK.
Click on "Apply". Hold your breath and pray there isn't a power failure.
Wait. If it succeeds, you haven't lost your data. Yay! If it fails, you'll have to reinstall from scratch.
Now there should be free space next to the root partition.
Click on the root partition.
Click on the Resize/Move button. A window will pop up. Adjust the size of the root partition so that it takes up all the space that you've freed up.
Click on "Apply". This should resize the root partition so that it is bigger!
Wait. If it comes back with no errors, hooray, you have succeeded! Now you have a bigger root partion!

Now, if Linux Mint doesn't have a run-from-CD option and/or it doesn't have gparted on the install CD, never fear. There are other live-CDs that do. The one I highly recommend is "System Rescue CD".
http://www.sysresccd.org/

I suggest you go and get a copy of it anyway; it will come in handy on other occasions.