1

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.

2
  • 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, 2014 at 11:02
  • I want to create a new partition in /dev/sda5 and merge it with the /dev/sda6 Jun 4, 2015 at 13:44

2 Answers 2

1

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

0

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
gparted

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.
update-grub
umount /mnt
reboot 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .