Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
smfabac
Posts: 4
Joined: 16 Feb 2019, 22:08

Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

#1 Post by smfabac »

Firstime working wtih testdisk and as usual in an emergency data recovery mode.

Advanced NTFS Boot and MFT Repair indicates testdisk can copy the MFT of an NTFS partition to the MFT mirror, However, when I run the steps as listed "select your NTFS partition, choose Boot, then Repair MFT" TestDisk offers "Fix MFT mirror using MFT ? (Y/N)" I select Y and get "MFT mirror fixed.." After hitting enter, Im back at the Advanced screen and if I select Repair MFT a second time I see: "MFT and MFT mirror matches perfectly."

But I don't see any option to update the disk with the new MFT mirror, and if I exit TestDisk back through the menues to quit to the operating system and then re run TestDisk and get back to the Repair MFT selection Oops, As I step through the options to create this post, Repair MFT now says ""MFT and MFT mirror matches perfectly."

I've been tearing my hair on this issue as in the past attempts, it had announced "Fix MFT mirror using MFT ? (Y/N)" each time I reentered TestDisk.

My original problem still exists when trying to mount /dev/sda3 on /ntfs
smf@smf-desktop:~$ sudo mount /dev/sda3 /ntfs
Did not find any restart pages in $LogFile and it was not empty.
The file system wasn't safely closed on Windows. Fixing.
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read NTFS $Bitmap: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
smf@smf-desktop:~$
My problem with this file system is that it was abandoned (not deleted) when I ran software to restore the Linux partition located just before the ntfs partition. Both partitions were unavailable after the restore (system booted to Grub-rescue). I've been working a week to recover from this problem beginning with using System Recovery ISO to copy the disk to a new disk of the same size and then attempting all recovery on the copied disk so that when things go wrong, I can recopy and start again.

Here's an odd factum: I found an fdisk -l record in the primary boot partition (Dos Windows) in boot-save/log/2017-07-23__01h18boot-repair17 With the fdisk -l section showing:
============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 63 6,522,389 6,522,327 b W95 FAT32
/dev/sda2 10,924,261 976,771,071 965,846,811 f W95 Extended (LBA)
/dev/sda5 10,924,263 13,301,819 2,377,557 b W95 FAT32
/dev/sda6 13,301,883 24,226,019 10,924,137 b W95 FAT32
/dev/sda7 24,226,083 35,150,219 10,924,137 b W95 FAT32
/dev/sda8 35,150,283 157,935,014 122,784,732 b W95 FAT32
/dev/sda9 157,935,616 534,755,327 376,819,712 83 Linux
/dev/sda10 534,761,472 972,709,887 437,948,416 7 NTFS / exFAT / HPFS
/dev/sda11 972,711,936 976,771,071 4,059,136 82 Linux swap / Solaris
fdisk -l from the System Recovery ISO shows only up to /dev/sda9 (the non accessible Ubuntu partition.)


I used fdisk to create the missing partitions from the above list and was able to mount /dev/sda9 and perform grub-install
and get the system booting the sda9 partition. However, the boot fails to mount the NTFS partititon and I have been
working for a week attempting to fix the problem with TestDisk, Gparted, and some windows tools in Ultimate Boot CD and Win7 PE .

I can run chkdsk on the recreated partition but is looses all the VMWare VMDK drive files (sets them to size zero) in all the Virtual machines I have in the ntfs partition (and a Windows 98 VM that uses Fat32 partition).

My last attempt ( copy disk and start over) I deleted the /dev/sda2 extended partition and then fdisk -l only listed /dev/sda1. I recreated two primary partitions /dev/sda2 and /dev/sda3 with the starting and ending sectors shown above for sda9 and sda10 so that my rebooted system fdisk-l shows:
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xcebb4c68

Device Boot Start End Blocks Id System
/dev/sda1 * 63 6522389 3261163+ b W95 FAT32
Partition 1 does not start on physical sector boundary.
/dev/sda2 157935616 534755327 188409856 83 Linux
/dev/sda3 534761472 972709887 218974208 7 HPFS/NTFS/exFAT
/dev/sda4 982711936 1953525167 485406616 5 Extended
/dev/sda5 982714368 1016268799 16777216 82 Linux swap / Solaris
/dev/sda6 1016270848 1528270847 256000000 83 Linux
I created /dev/sda8 that should be above the end of /dev/sda3 and used testdisk to copy the directories and files See Win98 below:

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
3 P HPFS - NTFS 33287 92 22 60548 99 31 437948416
Directory /win98/Windows 98

