I am trying to upgrade my ubuntu 14.04 to 16.04 but due to lack of space in my Ubuntu installed drive I was unable to proceed the process further and also I had 30 GB of unallocated space free in my computer. I used Gparted software from my Live USB and used it to move and shrink /dev/sda6 to get about 30 GB of unallocated space in the side of /dev/sda5. After the completion of moving and shrinking I tried to expand my ubuntu drive /dev/sda5 using move/resize option but in the middle of the process some error came and didnt allow the process to go further.
Then after a fresh reboot again opened Gparted from my Live USB but now its showing some error in my ubuntu partition(/dev/sda5) which is the same initial size and dosent allow me to expand the partition.
I also tried to fix the root partition using this
sudo touch /forcefsck
sudo reboot
but it didnt reported any error. What should I do now? what happended to the unallocated space I can see it in the image but its not inside sda5?
EDIT:
result for sudo fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2253336f
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 136970189 68381671 7 HPFS/NTFS/exFAT
/dev/sda3 136986248 220984415 41999084 7 HPFS/NTFS/exFAT
/dev/sda4 220985343 625139711 202077184+ f W95 Ext'd (LBA)
/dev/sda5 220985344 318570495 48792576 83 Linux
/dev/sda6 318572544 432474111 56950784 7 HPFS/NTFS/exFAT
/dev/sda7 432633856 625139711 96252928 7 HPFS/NTFS/exFAT
Now when I start gparted its giving this error (libparted bug found)
Error informing the kernel about modifications to partition /dev/sda4 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sda4 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Looks like the partition
/dev/sda5
got enlarged, but not the ext4 file system inside it which is still at the original size.First of all, if you haven't done it yet, make a backup! Modifying partitions and file systems always has the risk of data loss!
Then make sure you are booting from a live system so that we can operate on the file system while it's unmounted.
First we must force a file system check using this command:
It should hopefully report no errors or be able to fix them.
After that we can resize the file system to match the size of the partition it's located in. We do that with the command below:
After that you might want to repeat the first command (
e2fsck
) to check everything is okay.Then your partition and file system should have the same size again and cause no more trouble regarding this issue.