LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   expanding linux partition (https://www.linuxquestions.org/questions/linux-newbie-8/expanding-linux-partition-4175442349/)

sniper8752 12-20-2012 02:20 PM

expanding linux partition
 
1 Attachment(s)
I am trying to expand my Linux partition because I am getting warnings that I am running out of space. I also have Windows 7 installed, alongside of Ubuntu. I noticed that if I expand Ubuntu, then it would move the starting point of the win 7 partition, which can cause some issues. is there any way to expand the Linux partition of my hard drive without messing everything up?

masterclassic 12-20-2012 02:48 PM

I don't see many options. Shrink /dev/sda3, grow the extended partition, move the swap partition to the end, move/resize the /home partition etc.

It is possible to fix the win7 boot-up using a win7 install dvd.
I would recommend to make a backup copy of the hard drive, so that you are able to come back to the previous state, in case of problem. Hardware failure can be another source of problems, so a backup is always a good idea.

You can consult the GParted FAQ too.
It is safer to use the latest GParted version.

codergeek 12-20-2012 02:53 PM

You can try using LVM in the future when you want to resize partitions. LVM allows partitions to be resize larger or smaller, but this has to be setup in advance and then you install the distro on LVM volume names i.e root,swap, home. etc. Youtube has tutorials on this.

sniper8752 12-20-2012 03:12 PM

Quote:

Originally Posted by masterclassic (Post 4853887)
I don't see many options. Shrink /dev/sda3, grow the extended partition, move the swap partition to the end, move/resize the /home partition etc.

It is possible to fix the win7 boot-up using a win7 install dvd.
I would recommend to make a backup copy of the hard drive, so that you are able to come back to the previous state, in case of problem. Hardware failure can be another source of problems, so a backup is always a good idea.

You can consult the GParted FAQ too.
It is safer to use the latest GParted version.

so I could potentially resize win 7, move the linux partition to after the win 7 one, then expand the linux partition? would this create unallocated spacing then?

yancek 12-20-2012 09:29 PM

Your partitions for Ubuntu were too small to start with. What release of Ubuntu are you using? I installed Ubuntu 12.04 recetly and I know it required over 5GB just for the basic installation and you have less than 8GB for /, swap and /home. I would say that the minimum for a / partition on current systems would be 10GB and that may require more if you install a lot of software.

Are you interested in reinstalling Ubuntu, perhaps to a new partition after resizing/shrinking windows. You can do that from windows. If you have data on your /home partition, you could back it up to a DVD before beginning. There are several options that should work but we would need to know:

Are you willing to do a fresh install of Ubuntu?
Are you currently booting both Ubuntu and windows with Grub?
Do you have a full windows installation disk in case something goes wrong?
Do you have some media on which you can back up your data if something goes wrong?
Messing with partitions can cause serious problems, particularly if you don't have much experience.

Depending upon your answers to the above questions, it might be simplest to delete the current Extended partition, resize/increase the / partition (sda1) to the beginning of windows, shrink the windows partition and create an Extended partition with logical partitions in the new unallocated space at the end of the current windows where you could put /home, swap and or a data partition. You would need to back up your /home partition to a DVD. I think it might be simpler to reinstall Ubuntu after you have resized/shrunk windows and start over.

sniper8752 12-20-2012 09:49 PM

it sounds like it may just be easier if I wiped my computer clean, and started all over again.

yancek 12-21-2012 09:55 AM

Quote:

it sounds like it may just be easier if I wiped my computer clean, and started all over again.
Maybe. Depends upon what you have now. You seem to have a lot of data (180GB) on your windows partition to back up. You could just resize/shrink the windows partition and install Ubuntu after windows by creating a primary partition for it. There are ways you could then modify sda1 and sda2 but the problem is that Extended partitions, to my knowledge, need to be continguous and your Extended partition is too small to be of much use. I guess in the long run, it would probably be easier to back up and reinstall. Install windows first and if you need an Extended partition, make it larger so you have access to the whole disk.

EDDY1 12-21-2012 10:39 AM

I myself would shrink sda3 from left seeing that you almost 300G unused, then resize and/or move sda2 to get more space for /home.
Is it just /home filling up?

Using gfparted-live
Shrink sda3 from left
Expand sda2 to right
Move sda6 to the right
Resize sda5

sniper8752 12-21-2012 12:32 PM

yes it is /home. and I am not using much of my win 7 space. i just use it as my primary os.

EDDY1 12-21-2012 12:48 PM

As long as it's not / you can use the instructions in post #8


All times are GMT -5. The time now is 10:33 AM.