>dr-xr-xr-x 0 0 0 7-Feb-2019 13:16 .
dr-xr-xr-x 0 0 0 29-Nov-2013 15:20 ..
-r--r--r-- 0 0 1139 16-Sep-2016 23:22 VMFolderList.txt
-r--r--r-- 0 0 10551296 15-Nov-2013 01:39 Windows 98 orig.kdmv
-r--r--r-- 0 0 8684 7-Feb-2019 13:12 Windows 98.nvram
-r--r--r-- 0 0 47960489984 7-Feb-2019 13:12 Windows 98.vmdk
-r--r--r-- 0 0 115 17-Mar-2017 09:14 Windows 98.vmsd
-r--r--r-- 0 0 3356 7-Feb-2019 13:12 Windows 98.vmx
-r--r--r-- 0 0 2481 15-Nov-2013 22:35 Windows 98.vmx_back
-r--r--r-- 0 0 426 17-Mar-2017 08:56 Windows 98.vmxf
-r--r--r-- 0 0 1643636 15-Mar-2017 20:42 vmmcores-4.gz
-r--r--r-- 0 0 1548958 18-Jul-2017 13:48 vmmcores-5.gz
-r--r--r-- 0 0 559326 26-Jan-2019 12:59 vmware-0.log
-r--r--r-- 0 0 252564 18-Jan-2019 19:23 vmware-1.log
Next
Use Left arrow to go back, Right to change directory, h to hide Alternate Data S
treaq to quit, : to select the current file, a to select all files
C to copy the selected files, c to copy the current file
This failed when the /dev/sda8 244GB file system was filled up. So More data exists for /dev/sda3 then the expected 208GB
shown in Gparted
Filesystem 1K-blocks Used Available Use% Mounted on
udev 7840176 12 7840164 1% /dev
tmpfs 1577024 1420 1575604 1% /run
/dev/sda2 185321476 42408344 133476256 25% /
/dev/sda6 251850484 251834064 0 100% /home/smf/mnt
So it is obvious that the end of the original NTFS partition is something above the 972709887 ending sector.

I need help on finding he true ending sector of /dev/sda10 When I recopy and start over (picked up a new 1TB drive today for the new work).

When I edited this post to clean up the typos and reran TestDisk to get a listing of the Windows 7 VM directory for the TestDisk copy example above all the VDMK files are missing although it was copied to /dev/sda6 prior to running out of disk space. Possibly another indication that /dev/sda3 end block is incorrect and copying from /dev/sda3 to the mounted /dev/sda6 stomped over the sectors formerly containing the
Windows 7 files in the ntfs partition

root@smf-desktop:~# cd /home/smf/mnt
root@smf-desktop:~/mnt# ls -l
total 64
drwxr-xr-x 2 root root 4096 Feb 8 16:05 cpio
drwxr-xr-x 2 root root 4096 Jun 9 2014 downloads
drwxr-xr-x 3 root root 4096 Jun 24 2017 GNSVM
drwxr-xr-x 3 root root 4096 Sep 27 2016 Kali Linux 1.0.6 32 bit
drwxr-xr-x 3 root root 4096 Dec 6 2017 Linux Lite
drwx------ 2 root root 16384 Feb 16 15:49 lost+found
drwxr-xr-x 3 root root 4096 Jul 30 2017 RECYCLER
drwxr-xr-x 3 root root 4096 Jul 30 2017 System Volume Information
drwxr-xr-x 2 root root 4096 Apr 28 2017 TestISOS
drwxr-xr-x 14 root root 4096 Jan 5 2018 Test VMS
drwxr-xr-x 3 root root 4096 Jul 23 2017 vmware
drwxr-xr-x 4 root root 4096 Mar 11 2017 win7
drwxr-xr-x 3 root root 4096 Nov 29 2013 win98
root@smf-desktop:~/mnt#

root@smf-desktop:~/mnt/win7# pwd
/home/smf/mnt/win7
root@smf-desktop:~/mnt/win7# cd Windows*
root@smf-desktop:~/mnt/win7/Windows 7# pwd
/home/smf/mnt/win7/Windows 7
root@smf-desktop:~/mnt/win7/Windows 7# ls -lt
total 156003004
-rw-r--r-- 1 root root 945071 Feb 7 13:11 vmware.log
-rw-r--r-- 1 root root 3559 Feb 7 13:11 Windows 7.vmx
-rw-r--r-- 1 root root 8684 Feb 7 13:11 Windows 7.nvram
-rw-r--r-- 1 root root 4242800640 Feb 7 13:11 Windows 7-s012.vmdk
-rw-r--r-- 1 root root 71671218176 Feb 7 13:11 Windows 7-0.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s001.vmdk
-rw-r--r-- 1 root root 4248895488 Feb 7 13:11 Windows 7-s002.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s003.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s004.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s009.vmdk
-rw-r--r-- 1 root root 4249747456 Feb 7 13:11 Windows 7-s014.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s015.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s006.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s007.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s008.vmdk
-rw-r--r-- 1 root root 4252368896 Feb 7 13:11 Windows 7-s013.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s017.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s005.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 7 13:11 Windows 7-s016.vmdk
-rw-r--r-- 1 root root 4252499968 Feb 6 00:07 Windows 7-s010.vmdk
-rw-r--r-- 1 root root 2571567104 Feb 6 00:00 Windows 7-s011.vmdk
-rw-r--r-- 1 root root 4234608640 Feb 5 23:57 Windows 7-s018.vmdk
-rw-r--r-- 1 root root 4247912448 Feb 5 23:55 Windows 7-s019.vmdk
-rw-r--r-- 1 root root 4252499968 Jan 30 16:24 Windows 7-s021.vmdk
-rw-r--r-- 1 root root 1354 Jan 26 16:29 Windows 7.vmdk
-rw-r--r-- 1 root root 850739 Jan 26 12:41 vmware-0.log
-rw-r--r-- 1 root root 4252499968 Jan 26 12:32 Windows 7-s020.vmdk
-rw-r--r-- 1 root root 427884544 Jan 26 12:28 Windows 7-s022.vmdk
-rw-r--r-- 1 root root 399537 Jan 18 19:44 vmware-1.log
-rw-r--r-- 1 root root 2024553 Jan 16 23:50 vmware-2.log
-rw-r--r-- 1 root root 115 Sep 27 10:57 Windows 7.vmsd
-rw-r--r-- 1 root root 6487030 Aug 14 2018 vmmcores-13.gz
-rw-r--r-- 1 root root 3906 Jul 29 2017 Windows 7.vmxf
-rw-r--r-- 1 root root 4980206 Mar 15 2017 vmmcores-12.gz
-rw-r--r-- 1 root root 173 Mar 11 2017 Windows 7.dsmvvmsd
-rw-r--r-- 1 root root 49235352 Sep 16 2016 vm-2016-09-16.19881.tgz
-rw-r--r-- 1 root root 1893 Sep 16 2016 VMFolderList.txt
drwxr-xr-x 3 root root 4096 Apr 20 2016 caches
root@smf-desktop:~/mnt/win7/Windows 7#

Even though the above shows vmdk's VMWare Workstation 11 fails to see the disks so there is no confirmation that they were copied correctly.

I will start back at a new copy of the original disk and post the quick scan results for Testdisk before any other attempts are made to recover the NTFS partition.
Last edited by smfabac on 18 Feb 2019, 20:25, edited 1 time in total.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

#2 Post by cgrenier »

You have listed sda10 location yourself:
/dev/sda10 534,761,472 972,709,887 437,948,416 7 NTFS / exFAT / HPFS
TestDisk can also find the same partition using Analyse, QUick Search and if necessary Deeper Search...

In the worst case, you can always run PhotoRec and select /dev/sda10 to recover its data.

smfabac
Posts: 4
Joined: 16 Feb 2019, 22:08

Re: Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

#3 Post by smfabac »

cgrenier wrote: 18 Feb 2019, 11:36 You have listed sda10 location yourself:
/dev/sda10 534,761,472 972,709,887 437,948,416 7 NTFS / exFAT / HPFS
TestDisk can also find the same partition using Analyse, QUick Search and if necessary Deeper Search...

In the worst case, you can always run PhotoRec and select /dev/sda10 to recover its data.
The following is from a new copy to the new disk I used system recovery CD to copy the original disk to a newly purchased 1TB disk so it was blank when I tiook it out of the box. first boot of System recovery CD with original disk identified as SDA
and new WD disk identified as SDB

Note that sda9 is visible.


[root@sysresccd ~]# fdisk -l
Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.
Invalid flag 0x2b04 of EBR (for partition 9) will be corrected by w(rite).
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD1003FZEX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xcebb4c68

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 6522389 6522327 3.1G b W95 FAT32
/dev/sda2 10924261 1945188351 1934264091 922.3G f W95 Ext'd (LBA)
/dev/sda5 10924263 13301819 2377557 1.1G b W95 FAT32
/dev/sda6 13301883 24226019 10924137 5.2G b W95 FAT32
/dev/sda7 24226083 35150219 10924137 5.2G b W95 FAT32
/dev/sda8 35150283 157935014 122784732 58.6G b W95 FAT32
/dev/sda9 157935616 534755327 376819712 179.7G 83 Linux

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition 7 does not start on physical sector boundary.
Partition 8 does not start on physical sector boundary.


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD1003FZEX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

[root@sysresccd ~]#

time dd if=/dev/sda of=/dev/sdb bs=1024k
real 113m27.824s
user 0m1.297s
sys 15m40.464s

I shut down System Recovery CD and disconnected the original damaged disk and attempted to boot the new disk copy. The result was being dripped into grub-rescue:
error:: no such partition .
Entering rescue mode...
grub rescue> ls
(hd0) hd0,msdos8) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (hd0,msdos1)
grub rescue> set
prefix=(hd0,msdos9)/boot/grub
root=hd0,msdos9
grub rescue>
I booted system Recovery CD and In the first terminal I ran fdisk -l /dev/sda:

[root@sysresccd ~]# fdisk -l -u /dev/sda
Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD1003FZEX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xcebb4c68

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 6522389 6522327 3.1G b W95 FAT32
/dev/sda2 10924261 1945188351 1934264091 922.3G f W95 Ext'd (LBA)
/dev/sda5 10924263 13301819 2377557 1.1G b W95 FAT32
/dev/sda6 13301883 24226019 10924137 5.2G b W95 FAT32
/dev/sda7 24226083 35150219 10924137 5.2G b W95 FAT32
/dev/sda8 35150283 157935014 122784732 58.6G b W95 FAT32
/dev/sda9 157935616 534755327 376819712 179.7G 83 Linux

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition 7 does not start on physical sector boundary.
Partition 8 does not start on physical sector boundary.
[root@sysresccd ~]#

I next ran Gparted and it presented the error:

Invalid partition table on /dev/sda -- wrong signature 42b.

Searching via Google on the error did not turn up any hits with "42b" but some suggested to use fdisk to correct the partition signature.

In a second terminal window I ran fdisk /dev/sda: and printed and executed
'w' to write the partition without making any other changes.
root@sysresccd ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.
Ignoring extra data in partition table 9.

Invalid flag 0x2b04 of EBR (for partition 9) will be corrected by w(rite).

Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD1003FZEX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xcebb4c68

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 6522389 6522327 3.1G b W95 FAT32
/dev/sda2 10924261 1945188351 1934264091 922.3G f W95 Ext'd (LBA)
/dev/sda5 10924263 13301819 2377557 1.1G b W95 FAT32
/dev/sda6 13301883 24226019 10924137 5.2G b W95 FAT32
/dev/sda7 24226083 35150219 10924137 5.2G b W95 FAT32
/dev/sda8 35150283 157935014 122784732 58.6G b W95 FAT32
/dev/sda9 157935616 534755327 376819712 179.7G 83 Linux

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition 7 does not start on physical sector boundary.
Partition 8 does not start on physical sector boundary.

Command (m for help): w

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
I ran Gparted again and it displayed two popup errors:
Can't have a logical partition outside of the extended partition /dev/sda
Can't have a partition outside the disk!
Google search on these errors suggested running parted to verify:
[root@sysresccd ~]# parted /dev/sda unit s print
Error: Can't have overlapping partitions.
Ignore/Cancel?
Ignore/Cancel? i
Error: Can't have a logical partition outside of the extended partition on
/dev/sda.
Ignore/Cancel? i
Error: Can't have a partition outside the disk!
Ignore/Cancel? i
Error: Can't have a logical partition outside of the extended partition on /dev/sda.
Ignore/Cancel? C
Model: ATA WDC WD1003FZEX-0 (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
[root@sysresccd ~]#
No luck still getting grub rescue.

Per suggestion I ran TestDisk from System Recovery CD
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63

FAT32 0 1 1 405 254 63 6522327
FAT32 406 72 51 554 41 63 2375680 [NO NAME]
FAT32 LBA 554 74 33 1234 104 22 10926080 [NO NAME]
FAT32 LBA 1234 136 55 1914 134 12 10924032 [NO NAME]
FAT32 LBA 1914 166 45 9557 150 1 122783744 [NO NAME]
Linux 9831 9 35 33286 249 51 376819712
Error: size boot_sector 1406356413 > partition 437948416
Invalid NTFS or EXFAT boot
0 D HPFS - NTFS 33287 92 22 60548 99 31 437948416
HPFS - NTFS 33287 92 22 60548 99 31 437948416

Stop

After the scan finished TestDisk displayed:
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
Partition Start End Size in sectors
* FAT32 0 1 1 405 254 63 6522327
P FAT32 406 72 51 554 41 63 2375680 [NO NAME]
P FAT32 LBA 554 74 33 1234 104 22 10926080 [NO NAME]
L FAT32 LBA 1234 136 55 1914 134 12 10924032 [NO NAME]
L FAT32 LBA 1914 166 45 9557 150 1 122783744 [NO NAME]
L Linux 9831 9 35 33286 249 51 376819712
>L HPFS - NTFS 33287 92 22 60548 99 31 437948416
L Linux 65772 219 48 78507 175 4 204584960
L Linux Swap 120829 147 23 121082 63 5 4059136
L Linux Swap 121329 143 31 121582 59 13 4059136


Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type,
Enter: to continue
224 GB / 208 GiB
I'm at a loss on how to proceed next: I know that there is no Linux partition after the NTFS partition in sda10 with the exception of a linux swap partition formerly sda11.

I believe that L Linux 65772 219 48 78507 175 4 204584960 is a Kali Linux VM VDSK contained in the original NTFS partitin .

So the question remains "how to find the true end of the NTFS partition in sda10?

smfabac
Posts: 4
Joined: 16 Feb 2019, 22:08

Re: Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

#4 Post by smfabac »

I have secured my NTFS partition files. TestDisk allowed me to copy the ntfs files from one copy of the original disk to a second copy of the original disk. My data and VM's are secure but I still would like to use the TestDisk tools to "resurrect" the original dd copy with all files in place.

What I did and what worked for me:

1) dd copy the original disk to two other 1TB disks

2) On one copy (Seagate) I used System Recovery ISO to run "'fdisk /dev/sda" and delete partition 2 which was the Extended partition containing all the logical partitions. That left me with only the original primary partition. I then selected "n" and "added" a new /dev/sda2 primary partition using the starting and ending sectors for the old /dev/sda9 partition. I performed grub-install from the System Recovery CD and was able to boot the Ubuntu /dev/sda2 partition.

Once I had Ubuntu up and running the July 21, 2017 restored system, I ran "apt-get
clean" and "apt-get update" and installed all the 14.04 updates that were available. I used "fdisk /dev/sda" and "n" to add /dev/sda3 primary partition using the starting and ending sectors for the old /dev/sda10 NTFS partition. (see the above post for the indication that the end sector for /dev/sda10 (now /dev/sda3) is incorrect (resulting NTFS partition too small: /dev/sda10 start: 534,761,472 end: 972,709,887).

Finding /dev/sda3 too small, I used Gparted to delete it and abandoned the data it contained to set up an Extended partition from its old starting sector to the end of the disk. In that Extended partition, I set up a 658G ntfs partition /dev/sda5 leaving 18G unallocated for a future Linux swap partition.

Code: Select all

root@smf-desktop:~# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xcebb4c68

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     6522389     3261163+   b  W95 FAT32
Partition 1 does not start on physical sector boundary.
/dev/sda2       157935616   534755327   188409856   83  Linux
/dev/sda3       534939648  1953523711   709292032    5  Extended
/dev/sda5       534943744  1915295743   690176000    7  HPFS/NTFS/exFAT


3) I connected the new WD 1TB drive with the raw dd copy of my original disk and executed "testdisk /dev/sdb" to recover the /dev/sda10 ntfs partition:

Code: Select all

TestDisk 6.14, Data Recovery Utility, July 2013 Christophe GRENIER <grenier@cgsecurity.org> http://www.cgsecurity.org  Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63 Current partition structure:    
     Partition                  Start        End    Size in sectors
    Previous
  2 E extended LBA           680   0 62 121082  95 37 1934264091
  5 L FAT32                  680   1  1   827 254 63    2377557 [NO NAME]
    X extended               828   0  1  1507 254 63   10924200
  6 L FAT32                  828   1  1  1507 254 63   10924137 [NO NAME]
    X extended              1508   0  1  2187 254 63   10924200
  7 L FAT32                 1508   1  1  2187 254 63   10924137 [NO NAME]
    X extended              2188   0  1  9830 254 63  122784795
  8 L FAT32                 2188   1  1  9830 254 63  122784732 [NO NAME]
    X extended              9831   8 35 33286 249 51  376819775

 test_logical:
>Partition sector doesn't have the endmark 0xAA55


*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
>[Quick Search]  [ Backup ]
                            Try to locate partition
 
Running Quick Search:
TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
Analyse cylinder 68930/121600   64%

 FAT32                    0   1  1   405 254 63    6522327
  FAT32                  406  72 51   554  41 63    2375680 [NO NAME]
  FAT32 LBA              554  74 33  1234 104 22   10926080 [NO NAME]
  FAT32 LBA             1234 136 55  1914 134 12   10924032 [NO NAME]
  FAT32 LBA             1914 166 45  9557 150  1  122783744 [NO NAME]
  Linux                 9831   9 35 33286 249 51  376819712
Error: size boot_sector 1406356413 > partition 437948416
Invalid NTFS or EXFAT boot
 0 D HPFS - NTFS          33287  92 22 60548  99 31  437948416
  HPFS - NTFS          33287  92 22 60548  99 31  437948416
  Linux                65772 219 48 78507 175  4  204584960
 L Linux Swap           120829 147 23 121082  63  5    4059136
 L Linux Swap           121329 143 31 121582  59 13    4059136


  Stop

When Quick Search finished:


TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
     Partition               Start        End    Size in sectors
 * FAT32                    0   1  1   405 254 63    6522327
 P FAT32                  406  72 51   554  41 63    2375680 [NO NAME]
 P FAT32 LBA              554  74 33  1234 104 22   10926080 [NO NAME]
 L FAT32 LBA             1234 136 55  1914 134 12   10924032 [NO NAME]
 L FAT32 LBA             1914 166 45  9557 150  1  122783744 [NO NAME]
 L Linux                 9831   9 35 33286 249 51  376819712
>L HPFS - NTFS          33287  92 22 60548  99 31  437948416
 L Linux                65772 219 48 78507 175  4  204584960
 L Linux Swap           120829 147 23 121082  63  5    4059136
 L Linux Swap           121329 143 31 121582  59 13    4059136


Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type,
     Enter: to continue
224 GB / 208 GiB

The "Linux" partitions listed above:

>L Linux                 9831   9 35 33286 249 51  376819712
ext4 blocksize=4096 Large file Sparse superblock, 192 GB / 179 GiB

>L Linux                65772 219 48 78507 175  4  204584960
ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 104 GB / 97

>L Linux Swap           120829 147 23 121082  63  5    4059136
SWAP2 version 1, pagesize=4096, 2078 MB / 1982 MiB

>L Linux Swap           121329 143 31 121582  59 13    4059136
SWAP2 version 1, pagesize=4096, 2078 MB / 1982 MiB

Highlighted NTFS and pressed P to see:

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
   L HPFS - NTFS          33287  92 22 60548  99 31  437948416
Directory /

>dr-xr-xr-x    0     0         0  8-Feb-2019 16:04 .
 dr-xr-xr-x     0     0         0  8-Feb-2019 16:04 ..
 dr-xr-xr-x     0     0         0 24-Jun-2017 23:33 GNSVM
 dr-xr-xr-x     0     0         0 27-Sep-2016 23:36 Kali Linux 1.0.6 32 bit
 dr-xr-xr-x     0     0         0  6-Dec-2017 12:18 Linux Lite
 dr-xr-xr-x     0     0         0 30-Jul-2017 08:45 RECYCLER
 dr-xr-xr-x     0     0         0 30-Jul-2017 02:21 System Volume Information
 dr-xr-xr-x     0     0         0  5-Jan-2018 18:02 Test VMS
 dr-xr-xr-x     0     0         0 28-Apr-2017 17:30 TestISOS
 dr-xr-xr-x     0     0         0  8-Feb-2019 16:05 cpio
 dr-xr-xr-x     0     0         0  9-Jun-2014 16:05 downloads
 dr-xr-xr-x     0     0         0 23-Jul-2017 02:04 vmware
 dr-xr-xr-x     0     0         0 11-Mar-2017 15:18 win7
 dr-xr-xr-x     0     0         0 29-Nov-2013 15:20 win98
                                                   Next
