1

sda6 is ext4 file system and where my ubuntu is installed, 30GB. sda3 is "ntfs" file system and where my windows is installed, 400GB. sda7 is a 50 GB empty partition with "ext4" file system.

How to move the space of sda7 to sda6 to let sda6 become 50+28=78 GB.

enter image description here

Here's a real case of mine :( I want to add more space into my ubuntu (28.2 GB one) from other emtpy partition space.

3 Answers3

3

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • right-click on "New Partition #1" in the bottom pane and select delete (added)
  • right-click on /dev/sda7 in the bottom pane and select delete
  • move /dev/sda6 partition all the way left
  • resize the right side of /dev/sda6 all the way right
  • right-click on /dev/sda8 in the bottom pane and delete it if it's not needed (added)
  • click the Apply button
  • reboot
heynnema
  • 70,711
2

Follow these steps to get things done:

  • Backup all your data in sda7
  • Boot into Ubuntu via LiveUSB (by clicking on Try Ubuntu)
  • Open GParted
  • Delete partition sda7 and New Partition #1
  • Extend partition sda6
  • Apply changes and reboot

Detailed procedure of partitioning can be found in this question How to resize partitions?

Alternatively you can let sda7 be separate partition and move your /home to that. You might like to read How to create a separate home partition after installing Ubuntu under single / partition.

Original Answer:

I believe B is in between A and C. Although you can merge C and D but it is impossible to merge A and C, since partitions need to be in contiguous form to be extended or merged or you can say, partitions need to be exactly above or below the unallocated space to get resized. Moreover unlike Windows Ubuntu can't work on dynamic disks, so it is impossible to extend the partition using the partition which is very far. So it is better to merge C and D (and have 65 GB) and keep partition A as a separate partition.

Kulfy
  • 17,696
  • A is where my ubuntu installed and 30GB only. I wanna add the 65 GB into my A to become 95GB so it can install a 40GB dota 2..... If I merge C and D and have them become 65GB my A is still 30 GB, then dota 2 still can't be installed...i don't even know how to merge C and D lol. pls help :) – Coolest Man Dec 12 '18 at 15:17
  • It seems that the situation is much different , see updates. –  Dec 12 '18 at 15:58
  • @CoolestMan I've updated the answer. I hope I've addressed your issue. I kept this answer as short and straightforward as possible. Thanks :) – Kulfy Dec 13 '18 at 06:58
  • @Kulfy I had already added the last screenshot posted in comments, the one where the two initially separated ext4 partitions are now joined in a single one ( sda7) –  Dec 13 '18 at 10:39
  • @cipricus Oh my bad!! I thought latest screenshot is in comments. – Kulfy Dec 13 '18 at 10:40
0
  • Do you really need more space? Consider the risks and that the second linux partition can be mounted and used from Ubuntu without the need of having it merged to the system partition. I see you have a lot of free space on the Ubuntu partition. Why do you need more there?

If you really want only one Linux partition as you say:

  • Backup all important data from all your disk (Ubuntu, Windows and all other partition) - or take the risk of losing them. There is also some risk to get in bigger trouble with the HDD altogether when partitioning, but life is risky..

  • A system partition cannot be modified while in use, you have to put Ubuntu on a live usb stick (use Etcher or Gnome Disks to create that) and boot from it. If you have already an Ubuntu iso you can put that on the stick, if not, download it, or maybe a version with a smaller iso (Xubuntu etc) that has gparted included. If it's not included (rare case) you can install it even there if you connect to the internet in the live usb session and run sudo apt install gparted.

  • While booting from live usb (restart pc with the usb attached, you might or might not need some bios setting and/or pressing a key like Esc , F8, F9, depends on the machine - some details here): delete the sda7 partition to create a free space, then select sda6, select Resize/Move drag the sda6 to the left.

enter image description here

Extending to the left is in fact moving a partition - and that can take much more time than when simple extending a partition (to the right), so be sure you have power supply during procedures.

  • If all this is obscure to you: take your time and study the gparted procedures, like here and in the linked questions/answers here.