This will probably a very novice question but I have made a big mess and would really appreciate if anyone could please help me.
I am running two OS, Windows 7 and Ubuntu, and I have a partition in NTFS that was shared between both for data. This partition was /dev/sda5. Today I want to split /dev/sda5 in two to install another version of Linux on it. I tried using GParted but things have gone wrong.
After reading online and watching tutorials, it seemed that all I needed to do was to select "Resize/Move" in GParted, and slide the bar from the right towards the middle. I did that and hit apply, and then created a mess. Things have gone wrong since then. In Windows 7, I tried deleting the new partition and expanding my old drive so it takes all it's size back, but I realize there are still 1 or 2 unallocated block, as shown on the picture:
I believe the unallocated that is 9 MB was part of the drive, and also the 1.02 MB unallocated at the bottom (I have no idea how this one got there).
When trying to open DATA from Ubuntu I get the following error:
Windows 7 simply says the partition needs to be formatted, which I am lot letting the OS do.Error mounting: mount exited with exit code 12: Failed to read last sector (365685320): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
or it was not setup correctly (e.g. by not using mdadm --build ...),
or a wrong device is tried to be mounted,
or the partition table is corrupt (partition is smaller than NTFS),
or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/sda5': Invalid argument
The device '/dev/sda5' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
I have been running TestDisk but I am not sure how to fix the issue. This is the output of "Analyse" is the following:
Running "sudo fdisk -l" gives me the following output:TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
Partition Start End Size in sectors
1 P hid. FAT32 LBA 0 32 33 2166 254 63 34810807 [RECOVERY]
2 * HPFS - NTFS 2167 0 1 17366 254 63 244188000 [OS]
3 E extended LBA 17367 0 62 60801 47 46 697770156
Error: size boot_sector 365685321 > partition 365668522
Invalid NTFS or EXFAT boot
5 L HPFS - NTFS 17367 1 1 40128 208 16 365668522
5 L HPFS - NTFS 17367 1 1 40128 208 16 365668522
X extended 40129 0 1 60288 213 21 323867775
6 L Linux 40129 245 53 60288 213 21 323852288
X extended 60288 213 22 60801 47 46 8230912
7 L Linux Swap 60288 245 54 60801 47 46 8228864
On the good side, I have a recent backup on an external drive, but I would still like to get back to my previous state and be able to partition my /dev/sda5 for my new OS later on. Maybe the files are still intact on /dev/sda5? It would be nice to salvage them if that is the case.Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x76692ca8
Device Boot Start End Blocks Id System
/dev/sda1 2048 34812854 17405403+ 1c Hidden W95 FAT32 (LBA)
/dev/sda2 * 34812855 279000854 122094000 7 HPFS/NTFS/exFAT
/dev/sda3 279000916 976771071 348885078 f W95 Ext'd (LBA)
/dev/sda5 279000918 644669439 182834261 7 HPFS/NTFS/exFAT
/dev/sda6 644687872 968540159 161926144 83 Linux
/dev/sda7 968542208 976771071 4114432 82 Linux swap / Solaris
I am really confused as to what is going on. I would really appreciate if anyone could please help me.
Thank you really much for your help!