Use Right to change directory, h to hide Alternate Data Stream
    q to quit, : to select the current file, a to select all files
    C to copy the selected files, c to copy the current file

Mounted the new /dev/sda5 650G NTFS on /ntfs

Then in TestDisk:

Press a to select all files and ":" when System Volume is selected to
deselect it then Capital C  to copy the directories and files to see if that
works :

Start: Tue Feb 19 17:43:01 CST 2019

TestDisk 6.14, Data Recovery Utility, July 2013

Please select a destination where the marked files will be copied.
Keys: Arrow keys to select another directory
      C when the destination is correct
      Q to quit
Directory /ntfs
>drwxrwxrwx     0     0      4096 19-Feb-2019 07:05 .
 drwxr-xr-x     0     0      4096 19-Feb-2019 00:55 ..
 drwxrwxrwx     0     0           0 19-Feb-2019 07:05 $RECYCLE.BIN
 drwxrwxrwx     0     0           0 19-Feb-2019 07:17 System Volume Information


Copying, please wait... 0 ok, 0 failed       Tue Feb 19 17:45:38 CST 2019

Copying, please wait... 682 ok, 0 failed    Tue Feb 19 17:53:49 CST 2019 about 40G copied

Copying, please wait... 1261 ok, 0 failed   Tue Feb 19 18:05:43 CST 2019 about 95G copied

Copying, please wait... 1368 ok, 0 failed   Tue Feb 19 18:18:26 CST 2019 about 150G copied

Copying, please wait... 1376 ok, 0 failed    Tue Feb 19 18:25:05 CST 2019 about 180G copied

Copying, please wait... 1384 ok, 0 failed    Tue Feb 19 18:33:02 CST 2019 about 215G copied


Copy done! 1414 ok, 0 failed               Tue Feb 19 18:47:30 CST 2019 Date is approximate,
 the job finished while I was not watching it.  About 270G copied.

The /ntfs/cpio folder contained keep.cpio That is the last file created on the NTFS partition before restoration of the /dev/sda9 July 21 2017 backup was restored and the MBR and who knows what were re-written causing the original problem.

I changed to the /tmp directory and ran cpio -icvmd -I /ntfs/cpio/keep.cpio to restore the relocatable (no leading /) directories and files. There were no error messages and all the files were accurate.

Code: Select all

home/smf/.gconf/apps
home/smf/.gconf
home/smf/.ICEauthority
home/smf/.xsession-errors.old
home/smf/KaitlynandKyle.iso
home/smf/.avidemux/custom
home/smf/.avidemux/config
home/smf/.avidemux
home/smf
24813392 blocks
root@smf-desktop:/tmp#

All pdf's, mp4's, xls, and text files opened ok.
With the restored VM's in the 650G NTFS partition I have run VMWare Workstation and opened the critical Windows 7 and Windows 98 VM's and they are running without error. This is on the Seagate disk where I abandoned the /dev/sdb1 through /dev/sdb8 partitions.

Code: Select all

Device     Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     6522389     3261163+   b  W95 FAT32   Partition 1 does not start on physical sector boundary.
/dev/sdb2        10924261  1945188351   967132045+   f  W95 Ext'd (LBA)  Partition 2 does not start on physical sector boundary.
/dev/sdb5        10924263    13301819     1188778+   b  W95 FAT32  Partition 5 does not start on physical sector boundary.
/dev/sdb6        13301883    24226019     5462068+   b  W95 FAT32  Partition 6 does not start on physical sector boundary.
/dev/sdb7        24226083    35150219     5462068+   b  W95 FAT32  Partition 7 does not start on physical sector boundary.
/dev/sdb8        35150283   157935014    61392366    b  W95 FAT32 Partition 8 does not start on physical sector boundary.
/dev/sdb9       157935616   534755327   188409856   83  Linux

What "simple" procedure can I use in TestDisk to recover the /dev/sdb partitions on the raw dd copied WD 1TB disk and restore the disk with /dev/sdb1 through /dev/sdb10 partitions working. Obviously I need to set the ntfs partition end sector to account for the 251GB restored by the above copy plus 100G for future VM's. Question is: What ending sector need I set?

smfabac
Posts: 4
Joined: 16 Feb 2019, 22:08

Re: Problem with NTFS filesystem in DOS extended partition Ubuntu 14.04 host

#5 Post by smfabac »

smfabac wrote: 19 Feb 2019, 04:25
cgrenier wrote: 18 Feb 2019, 11:36 You have listed sda10 location yourself:
/dev/sda10 534,761,472 972,709,887 437,948,416 7 NTFS / exFAT / HPFS
TestDisk can also find the same partition using Analyse, QUick Search and if necessary Deeper Search...

