RAID5 TrueCrypted Parition

joeshook

Cadet 1st Year
Registriert
Juni 2012
Beiträge
10
I have a RAID 5 made up of (5) 1TB drives. I got a Blue Screen after doing a windows update and all the drives showed as failed. There must have been an error with the controller, there is no way all 5 drives failed simultanoeously. I changed the drives as "non-member" disks and recreated the array the same way it was before. I then ran testdisk to recreate the partitions. This worked fine, no data loss.

However, since then I have Trucrypted the entire Partition. The same issue happened to me again with all the drives showing failed. I figured I could just do the same procedure. I was worng. Testdisk does find a system parition but not the Trucrypted partition.
Testcrypt (automatic settings) does not find any Truecrypt volumes. I find it strange that Testcrypt only runs for about 20 minutes on such a large drive.

I am currently running GetDataBack to see what it tells me. Any ideas/help would be GREATLY appreciated.
 
Just as a reminder, this is a German forum.

Which RAID Controller do u use or is it a software RAID?
 
Did you use pre-boot authentication with an encrypted operating system and a password entered before starting Windows? A screenshot of the system partition found in TestDisk could help to find the parameters needed for TestCrypt.
 
Biggunkief: I do not know German. I will use a translator if you like, but it does not usually work very well.

Simpson474, thank you for getting back to me so quickly. I am using an ASRock motheroard with an Intel Z68 chipset and RAID on motherboard (Intel RST). Yes, I was using pre-boot authentication on the system drive (not RAID) and I would automount the RAID array. Here is the testdisk config:

TestDisk 6.14-WIP, Data Recovery Utility, May 2012
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486404 255 63
Current partition structure:
Partition Start End Size in sectors

1 P MS Data 2048 206847 204800 [System Reserved]
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
2 P MS Data 468992 7813566463 7813097472
2 P MS Data 468992 7813566463 7813097472
3 P MS Data 7813566464 7814078463 512000


P=Primary D=Deleted
>[Quick Search] [ Backup ]
Try to locate partition


Again thank you for your help on this topic.
 
In this case only the non-RAID disk is encrypted with the special TrueCrypt header for pre-boot authentication. The TrueCrypt volume on the RAID should start after the 100 MB partition although I do not understand why the 100 MB partition is on the RAID and not on the system disk. Try to enter the following range in the custom analyzer of TestCrypt:
206800 - 226800
 
The 100MB Partition is from a previous install where the RAID disk was a system Drive at the time (not encrypted). So it went like this:

- RAID Array was System drive (GPT), non-encrypted
- I added a new system drive and made a new partition on the RAID array for Data (non encrypted). I guess the 100MB GPT parition remained
- I Encrypted the new System Drive (pre boot Authentication)
- Then I Encrypted the RAID Array Data partition and set it up to Automount

I am running Tescrypt with the Range you gave me. It says it will take 5 hours to run. I will let you know what happens. Let me know if you have any further ideas or questions.

Thank You!!!
Ergänzung ()

I enetered the options you advised. After running for 5 hours I got the message "No Trucrypt headers could be found".

Any ideas?
Ergänzung ()

I enetered the options you advised. After running for 5 hours I got the message "No Trucrypt headers could be found".
Ergänzung ()

These are the settings I used. After running for 5 hours I got "No Truecrypt Headers could be found"


Volume 1
================================================================================
Type: FixedMedia
Size: 4000809222144 Bytes
Bytes per Sector: 512
Geometry: 486404/255/63

Begin of Partition Analyzer
================================================================================

End of Partition Analyzer
================================================================================

Begin of Volume Analyzer
================================================================================
206800 Sectors

End of Volume Analyzer
================================================================================
226800 Sectors

Custom Analyzer
================================================================================

Scan Ranges (optimized)
================================================================================
0/0/1 (0 LBA) - 12/222/34 (206799 LBA)
486389/229/1 (7813853712 LBA) - 486404/3/63 (7814080511 LBA)
Ergänzung ()

I just realized I ran the Analyse volume instead of the custom. This is what I ran, it still did not find any TruCrypt volumes:

Volume 1
================================================================================
Type: FixedMedia
Size: 4000809222144 Bytes
Bytes per Sector: 512
Geometry: 486404/255/63

Begin of Partition Analyzer
================================================================================

End of Partition Analyzer
================================================================================

Begin of Volume Analyzer
================================================================================
None

