Results 1 to 6 of 6

Thread: Increasing partition size with GParted

  1. #1
    Join Date
    Apr 2008
    Beans
    10

    Increasing partition size with GParted

    I booted from GParted LiveCD and I'm trying to increase size of my main partition, sda1. GParted is letting me increase size of /dev/sda2, but not of /dev/sda1, possibly because it's blocked in by /dev/sda1.
    Currently partitions look like this

    11GB /dev/sda1
    .5 GB /dev/sda2, inside it is /dev/sda5 (linux-swap)
    39 GB unallocated space

    What's the best way to increase /dev/sda1 size to 50GB?

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Increasing partition size with GParted

    Since you say sda5 is inside sda2, sda2 is the extended partition. You must first unmount sda5 (swapoff) and move it to the right. Might as well put it all the way to the far right edge.

    Next shrink sda2, leaving space to the left.

    Finally, expand sda1 to the right.

    It's often helpful to include a snapshot to let us see things more clearly. If what I've surmised isn't the correct situation, that would help.
    Back to Xorg...

    Retired.

  3. #3
    Join Date
    Apr 2008
    Beans
    10

    Re: Increasing partition size with GParted

    Still no luck, here's what I'm doing

    Booting up from GParted LiveCD


    sda5 (linux-swap is unmounted)


    but, I can't move it anywhere


    the enclosing partition (sda2) can be increased in size, but only from the right, and I can't move it either (the left slider doesn't respond)


    My guess is that I can't move them because there's data in linux-swap partition.

  4. #4
    Join Date
    Apr 2007
    Location
    Eldorado, NM
    Beans
    5,060
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Increasing partition size with GParted

    Might the problem be that sda2 is an extended partition? If so, you can try deleting it entirely, starting with swap, and then you may be able to enlarge sda1.
    -merlin

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Increasing partition size with GParted

    My original instructions assumed the sda2 extended partition took up the rest of the disk, which isn't the case. Now that you have provided pictures...

    You could simply delete the swap and extended partitions and recreate them but we would have to then deal with the changed UUID of the swap partition. Not a big deal but this method will stay entirely within gparted without editing several system files along the way.

    Back up any important data before doing this.

    LiveCD
    Again, make sure the swap (sda5) is off (swapoff).

    Expand sda2:
    Select sda2 from the bottom section of gparted.
    From the top menu, Resize/Move and slide the right edge it all the way to the right. It should now take up all the free space on the drive (everything but sda1).

    Move sda5:
    Highlight sda5 (swap).
    Resize/Move and drag it to the far right. You don't have to change the size.

    Shrink sda2:
    Select sda2 (extended partition), Resize/Move.
    Drag the left edge of sda2 to the right as far as you want. The "space before" window will show how much space you will be giving to sda1. The right edge of sda1 should now be touching the left edge of sda2.

    Expand sda1:
    Select sda1, Resize/Move, and drag the right edge to the right to include the new free space.

    Now you should see a larger sda1, sda2 taking up all the remaining space, and at the far right (and still inside sda2) sda5.
    Last edited by drs305; May 30th, 2009 at 12:27 AM.
    Back to Xorg...

    Retired.

  6. #6
    Join Date
    Apr 2008
    Beans
    10

    Re: Increasing partition size with GParted

    Thanks drs, I followed the instructions, and it worked

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •