Lack of HDD space/repartioning in UBUNTU 12.04.1

Asked by Mikae Svarn on 2012-12-20

Since september 2012 I installed UBUNTU 12.04.1. LTS on an ASUS MINI PC EEE 901 by a new clean install of UBUNTU and deleting the old OS and reformatting and repartioning the 3 HDDs.

It has all since been working out just fine. But there is a slight problem with the HDD overall space.

Originally the PC is just equipped with 2 HDDs, one is 4Gb large and the other 8Gb.

Since the purchase the PC has been enlarged with another external (SDI-card or something) HDD of 8 Gb.

All HDDs are formatted with the same Linux based type.

The 4Gb HDD is where the OS is installed, called root(/ ) in just one partition.

The 8 Gb HDD is where the home partion is placed (/home).

This HDD has also a swap-partition and one extra not specified.

Now the problem is that the 4Gb HDD is nearly full, I cannot make any more updates of the OS etc., and I have tried to use the DiscTool programme within UBUNTU to resize the HDD(s) but it won't work.

Overall there is plentyfull of HDD space on the PC, but still I cannot find a solution, except from making a new clean install of the same OS, to make more space on the discs for updates.

I am a Linux beginner, so please do no complicate matters....../Mikael

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubuntu-meta Edit question
Assignee:
No assignee Edit question
Last query:
2012-12-20
Last reply:
2012-12-21
Warren Hill (warren-hill) said : #1

Hi,

Are these Drives real separate drives or are they partitions on the same drive?
You may also have stuff that can be removed

Open a terminal CTRL+ALT+T and enter the following commands

--------------------------------------------------------------------------
sudo fdisk -l; du -s; sudo apt-get clean; du -s; df
-------------------------------------------------------------------------

Enter your password when requested, there is no feedback when you type but it should be accepted just type then press enter.

Copy and paste results back here.

The above commands
1. Tell us if the drives are separate drives or partitions
2. How much disk space is used
3. Get rid of all install packages, to free space. You can re-download any you may need again if necessary.
4. How much disk space is used now
5. How much disk space is free

Not a fix but with the above info we may be able to advise further. For example if these are partitions you can use Gparted to change the size.

Manfred Hampl (m-hampl) said : #2

If you have made updates to the Ubuntu operating system, you most probably have collected files for executing the updates, and maybe outdated kernel versions.

May advice is to do the following:

open a terminal window (by simultaneously pressing the ctrl-alt-t keys)

enter the command
df -h
This will show the free space on your file systems

Then enter the command

sudo apt-get clean

This will delete the download files from the updates that are no more needed
Then do the
fd -h
command again to check if you have gained free space on your root file system.

Another possibility is removing old kernel versions.
You best start with listing the kernels that you have installed with the following command:
dpkg -l | grep linux-image; echo; uname -a

If you copy that output and paste into a new message of this question thread, we can provide you with the command to remove the old kernels.

Mikae Svarn (msvarn) said : #3

Two original physical HDDs, the second one partitioned, and one new (card) internal HDD in a memory slot.
Total file system capacity 18,7 Gb, used 3,8 GB accessible 14,8 Gb

The size and use of the drives/partions in terminal:
Filsystem Size Used Avail Used% Mounted on
/dev/sda1 3,7G 3,2G 365M 90% /
udev 490M 12K 490M 1% /dev
tmpfs 199M 844K 198M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 497M 320K 497M 1% /run/shm
/dev/sdb1 6,5G 270M 5,9G 5% /home
/dev/sdc1 7,3G 214M 6,8G 4% /boot

If removing older kernels and using the command of dpkg -l | grep linux-image; echo; uname -a, the result is:

ii linux-image-3.2.0-29-generic-pae 3.2.0-29.46 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-3.2.0-30-generic-pae 3.2.0-30.48 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-3.2.0-31-generic-pae 3.2.0-31.50 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-generic-pae 3.2.0.31.34 Generic Linux kernel image

" Get rid of all install packages, to free space." How do you know what is an install package and how do you proceed to get rid of one?/Mikael

Warren Hill (warren-hill) said : #4

> " Get rid of all install packages, to free space." How do you know what is an install package and
> how do you proceed to get rid of one?/Mikael

I've already gave you that and so has Manfred

--------------------------------------------------------------------------
sudo fdisk -l; du -s; sudo apt-get clean; du -s; df
-------------------------------------------------------------------------

"sudo fdisk -l" tells us what drives you have
"du -s" tells us how much space is used
"sudo apt-get clean" gets rid of the install packages
"df" tells us what free space you have.

If I were you I would be tempted to re-install making /dev/sda1 the home folder and /dev/sdb1 the root folder

Mikae Svarn (msvarn) said : #5

And what about removing the older kernels? And using Gparted to recize the HDDs doesn't really work...../Mikael

Manfred Hampl (m-hampl) said : #6

From your output:
/dev/sda1 3,7G 3,2G 365M 90% /
The /dev/sda1 file system (your root file system) is 90% full, with 365 MB free space left.

Have you already issued the apt-get clean command?

You have three versions of the kernel installed. You can remove one or two of them. (There is a recommmendation to keep two versions, the current one and the previous one, just in case that if booting from the current one fails, you still can be go back to the previous one. If, however, there are no problems with booting from the current version, you can delete all but the highest one.)

The command
sudo apt-get purge linux-image-3.2.0-29-generic-pae
will remove the oldest of your kernels and free up the space occupied by it (about 100 MB)
sudo apt-get purge linux-image-3.2.0-30-generic-pae
will remove the last-but-one kernel and free up the space occupied by it.

Can you help with this problem?

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

To post a message you must log in.