End of Volume Analyzer
================================================================================
None

Custom Analyzer
================================================================================
12/222/35 (206800 LBA) - 14/30/1 (226800 LBA)

Scan Ranges (optimized)
================================================================================
12/222/35 (206800 LBA) - 14/30/1 (226800 LBA)
 

Anhänge

  • Capture.JPG
    Capture.JPG
    52 KB · Aufrufe: 182
I ran test disk again and chose "Intel" as the partition type instead of GPT. It gave me a different structure, which makes sense. Now I remember I had 2 system partitions on the drive. One was a GPT left over from when it was a system drive. The second was when I created the partition for TrueCrypt and formatted it NTFS. I do not know how to convert these values to put into testcrypt.

TestDisk 6.14-WIP, Data Recovery Utility, May 2012
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486404 255 63
Partition Start End Size in sectors
>* HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved]
P FAT12 57692 38 42 118434 53 38 975821172
P FAT16 >32M 288085 43 31 438934 190 47 2423398463
L HPFS - NTFS 486372 4 33 486403 226 31 512000


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, P: list files,
Enter: to continue
NTFS, blocksize=4096, 104 MB / 100 MiB
 
The Intel and GPT results are very similar and your last scan should already have been the correct one. Do you use an US-keyboard or another keyboard layout? If you used the favorite volume feature of TrueCrypt to automount a volume, the password has to be entered using the US-keyboard layout. You could also try to extend the scan range to the following range which should again take at least some hours and scans about 250 MB after the system partition:
206800 - 706800
 
Welcome and good evening/morning, joeshook!

Maybe I'm able to assist in recovery at physical layer. Let's try another tack: (lasts only a few minutes)

When re-creating the RAID array, the first sector of the RAID volume containing the protective MBR gets cleaned.
So we have to rebuild this one. Before doing so, let's check the RAID volume geometry.
The following GPT information at sectors 1-32 should be unchanged unless you boots up the Windows system when the RAID member are presented as single drives by the controller to OS - then Windows "adapts" the GPT Header at sector 1 from the size of the RAID volume to the size of a single member. In case of the resulting parity of disk 1 to 4 data results in a valid MBR same wrong things happens to the parity strip at member 5 disk.
Thus maybe the GPT header also needs adjustment.

