I want to partition /dev/sda5 and merge the unallocated space with /dev/sda6. How to do it? I've searched for many ways to do it but I couldn't understand much to proceed. Please help!!

Here is the snapshot of my GParted window.

  • What do you mean by "partition /dev/sda5". Do you want to create a new partition in /dev/sda5 or want to completely merge it in /dev/sda6 ? – g_p Sep 30 '14 at 11:02
  • I want to create a new partition in /dev/sda5 and merge it with the /dev/sda6 – dushyantashu Jun 4 '15 at 13:44

Boot from gparted live cd http://gparted.org/livecd.php

  • If you dont't want to have /dev/sda5 partition any more right click on it and remove - this 100MB of data will be lost. (You can't do this right now because it is mounted). Right click on /dev/sda6 and resize.

  • or down size /dev/sda5 and then resize dev/sda6

Be aware that there is always risk, so make backups


You must boot from a live-dvd/usb.

Once in the live-session run gparted with root attributes:

Open a terminal.

Run it:

sudo -i

From gparted, unmount partitions, delete /dev/sda5, increase /dev/sda6 merging the unallocated space with /dev/sda6.

Possibly Ubuntu becomes unusable.

Continue running:

blkid /dev/sda6 #The output will say like: xxxx.xxxx.xxxxx.xxxx
mount /dev/sda6 /mnt
mount --bind /dev /mnt/dev 
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
nano /etc/fstab
#Change in these lines the correct UUID
#/dev/sda6 was / 
UUID=xxx.xxxx.xxxxx.xxx / ext4    defaults        0       0
#Control+O, save file. Contro+X, Close nano.
umount /mnt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.