In the worst case, you can always run PhotoRec and select /dev/sda10 to recover its data.
Much deleted

What "simple" procedure can I use in TestDisk to recover the /dev/sdb partitions on the raw dd copied WD 1TB disk and restore the disk with /dev/sdb1 through /dev/sdb10 partitions working. Obviously I need to set the ntfs partition end sector to account for the 251GB restored by the above copy plus 100G for future VM's.
This post answerers the above question: parted was the magic bullet. TestDisk is more tool then I needed to perform the recovery. But there was no way to know that without the experience I gained going through the learning steps in my previous posts. Testdisk did give me a comfort zone when it was able to copy the ntfs partition directory tree and files at a time I was very concerned about loosing them.

The parted "rescue" command was 100% effective on a new working copy of my affected hard disk. The log on the first partition identified the disk partitions as they existed at the time on July 23, 2017

Code: Select all

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id  System

/dev/sda1    *             63     6,522,389     6,522,327    b  W95 FAT32
/dev/sda2          10,924,261   976,771,071   965,846,811    f  W95 Extended (LBA)
/dev/sda5          10,924,263    13,301,819     2,377,557    b  W95 FAT32
/dev/sda6          13,301,883    24,226,019    10,924,137    b  W95 FAT32
/dev/sda7          24,226,083    35,150,219    10,924,137    b  W95 FAT32
/dev/sda8          35,150,283   157,935,014   122,784,732    b  W95 FAT32
/dev/sda9         157,935,616   534,755,327   376,819,712   83  Linux
/dev/sda10        534,761,472   972,709,887   437,948,416    7  NTFS / exFAT / HPFS
/dev/sda11        972,711,936   976,771,071     4,059,136   82  Linux swap / Solaris

It turns out that that partition was set up on a 500G disk used prior to moving to the current 1TB disk. I likely expanded the ntfs partition to host more VMWare virtual machines after moving to the 1TB disk so the end sector and # of sectors above reflect the size before expanding the ntfs partiton.

All steps below were performed booting the System Rescue CD to get a fresh copy of the source disk:
time shred -v -n0 -z /dev/sdb to zero out the working copy 1TB disk and then recopy using dd: time dd if=/dev/sda of=/dev/sdb bs=10240k.

I did not need to run testdisk again the list below is just a quote of the results I obtained with testdisk when it was run on the working copy

Code: Select all


TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
     Partition               Start         End      Size in sectors
 * FAT32                    0   1  1    405 254 63    6522327
 P FAT32                  406  72 51    554  41 63    2375680 [NO NAME]
 P FAT32 LBA              554  74 33   1234 104 22   10926080 [NO NAME]
 L FAT32 LBA             1234 136 55   1914 134 12   10924032 [NO NAME]
 L FAT32 LBA             1914 166 45   9557 150  1  122783744 [NO NAME]
 L Linux                 9831   9 35  33286 249 51  376819712
>L HPFS - NTFS          33287  92 22  60548  99 31  437948416
 L Linux                65772 219 48  78507 175  4  204584960
 L Linux Swap          120829 147 23 121082  63  5    4059136
 L Linux Swap          121329 143 31 121582  59 13    4059136

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type,
     Enter: to continue
224 GB / 208 GiB
The results of running parted on the newly copied working disk (after powering down and disconnecting the source disk for safety)

Code: Select all


[root@sysresccd ~]# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) print
Error: Invalid partition table on /dev/sda -- wrong signature 42b.
Ignore/Cancel? i
Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start      End          Size         Type      File system  Flags
 1      63s        6522389s     6522327s     primary   fat32        boot
 2      10924261s  1945188351s  1934264091s  extended               lba
 5      10924263s  13301819s    2377557s     logical   fat32
 6      13301883s  24226019s    10924137s    logical   fat32
 7      24226083s  35150219s    10924137s    logical   fat32
 8      35150283s  157935014s   122784732s   logical   fat32

(parted)

Used the end of partition 8 for START  and  the last sector on the on the disk for END.:

(parted) rescue
Error: Invalid partition table on /dev/sda -- wrong signature 42b.
Ignore/Cancel? i
Start? 157935014
End? 1953525168
searching for file systems... 50%       (time left 00:00)
Information: A ext4 logical partition was found at 157935616s -> 534755327s.
Do you want to add it to the partition table?
Yes/No/Cancel?Y

(parted) print
Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start       End          Size         Type      File system  Flags
 1      63s         6522389s     6522327s     primary   fat32        boot
 2      10924261s   1945188351s  1934264091s  extended               lba
 5      10924263s   13301819s    2377557s     logical   fat32
 6      13301883s   24226019s    10924137s    logical   fat32
 7      24226083s   35150219s    10924137s    logical   fat32
 8      35150283s   157935014s   122784732s   logical   fat32
 9      157935616s  534755327s   376819712s   logical   ext4

(parted)

Do the search from the  end of the found Linux partition to the end of the disk:

(parted) rescue
Start? 534755327
End? 1953525168
searching for file systems... 58%       (time left 00:02)
Information: A ntfs logical partition was found at 534761472s -> 1941117883s.
Do you want to add it to the partition table?
Yes/No/Cancel? Y