Sometimes the connection order gets changed(this doesn't care as long as the RAID status is "normal" or "degraded" but essential at time of creation), so the volumes now can be in incorrect order, or the newly defined strip size does not match the previous one.
This may cause a disarrangement of the RAID volume data sector sequence, potentially resulting in a "not-found" condition of the truecryp header.
Fortunately the MSR partition was created and formatted non-encrypted, and this will help us to determine correct member disk order and correct strip size.

To figure out your problem
- install HxD from > this download link <. Don't play around with the option settings to preserve the defaults.

- Start HxD under userid with admin rights or rightclick/run as administrator.
- Menu: Extras/Open disk/ Physical disks/Hard Disk x - where x means Disk# plus one shown at "Disk Management" panel for the RAID volume. Don't remove the checkbox sign for "Open as Readonly"!
- please tell the displayed maxLBA (menu line, right side of the "Sector:" input field, showing "of ..."

==== now we'll extract content of RAID volume sector 0-3
- Menu: Edit/Select Block/start offset: 0 ,end offset: 7FF ,OK
- Ctrl+C (puts the marked content to the clipboard)
- Menu: File / New (a tab "Untitled1" appears)
- Ctrl+V (puts the clipboard to file) Popup "filesize change" OK
- Menu: File /save as... / select a folder and name the file "MBRGPT.bin" /OK
- Menu: File / Close (Tab MBRGPT.bin disappears)

==== extract NTFS Header of MSR partition
- Menu: Edit/Select Block/start offset: 100000 ,end offset: 1001FF ,OK (to avoid mistyping use ctrl+c/ctrl+v to transfer values)
- Ctrl+C (puts the marked content to the clipboard)
- Menu: File / New (a tab "Untitled1" appears)
- Ctrl+V (puts the clipboard to file) Popup "filesize change" OK
- Menu: File /save as... / select a folder and name the file "MSRHdr.bin" /OK
- Menu: File / exit (terminates HxD)

Compress these two .bin files into a .zip and append it to your answer.
 
Thank you for keeping up with me on this issue Simpson and Ernst@at. Simpson: I am using a US Keyboard and the option is checked in TestCrypt. And I know the password is correct and even select to view it to make sure.

Ernst@at: I think you are on to something here. I did as you asked (files attached). Also, after rebuilding the array disk 5 keeps showing as errored so the RAID is currently degraded. At this point, I don't know if there is really a problem with the drive as the controller is really giving me problems. So I have not focused on the RAID Array and just figured I would try to get the data off and then deal with the drives, etc.

Please take a look and let me know what you find. I really appreciate your help!!!


I also forgot you asked about the sectors: It is Sector 0 of 7814080512
 

Anhänge

7814080512 *512= 4.000.809.222.144 bytes is the size of the newly created RAID5 volume. So the mirror of the GPT Header should be located at the last sector 7814080511.
Mirror of PE entries(32 sectors) should start at sector 7814080479.

A closer look at the sent excerpts shows
Code:
[FONT="Lucida Console"][SIZE="3"]Analyzing: \\Pc10\shareddocs\joeshook RAID5\MBRGPT.txt

===== MBR INFORMATION ===== at LBA=0
000001FE 0000                Boot signature='0000'... INVALID !!!
.                            ... Partition Table entry 1 ...
000001C2 00                  Partition Type: unused partition entry
.                            ... Partition Table entry 2 ...
000001D2 00                  Partition Type: unused partition entry
.                            ... Partition Table entry 3 ...
000001E2 00                  Partition Type: unused partition entry
.                            ... Partition Table entry 4 ...
000001F2 00                  Partition Type: unused partition entry

===== GPT INFORMATION =====   (at LBA= 1) 512
. Header info
00000200 4546492050415254    Signature: 'EFI PART'
00000208 00000100            Version: 1.0
0000020C 5C000000            Hdrlength: 92
00000210 E01AB754            Header CRC32: crc verification not yet coded
00000214 00000000            (reserved)
00000218 0100000000000000    current LBA: 1
00000220 FF67C1D101000000    backup  LBA: 7814080511
00000228 2200000000000000    firstuse LBA: 34
00000230 DE67C1D101000000    lastuse  LBA: 7814080478
00000238 C798DDF20AE14FBC    . Disk
00000240 9B1C3D91FF919E00    .. GUID: F2DD98C7-E10A-BC4F-9B1C-3D91FF919E00
00000248 0200000000000000    PE start LBA: 2
00000250 80000000            Number of PEs: 128
00000254 80000000            Size of PE: 128
00000258 1A0272D3            PE CRC32: crc verification not yet coded
0000025C 00..                start of reserved area ..
000003FF     ..00            .. end of reserved area

===== PE INFORMATION =====   (start LBA= 2) 512
. Partition entry 1
00000400 A2A0D0EBE5B93344    . partition type
00000408 87C068B6B72699C7    .. GUID: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
00000410 F62DC6CA430D4D79    . unique partition
00000418 968E2CD1CAFF68E9    .. GUID: CAC62DF6-0D43-794D-968E-2CD1CAFF68E9
00000420 0008000000000000    Part first LBA: 2048
00000428 FF27030000000000    Part last  LBA: 206847    0.10GiB
00000430 0000000000000080    Attribute flags:
00000438 0000000000000000    . Partition Name:
00000440 0000000000000000    ..
00000448 0000000000000000    ...
00000450 0000000000000000    ....
00000458 0000000000000000    .....
00000460 0000000000000000    ......
00000468 0000000000000000    .......
00000470 0000000000000000    ........
00000478 0000000000000000    .........'....................................'
. Partition entry 2
00000480 A2A0D0EBE5B93344    . partition type
00000488 87C068B6B72699C7    .. GUID: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
00000490 B40DFB0F769F4441    . unique partition
00000498 B76CE8CA86B3E31F    .. GUID: 0FFB0DB4-9F76-4144-B76C-E8CA86B3E31F
000004A0 0028070000000000    Part first LBA: 468992
000004A8 FF8FB9D101000000    Part last  LBA: 7813566463 3725.58GiB
000004B0 0000000000000000    Attribute flags:
000004B8 0000000000000000    . Partition Name:
000004C0 0000000000000000    ..
000004C8 0000000000000000    ...
000004D0 0000000000000000    ....
000004D8 0000000000000000    .....
000004E0 0000000000000000    ......
000004E8 0000000000000000    .......
000004F0 0000000000000000    ........
000004F8 0000000000000000    .........'....................................'
. Partition entry 3
00000500 A2A0D0EBE5B93344    . partition type
00000508 87C068B6B72699C7    .. GUID: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
00000510 5A96CF94A57F4C07    . unique partition
00000518 B271FA02F1B92CF0    .. GUID: 94CF965A-7FA5-074C-B271-FA02F1B92CF0
00000520 0090B9D101000000    Part first LBA: 7813566464
00000528 FF5FC1D101000000    Part last  LBA: 7814078463    0.24GiB
00000530 0000000000000080    Attribute flags:
00000538 0000000000000000    . Partition Name:
00000540 0000000000000000    ..
00000548 0000000000000000    ...
00000550 0000000000000000    ....
00000558 0000000000000000    .....
00000560 0000000000000000    ......
00000568 0000000000000000    .......
00000570 0000000000000000    ........
00000578 0000000000000000    .........'....................................'
. Partition entry 4-128  *** unused ***
[/SIZE][/FONT]
Code:
[FONT="Lucida Console"][SIZE="3"]Analyzing: \\Pc10\shareddocs\joeshook RAID5\MSRHDR.txt

===== NTFS INFORMATION ===== at LBA=2048
001001FE 55AA                Boot signature='55AA'... valid
00100000 EB5290              jump around... OK
00100003 4E54465320202020    NTFS ID... OK
0010000B 0002                Bytes per sector: 512
0010000D 08                  Sectors per cluster: 8 ==> Clustersize=4K
0010000E 0000                reserved sectors: 0
00100010 000000              always zero...OK
00100013 0000                not used...OK
00100015 F8                  <Media descriptor>
00100016 0000                always zero...OK
00100018 3F00                Sectors per track: 63
0010001A FF00                # heads: 255
0010001C 00080000            # hidden sectors: 2048
00100020 00000000            <not used by NTFS>
00100024 80008000            <not used by NTFS>
00100028 FF1F030000000000    Total Sectors: 204799
.                            ==> Size:    100MB 0.10GB
.                            ==> NTFS Mirror at sector: 206847 ==> Sector placement: OK
00100030 5521000000000000    Cluster# of $MFT: 8533
.                            ==> $MFT at sector: 70312
00100038 0200000000000000    Cluster# of $MFTmirr: 2
.                            ==> $MFTmirr at sector: 2064
00100040 F6000000            Clusters/File Record Segment: 246
00100044 01000000            Clusters/Index Block: 1
00100048 43A09112DA9112B6    Volume Serial #
00100050 00000000            checksum
[/SIZE][/FONT]

The layout of this metadata seems to be valid, but with odd contents.
GPT Partitioning done by Windows tools shows other content of the GUID for the first 100MB MSR partition, yours is flagged as simple data partition.
The usual partition naming of "Microsoft Reserved Partition" for the first and "Basic Data Partition" for all other entries in omitted.
Between first and second partition entry we can find an unused gap of 128MiB, result of an earlier defined and lateron removed UEFI boot partition. So you searched at the wrong place for the truecrypt header, this starts at sector 468992.

NTFS Header of the first 100MB partition is intact and NTFS formatted, so we can check the correct member order and stripe size by inspecting the $MFT.

After
- inspecting the untouched old GPT Mirror(because protective MBR was removed at re-creation and therefore no GPT mount took place) at the end of the RAID volume
- verifying correct member order/stripe size
we can bring back full access to the RAID volume with a simple operation.

- Start HxD under userid with admin rights or rightclick/run as administrator.
- Menu: Extras/Open disk/ Physical disks/Hard Disk x - where x means Disk# plus one shown at "Disk Management" panel for the RAID volume. Don't remove the checkbox sign for "Open as Readonly"!

==== extract GPT/PE Mirror
- Menu: Edit/Select Block/start offset: 3A382CFBE00 ,end offset: 3A382CFFFFF , hex, OK (to avoid mistyping use ctrl+c/ctrl+v)
- Ctrl+C (puts the marked content to the clipboard)
- Menu: File / New (a tab "Untitled1" appears)
- Ctrl+V (puts the clipboard to file) Popup "filesize change" OK
- Menu: File /save as... / select a folder and name the file "GPTMIRR.bin" /OK
- Menu: File / Close (Tab GPTMIRR.bin disappears)

==== extract NTFS Header of MSR partition
- Menu: Edit/Select Block/start offset: 2255000 ,end offset: 2394FFF , hex, OK (to avoid mistyping use ctrl+c/ctrl+v)
- Ctrl+C (puts the marked content to the clipboard)
- Menu: File / New (a tab "Untitled2" appears)
- Ctrl+V (puts the clipboard to file) Popup "filesize change" OK
- Menu: File /save as... / select a folder and name the file "MSRMFT.bin" /OK
- Menu: File / exit (terminates HxD)

Compress these two .bin files into a .zip and append it to your answer.

If your RAID controller is supported, > HD Sentinel < can show the health status of each member disk. Install it and produce a report (Menu: Report/create HTML report) and append it to the answer.

What type of RAID controller is used? Intel or AMD onboard or a slot card?
 
Zuletzt bearbeitet:
Thank you for your analysis, it is EXTREMELY helpful.

The RAID controller is built into an ASRock Extreme 3 Gen 3 motherboard with an Intel Z68 chipset. I attached the files. Currently, the 5th drive is not even seen though it is plugged in and powered on. I do not want to reboot the machine/troubleshoot that if I don't have to right now as I don't know if this controller will fail the array again. At this point, it is very unstable so I am trying to leave it alone as much as possible.

Let me know what you find. Thank you so much for your help!!
 

Anhänge

Ok, here are the results:

- Stripsize is guaranteed same as before.
- if actual stripsize=64K or below then the volumes A,B,C,D,E are in correct order (even if one is offline)
- if actual stripsize=128K then only correct order for volumes A,D,E can be guaranteed, B and C couldn't be verified.

So, if your actual stripsize is 64K or below, we can go to the final step and reawaken the RAID.
 
It is 64K, I was very careful when creating/recreating to make sure to use the same size. What are the next steps?
 
Its simple - we have only to put a protective MBR on sector 0 of the RAID volume.
Please be patient, I need appx 30min to write the instructions

download and unzip the appended file MBRnew.bin

- Start HxD under userid with admin rights or rightclick/run as administrator.
- Menu: Extras/Open disk/ Physical disks/Hard Disk x - where x means Disk# plus one shown at "Disk Management" panel for the RAID volume. This time remove the checkbox sign for "Open as Readonly"!

The content of sector 0 must be completely filled with 00 - otherwise you are on a wrong disk - CANCEL this task.

==== restore MBR
- Menu: File/Open... and select the MBRnew.bin File
- Stg+A (marks all)
- Ctrl+C (puts the marked content to the clipboard)
- Menu: File / Close (Tab MBRnew.bin disappears)
- Menu: Edit/Select Block/start offset: 0 ,end offset: 1FF , hex, OK
- Ctrl+V (puts the clipboard to file) if popup "filesize change" appears - CANCEL
- Menu: File /Save (writes the change to the RAID volume)
- Menu: File / Exit (terminates HxD)

Then, in Disk Management, select Menu: Action/rescan disks.
The partitions of the RAID volume will be shown.
(sometimes a restart is necessary, if this doesn't work)

Now the partition should be mountable by Truecrypt...
 

Anhänge

Zuletzt bearbeitet:
Simpson/Ernst@at,

It worked!! Actually, both tools/methods work. Now that I know the correct sector, TestCrypt was able to find/load the volume. In addition, rebuilding the MBR brought the paritions back and I was able to load it in TruCrypt properly as well. You were correct about the deleted UFI partition.

Great work gentlemen! Thank you so much for your help. It was invaluable for me to finally get this resolved!!

Now I have to figure out how to deal with this RAID. I have no faith in the controller anymore and not sure about Drive 5. But with your help I have 0 data loss. Very impressive!! Thank you again!!
 

Anhänge

  • Capture3.JPG
    Capture3.JPG
    176,1 KB · Aufrufe: 139
The remaining 4 listed member drives in the HD Sentinel report are in excellent condition.
So, to bring the RAID back to full functionality, you only have to follow these instructions of the "Intel RST Guide" to replace one failing/missing member drive.

Such rare cases of error situations may occur, even a RAID5 doesn't protect against some types of malfunction. Therefore it's recommended to do periodic backups of the data and sync'ing daily changes to external drives/cases.
 
Zuletzt bearbeitet:
It worked!

Simpson and Ernst@at, your help was invaluable in resolving this. With the proper range, testcrypt worked as well as rebuilding the MBR to get full access restored.

Thank you so much for your help!
 
Zurück
Oben