Author Topic: Extend root partition with GParted.  (Read 359 times)

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Extend root partition with GParted.
« on: June 05, 2020, 10:42:39 am »
Hi,

I need a hand in extending the current root partition. I have a dual boot system  (non UEFI) with Windows installed. All in one physical hard disk. I have just made an 40 GiB unallocated space from within Windows. I now need to use it to make a home and possibly a swap partition (low on RAM). Please see below:

 


I know I need to boot from outside a live system and have a LiveUSB at hand. Just need a lil help to proceed.

Thanks

Offline spence

  • Administrator
  • Hero
  • *****
  • Posts: 2947
  • Karma: 333
  • peppermint user since 2010
    • View Profile
  • Peppermint version(s): PMVII, PMVIII, PMIX, PMX Respins
Re: Extend root partition with GParted.
« Reply #1 on: June 05, 2020, 11:11:57 am »
Once you are booted into your LiveInstall media, and have opened gparted, you simply click on the partition you wish to make bigger to get the option to resize...

to get your new swap partition, you may also click on the remaining unallocated space to get a dropdown to create a new partiton... 2.5x your memory is sufficient, unless you work with video... then 4x might be better


spence
PeppermintOS 8,9 & 10 Respins currently installed  on:
'16 Antec Aria rebuild
PMX Respin on '18 Asus VivoBook


Do not despair, grasshopper...
    with patience all will be revealed...
       Through pain, enlightenment will come.

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2308
  • Karma: 612
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Extend root partition with GParted.
« Reply #2 on: June 05, 2020, 01:53:56 pm »
Hi hellbraker,

What spence has said is correct. But being unexperienced in doing this you might still be confused. So I would suggest that you look at this as two tasks (it was three, but you have done the first already: making the unallocated free  space). Well, maybe it is still three tasks: back up your personal data (docs, pics, video, etc) to an external USB stick before doing the following steps!!! This is simply a precaution in case something goes wrong.

So as next step (after backing up your personal files) is perfomed while booted into the live USB installation media. Start the gparted program and increase the size of your Peppermint partition by moving the slider (in gparted) for the beginning of the Peppermint partition so that it "bumps" into the end of the /dev/sda2 partition and then move the slider for the end of the Peppermint partition so that  (see the info from spence) about 2x your currently installed amount of RAM is left unallocated at the end of the Peppermint partition. You can now tell gparted to apply these changes (this may take a while until it completes).

Now the final task is to use gparted and create a final partition where the unallocated space is found (and use all of it) and format it as linux swap space. Then tell gparted to apply this change.

When you have completed this let us know. You will still have to tell Peppermint where the swap space is located and that it should be used as such. We can tell you how to do this (it involves changes to the file /etc/fstab). If you already know how to do these changes, then fine -- otherwise ask when you are finished with the above steps.  ;)


Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Extend root partition with GParted.
« Reply #3 on: June 05, 2020, 08:16:13 pm »
I tried moving the slider but it can't go beyond the maximum size of the root partition. Do I need to format the unallocated space into any file system? See below:


 

As you can see the maximum size for expanding is 30001 MiB. But yes I can move the slider at the end though.

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2308
  • Karma: 612
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Extend root partition with GParted.
« Reply #4 on: June 06, 2020, 12:26:39 am »
Hi hellbraker,

You should select /dev/sda3 (rather than /dev/sda5) and move its slider to the left.  ;)

Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online rayzer

  • Trusted User
  • Member
  • *****
  • Posts: 376
  • Karma: 147
  • Graphics n Stuff
    • View Profile
  • Peppermint version(s): 10 Respin
Re: Extend root partition with GParted.
« Reply #5 on: June 06, 2020, 06:19:02 am »
try changing the order of the partitions, put the unallocated space at the right and the root to second last. then you should be able to resize the root to fill the area. once the partitions are joined move it back to where it was in order on the list.
For wallpapers ive made you can download them here

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Extend root partition with GParted.
« Reply #6 on: June 06, 2020, 08:21:29 pm »
I did as instructed and now the unallocated space is under sd3 as below:

 


As before I an unable to move the slider for sda5 (root) to thr left. Did I do something wrong?

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Extend root partition with GParted.
« Reply #7 on: June 07, 2020, 01:41:01 am »
On second restart i can now move the slider. I get a warning saying I am about to move the start sector of sda5 and it is likely to have a failed boot. See below.

 


I know this is usual, but I hope I'll get help if and  when a boot failure occurs. I have no real valuable data, so there is no need to backup.

Thank you

Online alynur

  • Trusted User
  • Veteran
  • *****
  • Posts: 1232
  • Karma: 133
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9R (64bit), P 10
Re: Extend root partition with GParted.
« Reply #8 on: June 09, 2020, 11:51:37 am »
Hello hellbraker, why am I not seeing anything under your "see below"?
What was I thinking?

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Extend root partition with GParted.
« Reply #9 on: June 10, 2020, 12:38:47 am »
That's strange, don't know why. Is it for all, or just the last one? How about the link below:

https://m.imgur.com/K6VDXA4

Online alynur

  • Trusted User
  • Veteran
  • *****
  • Posts: 1232
  • Karma: 133
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9R (64bit), P 10
Re: Extend root partition with GParted.
« Reply #10 on: June 12, 2020, 01:54:20 pm »
That's strange, don't know why. Is it for all, or just the last one? How about the link below:

https://m.imgur.com/K6VDXA4

Strangely, after clicking on this link, all of the prior images showed up. Are you able to boot into Peppermint right now since you've made the changes so far? If so, open a terminal and type
Code: [Select]
fstabcopy the output and save it somewhere. From the looks of it, you are almost done. You should be able to ignore that warning and go ahead and move the slider to the left as far as possible.
If you do experience boot problems afterwards, it will most likely be because of the fstab entry for sda5. If that happens, come back here and we'll explain how to fix it. I've done exactly what you are attempting in the past and I don't think I had any problems but it's been a while and I barely remember what I did yesterday.

edit, on second thought, also type
Code: [Select]
sudo xed /etc/fstab
in a terminal and save that output somewhere.
« Last Edit: June 12, 2020, 01:59:01 pm by alynur »
What was I thinking?

Offline hellbraker

  • Newly Subscribed
  • *
  • Posts: 12
  • Karma: 4
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Extend root partition with GParted.
« Reply #11 on: June 16, 2020, 09:47:25 am »
Will do as you told. But now I have formatted the unallocated space to an ext4  partition. Hope it doesn't get in the way.

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2165
  • Karma: 415
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: Extend root partition with GParted.
« Reply #12 on: June 16, 2020, 12:13:49 pm »
You can't extend a partition into space you've occupied with another partition.

If you do move sda5 to the left then you probably will have trouble booting and have to reinstall GRUB from a live USB session.