0

I'm trying to exdend my OS partition. As you will see in the screenshot I provided below, the unallocated partition is not contiguous to one of the partition I wish to increase/grow the size i.e /dev/sda6 in my case

What I'd like to do is :

  • /dev/sda6 + 20 GB borrowed from unallocated
  • /dev/sda7 + 1 GB borrowed from unallocated

How can I do that ?

Below is a screenshot from gparted

gparted screenshot

L. D. James
  • 25,036
Jason Krs
  • 103
  • 1
    Delete the swap partition, extend sda6 to the desired size, recreate the swap partition to the desired size. – Elder Geek Sep 25 '16 at 21:44
  • 1
    It might make some sense to reduce sda2, and then increase all the others. Unless you have big plans for sda2. Do you dual-boot? If so, how much do you use Windows vs Ubuntu? Let me know, so that I can recommend the best way to do it. Cheers, Al – heynnema Sep 25 '16 at 21:46
  • @ElderGeek Awesome man. It worked perfectly. ALSO, if it may help someone else, I have to say that after that, I had to recreate the swap partition and re-mount following this --> http://askubuntu.com/questions/33697/how-do-i-add-a-swap-partition-after-system-installation – Jason Krs Sep 26 '16 at 09:41
  • @heynnema Nope. You're not correct because sda2 is my Windows OS. Not a good idea to resize it TRUST ME !!! lol – Jason Krs Sep 26 '16 at 09:42
  • I had asked if you used Windows. From looking at your gparted map, sda2 appears empty, and appears to have a possible file system problem, due to the orange icon. Lastly, you can always resize a Windows partition, as long as you do it from Windows (not gparted). So please explain your comment. Cheers, Al – heynnema Sep 26 '16 at 11:17

1 Answers1

1

These steps should be performed by first booting from live media as mounted partitions shouldn't be modified.

  1. Insure that the swap partition isn't in use by by the live media by opening a terminal and issuing the command swapoff

  2. Delete the swap partition (/dev/sda7 in your example)

  3. Extend /dev/sda6 to the desired size reserving enough space for a swap partition of the desired size.

  4. Recreate the swap partition (of the desired size)

Gparted usage is beyond the scope of this answer but there is a manual available for those who are unfamiliar with it's usage.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
  • Thank you for the answer. I did exactly that few hours ago as you've suggested in your earlier comment. After that I had to use nano to make the newly created swap partition automatically mounted at OS boot.... Please I have right now another issue. Can you take a look at it ? apt-get won't find dependencies or something... --> http://unix.stackexchange.com/questions/312418/ubuntu-apt-get-command-not-working-in-kali-linux – Jason Krs Sep 26 '16 at 14:07
  • 1
    Color me surprised, this worked! – Zane Helton Sep 21 '20 at 23:56