2

I have the following

enter image description here

where /dev/sda2 - Windows7 and "unallocated" is the partition I want to add to my current Linux installation at /dev/sda6. But I can't do this for some reason. Even when I format unallocated partition and then I click Resize, I can only make it smaller. The same thing is true for /dev/sda6.

In other words, /dev/sda1 and /dev/sda6 don't see each other.

So how can I merge /dev/sda1 into /dev/sda6?

There is no much menu item "resize" on /dev/sda3, although it's not mounted:

a@a ~ $ sudo umount /dev/sda3
umount: /dev/sda3: not mounted
a@a ~ $ sudo umount /dev/sda6
umount: /dev/sda6: not mounted
a@a ~ $ sudo umount /dev/sda5
umount: /dev/sda5: not mounted

UPDATE2:

$ sudo lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda2   8:2    0 829.8G  0 part 
├─sda3   8:3    0     1K  0 part 
├─sda5   8:5    0   3.6G  0 part [SWAP]
└─sda6   8:6    0  98.2G  0 part 
sdb      8:16   1  14.6G  0 disk 
└─sdb1   8:17   1  14.5G  0 part /cdrom
sr0     11:0    1  1024M  0 rom  
loop0    7:0    0   1.1G  1 loop /rofs

enter image description here

Clicking on /dev/sda3 and choosing "resize" enter image description here

Incerteza
  • 1,470

3 Answers3

3

If I understand correctly, you want to keep both Windows and Ubuntu, but give Ubuntu some more space on sda6? First of all BACK UP IMPORTANT DATA! Things can go wrong (although they shouldn't, you can never be too safe!) The issue here is that:

a - It appears that you are booted up onto that specific hard drive at the moment. You cannot modify partitions when you are currently using that drive. To remedy this, boot into a live USB (using your Ubuntu Install disk).

b - When you want to merge two partitions, you need to have them side by side. To do this you need to

1 select sda2, and move it to the left (using the partition menu>move). Note: There will be an error that pops up, warning you about failure to boot, this is normal!

Step 1

2 Select sda3, click resize, and add the unallocated space to sda3 by dragging the slider on the left all the way to the left. It should look somewhat like this:

Step 2

3 Select sda6, click resize, and add the unallocated space to sda6.

Step 3

Afterwards, your diagram should look somewhat like this:

Final Product

Now what you want to do is click the green checkbox to apply the changes. This will take a long time!

WARNING: after this is done, your computer may not boot up! To remedy this, you have to re-install grub (the screen that you see before you boot into windows or ubuntu). There are two ways to do this:

Either way, you need a Live CD/USB stick to boot off of. I found pretty detailed instructions here. The first method is easier (but you need to have a live CD of ubuntu 12.04 or later, and have internet access), but the second method (via terminal) works too. Just follow the instructions, and feel free to ask any questions!

Here to help,

Dev Newb

note: The pictures will vary slightly from yours (the partition sizes/labels etc), but the overall method should work. Also, I am using gparted on Ubuntu 12.04 LTS, but it should work the same on Ubuntu 13.10

Moose
  • 327
  • 4
  • 14
  • It won't work./dev/sda6 is in extended partition.See my answer. – Avinash Raj Mar 26 '14 at 08:12
  • It should work! I have done it. the drive numbers in the screenshot differ from the original, but the order of the partitions is the same. (btw, sda6 is ext4) – Moose Mar 26 '14 at 08:14
  • In some cases, the unallocated space will be on the top or at the bottom of the extended partition after resizing it.If it's on the top, your answer will work.But if it's on the bottom, then? – Avinash Raj Mar 26 '14 at 08:19
  • Yes, but if he follows my instructions, it should stay still work properly. I have done this myself. He simply needs to resize the extended partition NOT move it. – Moose Mar 26 '14 at 08:21
  • how can I unmount the partitions? I looks like /dev/sda3 is mounted even I'm on live cd now and thus I can't add resize it. – Incerteza Mar 26 '14 at 09:21
  • In gparted, right click the partition and select unmount. (You will have to unmount sda5 and sda6 before you can unmount sda3) – Moose Mar 26 '14 at 09:47
  • but still there is no such the enabled menu item in there. – Incerteza Mar 26 '14 at 09:49
  • In gparted, all the mounted partitions have a small symbol by them. In your screenshot, for example, sda3,5, and 6 are mounted – Moose Mar 26 '14 at 09:50
  • You are sure they are not mounted? – Moose Mar 26 '14 at 09:52
  • Make sure you have selected the correct partition, click the partition and click 'Resize/Move.' Is this grated out? If so, could you upload a screenshot? – Moose Mar 26 '14 at 09:57
  • edit: sorry! do NOT delete the windows partition!! – Moose Mar 26 '14 at 10:56
  • Here is what you need to do: resize the windows partition and move the slider on the right so you have some free space on the right of the windows partition. From there, you can add the free space to the extended partition etc. – Moose Mar 26 '14 at 10:59
1

To merge 718 GB unallocated space with the /dev/sda6, you have to follow the below steps.

  1. First boot from Ubuntu live disk and mark sure that all the partitions are unmounted.Gparted won't resize a mounted partition.

  2. Now right-click on the /dev/sda2 partition and click on resize.Move the dragger to the extreme left, so that the unallocated space will come just below to the /dev/sda2 partition.

  3. Right-click on the extended partition (/dev/sda3) and select Resize option.Now you can be able to add the unallocated space to your extended partition.

  4. Now the Unallocated space will comes inside your extended partition ie, just below to the /dev/sda5 partition.

  5. Right-click on the /dev/sda5 partition, select Resize option and move the dragger to extreme right.So that the unallocated space will come just above to the /dev/sda5 partition.

  6. Now you can be able to resize your /dev/sda6 Ubuntu partition.

Avinash Raj
  • 78,556
0

You can not merge partition. Unallocated partition is without file system and must be formatted before usage. Your /dev/sda6 is logical partition on primary partition /dev/sda3 and can not be bigger then host partition /dev/sda3 without space for /dev/sda5.

Solution is to move partition /dev/sda2 on beginning of disk. After that to move and resize partition /dev/sda3 to max space. And at the end resize logical partition /dev/sda6.

I'm not sure, maybe work.

Best of all is to backup data and do fresh install of booth system.

2707974
  • 10,553
  • 6
  • 33
  • 45