(parted) print
Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start       End          Size         Type      File system  Flags
 1      63s         6522389s     6522327s     primary   fat32        boot
 2      10924261s   1945188351s  1934264091s  extended               lba
 5      10924263s   13301819s    2377557s     logical   fat32
 6      13301883s   24226019s    10924137s    logical   fat32
 7      24226083s   35150219s    10924137s    logical   fat32
 8      35150283s   157935014s   122784732s   logical   fat32
 9      157935616s  534755327s   376819712s   logical   ext4
10      534761472s  1941117883s  1406356412s  logical   ntfs

Look to see if there is a Linux Swap partition after the NTFS as reported by TestDisk:

(parted) rescue
Start? 1941117883
End? 1953525168
(parted)

(parted) print
Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start       End          Size         Type      File system  Flags
 1      63s         6522389s     6522327s     primary   fat32        boot
 2      10924261s   1945188351s  1934264091s  extended               lba
 5      10924263s   13301819s    2377557s     logical   fat32
 6      13301883s   24226019s    10924137s    logical   fat32
 7      24226083s   35150219s    10924137s    logical   fat32
 8      35150283s   157935014s   122784732s   logical   fat32
 9      157935616s  534755327s   376819712s   logical   ext4
10      534761472s  1941117883s  1406356412s  logical   ntfs

(parted)

So a Linux swap partitins was not found past the end of the ntfs partition.

(parted) quit
Information: You may need to update /etc/fstab.

[root@sysresccd ~]# fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xcebb4c68

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1  *           63    6522389    6522327   3.1G  b W95 FAT32
/dev/sda2        10924261 1945188351 1934264091 922.3G  f W95 Ext'd (LBA)
/dev/sda5        10924263   13301819    2377557   1.1G  b W95 FAT32
/dev/sda6        13301883   24226019   10924137   5.2G  b W95 FAT32
/dev/sda7        24226083   35150219   10924137   5.2G  b W95 FAT32
/dev/sda8        35150283  157935014  122784732  58.6G  b W95 FAT32
/dev/sda9       157935616  534755327  376819712 179.7G 83 Linux
/dev/sda10      534761472 1941117883 1406356412 670.6G  7 HPFS/NTFS/exFAT

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition 7 does not start on physical sector boundary.
Partition 8 does not start on physical sector boundary.

Shutdown System Rescue CD and reboot.

I shut the system down and connected the 1TB working disk that I had set the ubuntu 14.04 root partition as primary /dev/sda2 and the TestDisk recovered data in the /dev/sda3 ntfs partition. I mounted the extf partitions /dev/sdb9 and /dev/sdb10 with only one message about "fixing" /dev/sdb10. I performed sum -r on keep.cpio in both disks and they are identical:

Code: Select all

root@smf-desktop:~#
root@smf-desktop:~# mount /dev/sdb10 /mnt
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
root@smf-desktop:~# ls -lt /mnt
total 16
drwxrwxrwx 1 root root    0 Feb  8 16:05 cpio
drwxrwxrwx 1 root root 4096 Jan  5  2018 Test VMS
drwxrwxrwx 1 root root    0 Dec  6  2017 Linux Lite
drwxrwxrwx 1 root root    0 Jul 30  2017 RECYCLER
drwxrwxrwx 1 root root 4096 Jul 30  2017 System Volume Information
drwxrwxrwx 1 root root    0 Jul 23  2017 vmware
drwxrwxrwx 1 root root 4096 Jun 24  2017 GNSVM
drwxrwxrwx 1 root root    0 Apr 28  2017 TestISOS
drwxrwxrwx 1 root root    0 Mar 11  2017 win7
drwxrwxrwx 1 root root 4096 Sep 27  2016 Kali Linux 1.0.6 32 bit
drwxrwxrwx 1 root root    0 Jun  9  2014 downloads
drwxrwxrwx 1 root root    0 Nov 29  2013 win98
root@smf-desktop:~# umount /dev/sdb10

mount /dev/sdb9 /mnt
ls -lt /mnt | less
total 4196012
drwxr-xr-x 164 root root      12288 Jul 21  2017 etc
-rw-r-----   1 root root    1606266 Jul 21  2017 stunnel.log
drwxrwxrwt   7 root root       4096 Jul 21  2017 tmp
drwxr-xr-x  24 root root       4096 Jul  7  2017 lib
drwxr-xr-x   3 root root      12288 Jul  7  2017 boot

root@smf-desktop:~# umount /dev/sdb9
root@smf-desktop:~# mount /dev/sdb10 /mnt
root@smf-desktop:~# sum -r /mnt/cpio/keep.cpio
59372 12406696
root@smf-desktop:~# sum -r /ntfs/cpio/keep.cpio
59372 12406696
The /ntfs/cpio/keep.cpio (/ntfs presently mounting the /dev/sda3 recovered ntfs partition) was the last file written to the ntfs partition before I shut the system down and used the Win8.PE CD to restore the 7/21/2017 /dev/sda9 backup.

I booted the recovered working disk with no further grub errors. Ubuntu 14.04 came up and happily mounted /dev/sda10 on /ntfs as required.

Locked