Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I firstly installed Ubuntu I gave it 20GB of space for the filesystem. ...time passed and I get a message "the system has only 300MB available" so I need to enlarge the filesystem.

Here's my partition table:

enter image description here

enter image description here

I'm a total noob to partitioning and I have a horrible experience with it; once i had this problem: fix partition or rescue data from it. I used ddrescue on my notebook. Thanks to the great support I got, I gained the tumbleweed badge and I couldn't fix it and I had to re-install windows. The notebook didn't have much important data but this computer's much more important to me. I have backed up the data on the "Database" partition.

anyways

I need step-by-step instructions how to take space from the "Database" partition to enlarge my "filesystem" partition. and what about that red exclamation mark at /dev/sda6? how do I deal with it? ... what is it?? The red exclamation is not gone!

Tell me any extra information you need to know. Thanks in advance! :D

share|improve this question

marked as duplicate by Radu Rădeanu, Eliah Kagan, Alvar, Warren Hill, BuZZ-dEE Jan 8 at 11:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What error do you get when you right click on Database and "Mount"? If it's the same error you're getting in that other question of yours, then you need to run a chkdsk on that partition. Log into Windows XP and follow the steps in the "Graphical Mode" section in this article on the Database partition. Then shutdown Windows (not hibernate). Then log back into Linux to check the exclamation mark is gone. –  Alaa Ali Jan 5 at 18:09
    
And by the way, you won't be doing the partitioning inside your Ubuntu. You'll have to boot into a live environment (i.e. boot from a USB containing Ubuntu, and click "Try Ubuntu"). –  Alaa Ali Jan 5 at 18:10
    
ummm I can mount my database normally (through nautilus), I get no errors. (forget about the other question) –  Mina Michael Jan 5 at 18:12
    
With Windows 7 installed after Ubuntu, this makes it much more complicated, it would involve moving your Windows 7 install or the Ubuntu install to a new partition. The easiest solution would likely be to resize the data partition(it is recommended to use Windows "Disk Management" software to resize Ntfs partions, can be done with Ubuntu) then you could move your /home to the new partition after the data part. There are good answers here on how to move your home but I will refer you to those as I have never done it myself. home is usually your biggest space hog so moving it should suffice –  TrailRider Jan 5 at 18:19
    
oh, do you mean that it's more complicated because windows 7 is between database and ubuntu? @TrailRider –  Mina Michael Jan 5 at 18:23

2 Answers 2

up vote 1 down vote accepted

From the comments op said that he wants 50 GB space from the /dev/sda6 partition and add that space to the /dev/sda7 root partition.

  • In the gparted screenshot,it was clearly shown that there was an exclamatory mark for dev/sda6 ntfs partition which means windows was not fully shutdown.You have to remove the exclamatory mark to resize that ntfs partition.

  • To remove the exclamatory mark,boot into Windows,insert the ubuntu live disk then restart your pc(not shutdown).

  • On the startup press function+Fx key to enter into the bios.

  • Now change the boot-order to ubuntu live disk as first option and save the changes.

  • It will boot from the live-disk,now open gparted.

  • Now the remark for the ntfs partition will be gone.Make sure that no partitions from the /dev/sda disk would be mounted.

  • Right-click on the dev/sda6 and click on Resize/Move option to shrink the space and get out of 50 GB space from that partition.

  • An unallocated space of 50 GB was created just below to the /dev/sda6 partition.Now you have to move the unallocated space to just below to the /dev/sda7 partition so that the size of /dev/sda7 partition will be increased.

  • Right-click on the /dev/sda6 partition and then select Resize/Move option.Now drag the slider to the extreme right so that the unallocated space move above to the sda6 Database partition.

  • Next right-click on the /dev/sda5,and follow above step to move the unallocated space just above to the /dev/sda5 partition.Same operation would be done on the linux-swap partition.

  • Now the unallocated space was just above to the linux-swap and just below to the dev/sda7 root partition.

  • Now right-click on the dev/sda7 partition to increase it's space.That's all.I hope it would be helpful.

share|improve this answer
    
till now this looks like the most useful answer :D I didn't do it yet because TILL NOW I still can't get rid of this red exc. mark. I don't know what to do about it –  Mina Michael Jan 8 at 13:00
    
in the gparted partion editor,click on the gparted and then select refresh devices. –  Avinash Raj Jan 8 at 13:02
    
the partition has a bad sector. it still detects it after refreshing –  Mina Michael Jan 8 at 13:04
    
check for the badsectors in that ntfs partition.Did you shutdown windows fully? –  Avinash Raj Jan 8 at 13:05
1  
...so I did the partitioning after all! here's how I got rid of my bad sector askubuntu.com/questions/403434/… . one thing that's missing from the question is that I should have prepared my windows 7 installation or repair disk because windows wouldn't boot since I moved it. Thank you so much for helping!! I wouldn't have done it without your answer. ... and I want to thank the moderators so much for "helping this question get answers" :P :P of course it's a duplicate!! I wanted a step by step guide!!!! –  Mina Michael Jan 28 at 2:48

Most the time I help users with that problem, they don't really miss some space for the system, 20 Gb is large for system files (/). The problem is often that they need to clean useless updates and packages.

Step 1: delete old kernels

If you are using a Ubuntu 12.04 LTS and it is installed for monthes, you have a lot of useless kernels installed with security updates. More, if you are using some restricted drivers for your graphic card, you have too many kernel headers installed. Every kernel and headers take a huge amount of space, and it is usually the cause of lack of your problem.

To do the cleanup more easily, I recommend to install the good old Synaptic package manager. In a terminal:

sudo apt-get install synaptic

Of course, you can do that with Software Center or Aptitude too.

Launch Synaptic, it will ask for your password. In the search tool, type and find linux-image. Select name of the package, not "description".

Then, go at the bottom of the list, keep the two or three latest kernels installed. And going up, right click on older kernels, and select "Mark for complete removal".

Once done, do the same with packages named `linux-headers". Take care to keep the headers coordinate to the images you keep.

Then, click on "Apply" in the top bar of Synaptic. And wait, for it can take some time to remove a lot of old kernels.

Step 2: remove useless packages

The aim is to remove the package your system don't need anymore. This is done with two simple terminal command, for I don't know how to do it with a GUI.

sudo apt-get autoclean

This one removes from local apt-get cache old packages that can not be downloaded anymore. If you want to completely purge that cache, you can instead use sudo apt-get clean.

sudo apt-get autoremove

This one check all dependencies of all packages, and then, automatically remove packages that are not anymore needed by the system or an application. Very useful if you install and removes applications sometimes.

Et voilà !

You should have recover most or your free space.

Please notice that their might be some important amount of data in your system partition:

  • If you have some databases or a webserver running in the background, you might some data in /var/. It might be good to create a separate partition, or to configure the servers to use files in your /home.
  • If you have a lot of Fonts files, it will be in the system partition too.
  • Etc...
share|improve this answer
1  
i think op ask to increase the size of / partition. –  Avinash Raj Jan 6 at 2:59
    
but does he really need it ? I am not really sure. If his / partition is full with 20Gb, he needs to clean. Not increase the size. –  ttoine Jan 6 at 17:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.