Partition with RAW file system. Can't access data

Hello community!

Yesterday i tried to install a minimal server selection, using this tutorial: h**p://www.howtoforge.com/perfect-server-opensuse-12.2-x86_64-apache2-dovecot-ispconfig-3

when i finished configuring the installation, opensuse was preparing disk’s to format and install, but it has failed at 6%.

This was my configuration before the installation:
Disk: 2TB sata (in reality:1,82TB)
Partitions:
C: 876GB - Windows 7 ultimate x64
D: 825GB - partition to store movies software etc
L: 100GB - Had an ubuntu 12.10 gnome (extended partition, created with windows)

So, when i set up partitions with opensuse it looked like this:
/dev/sda1 - system reserved 100MB
/dev/sda2 - 876GB NTFS
/dev/sda3 - 100GB Extended
/dev/sda4 - 325GB ext4 (where i wanted to create /srv)
/dev/sda5 - swap ext4 (don,t remember very well how much space was assigned to swap, root and home but had left suse default)
/dev/sda6 - root ext4
/dev/sda7 - home ext4
/dev/sda8 - unassigned partition

suse has shrinked my L: partiton to 39GB and /sda8 was left with 500GB (plus the 325GB make the former D: )

So my problem is this:
As stated before installation crashed when it was preparing disks to install new desktop; i had to reboot by pressing the reset button and then i entered in windows.
now windows see partition D: with 325 GB with the file format as RAW
i formated L: because i didnt´t want ubuntu anymore and i have 100GB plus 500GB of unassigned space.

Want i want to do is to recover the files that i had in D: and i can´t access them because they are in RAW.

Tried to fix MBR with a software but i didn´t work.

Which OS is the appropriate to try to recover: openSuse or Windows?
Should i try hiren´s boot?
Should i try a live cd of any linux distro? (with tools for partitions)

Note: Despite i had ubuntu installed i am complete new user to linux, i don´t know how to perform most of the task´s ( only know how to navigate in kde and gnome desktop)

Thank´s in advance!
Niolp

On 2013-01-15 12:56, Niolp wrote:
>
> Hello community!
>
> Yesterday i tried to install a minimal server selection, using this
> tutorial:
> h**p://www.howtoforge.com/perfect-server-opensuse-12.2-x86_64-apache2-dovecot-ispconfig-3

I’m not familiar with that.

> Disk: 2TB sata (in reality:1,82TB)

Actually: 2TB = 1.82 TiB. If you want the long explanation, see the
wikipedia for mebibytes, it is a relatively new unit standard. The
discrepancy in values will be gone when people use the appropriate names
for the units used.

> when i finished configuring the installation, opensuse was preparing
> disk’s to format and install, but it has failed at 6%.

No way that we can guess where that percent is, a description of what
exactly it was doing would be better.

> This was my configuration before the installation:
> Disk: 2TB sata (in reality:1,82TB)
> Partitions:
> C: 876GB - Windows 7 ultimate x64
> D: 825GB - partition to store movies software etc
> L: 100GB - Had an ubuntu 12.10 gnome (extended partition, created with
> windows)

…er, please, post those things inside code tags. advanced editor, ‘#’
button. If not, the computer generated text can be unreadable.

> now windows see partition D: with 325 GB with the file format as RAW
> i formated L: because i didnt´t want ubuntu anymore and i have 100GB
> plus 500GB of unassigned space.
>
> Want i want to do is to recover the files that i had in D: and i can´t
> access them because they are in RAW.

Impossible, sorry.

If that partition was formatted, the data inside is destroyed. Windows
does not see it, but it is probably formatted as ext4. You can probably
read it with any Linux live CD or USB stick (like the CD used for
installation of openSUSE), but it will be empty.

There is some chance that a program like photorec can still find the
files that were there. Or a Windows equivalent.


Cheers/Saludos
Carlos E. R. (12.1 test at Minas-Anor)

Hi robin_listas.
Thank´s for info on the mebibyte unit´s!

No way that we can guess where that percent is, a description of what
exactly it was doing would be better.

The image bellow it´s not from my installation, but it is to show where i was. i cannot add a description because it was in this tab: slide show.
I did click in Details tab, but it never showed. that was when pc crashed…

http://static.howtoforge.com/images/perfect_server_opensuse12.2_with_apache2_64bit_ispconfig3/big/17.jpg

If that partition was formatted, the data inside is destroyed. Windows
does not see it, but it is probably formatted as ext4.

I believe that partition was “getting ready” to be a ext4, but because it crashed is no longer NTFS nor ext4. I believe it has something to do with the MBR, but i wasn´t able to restore it on windows, and didn´t tried on linux yet.

PS: In the previous post i didn´t put the hardware info, so here it is:

CPU: Core i5 760@2.8Ghz (desktop)
Mother: Asus P7H55D M-Pro
Ram: Kingston 2x2GB DDR3 1333Mhz
Video: ATI HD 5770
Disk: WD 1,82TiB Sata II

Want i want to do is to recover the files that i had in D: and i can´t access them because they are in RAW.

Tried to fix MBR with a software but i didn´t work.

Which OS is the appropriate to try to recover: openSuse or Windows?
Should i try hiren´s boot?
Should i try a live cd of any linux distro? (with tools for partitions)

First we need to see what you actually have, from a Linux liveCD open a terminal (such as konsole) and type the following

su -l
fdisk -l

copy and paste the output here, Please use code tags ( the # button ).

Do not write anything else to this HDD until you have decided on a recovery strategy.

From another machine download and burn a copy of downloads – Parted Magic to CD, it contains TestDisk which can be used to revert to a previous partition setup and recover formatted partitions, as well as Photorec which can recover data from deleted or reformatted partitions.

You have already written to this disk in your previous attempts at recovery, this does not help you.
Show us the output requested and we can offer you a strategy.

Hello again!
Tonight i will try this, because yesterday i was very busy.

Thank´s in advance!

Niolp

Your partition layout is quite confusing.
Sometime when you next try, unless you have reason to do otherwise to use a more simplified layout most modern distros are implementing, the openSUSE install “recommendation” usually is

/ root
/ home
/ swap

As for your RAW filesystem issue, I’m not sure how you arrived at it and the few times I’ve run into a filesystem called 'raw" using different technologies I get the feeling that it sometimes has different meaning… So, for instance using VMware “raw” file systems are typically file disk file systems accessed like any OS installed on bare metal rather than in a backing file.

On the chance it might work, if you try to mount that partition using another virtualization technology like KVM-QEMU you <might> find something in there but I suspect that as Carlos suggests that what is there is an intermediate step towards re-formatting and your previous data would be very difficult to recover… But who knows? - Could be worth a try. I don’t know for sure that openSUSE can read “raw” directly (but maybe I’ll learn something new today).

Another idea is unless you really need direct hardware access, you might consider virtualization rather than multi-booting. The problems you describe were part of the reason I rarely multi-boot anymore.

IMO,
TSU

Hi again. Sorry for the late reply, but here he goes:

linux@linux:~> su -l
linux:~ # fdisk -l

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x216ae978

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  1838284799   919038976    7  HPFS/NTFS/exFAT
/dev/sda3      2048000000  2734618099   343309050    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1010 MB, 1010826752 bytes
255 heads, 63 sectors/track, 122 cylinders, total 1974271 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: 0x91f72d24

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     1974270      987104    c  W95 FAT32 (LBA)

Somewhat different to what you had before the mishap.

For future reference, this would most likely have been a quick and relatively simple repair with a high likelihood of complete recovery with TestDisk, if you had not booted the system and no data had been written to the HDD.

TestDisk is still an option if all else fails, but you could expect an MBR that would need repairs as you “Tried to fix MBR with a software”, and some data loss as some other data is likely to have been also written to disk.

As it stands I would suggest PhotoRec Step By Step - CGSecurity booting from the PartedMagic liveCD.
Read all info on the PhotoRec site that is relevant to your situation.
Save the files on a separate HDD (not the HDD you are attempting to recover files from)
Let us know if you have been able to save all data you need and we can further advise from there.

Somewhat different to what you had before the mishap.

Well, it’s not!

But my recommendation, still stands.

Hi
Just finished analyse with TestDisk.
I cannot post result because i closed testdisk trying to copy the output ( crtl+c instead of crtl+shft+c), but when running it was saying:
Invalid NTFS or EXFAT boot, i guess it was refferring to this partition: /dev/sd3

when finished, result was something like this partition is too small;
i managed to pull this output:

Disk /dev/sda - 2000 GB / 1863 GiB - CHS 243201 255 63

The harddisk (2000 GB / 1863 GiB) seems too small! (< 2490 GB / 2319 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partition can't be recovered:
     Partition               Start        End    Size in sectors
>  HPFS - NTFS          192781 179 62 302832  55 24 1767961466



 Continue ]
905 GB / 843 GiB


From what i read in cgsecurity forum, error size its not a big deal (testdisk software related), but i do need help to sort what to do next.

Thank’s a lot!

P.S.

but you could expect an MBR that would need repairs as you “Tried to fix MBR with a software”

My brother suggestion:|

I can list files though:

 3 P HPFS - NTFS          127482  26 33 170222  26 32  686618100
Directory /

>dr-xr-xr-x     0     0         0 14-Jan-2013 00:19 .
 dr-xr-xr-x     0     0         0 14-Jan-2013 00:19 ..
 dr-xr-xr-x     0     0         0 31-Aug-2012 12:18 $RECYCLE.BIN
 dr-xr-xr-x     0     0         0 15-Nov-2012 19:30 ard23
 dr-xr-xr-x     0     0         0 15-Nov-2012 00:44 Arduino
 dr-xr-xr-x     0     0         0 15-Nov-2012 20:23 avr
 dr-xr-xr-x     0     0         0 18-Nov-2012 18:03 Disco60gb
 dr-xr-xr-x     0     0         0  8-Dec-2012 19:26 Filmes
 dr-xr-xr-x     0     0         0 14-Oct-2012 21:34 hddold
 dr-xr-xr-x     0     0         0  8-Dec-2012 19:07 Jogos
 dr-xr-xr-x     0     0         0 10-Jan-2013 00:22 Nuno
 dr-xr-xr-x     0     0         0  8-Dec-2012 19:40 Series
 dr-xr-xr-x     0     0         0  5-Dec-2012 22:05 Software
 dr-xr-xr-x     0     0         0 14-Jan-2013 01:41 System Volume Information


At this point, what’s best:
-Continue with testdisk and try to copy/create image of the partition, or
-Give Photorec a try?

Thank’s :wink:

At this point, what’s best:
-Continue with testdisk and try to copy/create image of the partition, or
-Give Photorec a try?

Because you seem to be getting along OK with testdisk , then yes, use it to copy the image to a different HDD, or to recover the files.

Whatever you choose, read the docs carefully,
I have previously recommended testdisk to people who have not understood it, and have made the situation worse, testdisk is a powerful tool that if used incorrectly can cause damage.

If you are prepared to read the docs, it can be a safe way to copy deleted files or partitions to a different HDD.

This was my configuration before the installation:
Disk: 2TB sata (in reality:1,82TB)
Partitions:
C: 876GB - Windows 7 ultimate x64
D: 825GB - partition to store movies software etc
L: 100GB - Had an ubuntu 12.10 gnome (extended partition, created with windows)

I would suggest that you only believed this to be your configuration before the installation attempt.

The reasons I suggest this is are

  1. I’ve been trying to come up with an explanation as to how the YasT2 partitioner can effect the file system on sda2 when you say your partition changes were to be in the extended (supposedly) sda3, not a lot to go with there, perhaps faulty install medium? Perhaps user error?

  2. There is no “(extended partition, created with windows)” as can be seen by the fdisk output, sda3 (windows L) is a standard primary. This is, I suspect the partition layout before changes were attempted from windows.

  3. The YaST2 partitioner would write the partition table first, then format those partitions, not change sda3 to standard primary from extended, then write an NTFS file system to it.

opensuse was preparing disk’s to format and install, but it has failed at 6%.

Because it detected faults in partitions or file systems and quit without writing to disk.

Did you reboot and check the system was working correctly after making changes from windows and before the install attempt?
Did you use the tools that come with windows or another partitioning tool?



linux@linux:~> su -l
linux:~ # fdisk -l

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x216ae978

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  1838284799   919038976    7  HPFS/NTFS/exFAT
/dev/sda3      2048000000  2734618099   343309050    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1010 MB, 1010826752 bytes
255 heads, 63 sectors/track, 122 cylinders, total 1974271 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: 0x91f72d24

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     1974270      987104    c  W95 FAT32 (LBA)


dvhenry, i think i didn’t explained myself very well.

Indeed i had those three partitions.
The output that fdisk gave i will try to explain:
sda2 = drive C:
sda3 = drive D: this partition was resized by me from 825GB to 327GB.
If you notice, the end sector of sda2 it’s not equal to the start of sda3, and this space was the L: drive, and this drive it’s not allocated anymore because i did remove it using windows, after i had the problem with the installation of opensuse. And there is a space between 2734618099 (end sector of sda3) and 3907029168 (wich is the total numbers of sectors that disk has).

I didn’t tried to recover files yet because its very bad weather, and electricity is constantly failing. So when everything get’s back to normal i will reporte again.

Thank’s for the time spent trying to help me.
niolp

If you notice, the end sector of sda2 it’s not equal to the start of sda3, and this space was the L: drive, and this drive it’s not allocated anymore because i did remove it using windows, after i had the problem with the installation of opensuse.

Ok, for future reference, when requesting help It is important to describe as well as possible any events leading up to, or after the point that you believe you lost access to data, events that may affect data recovery, or give clues as to how that data became inaccessible.
Deleting partitions after you believe you have lost access to that data is one those things that should find its way into the initial post.

Did you check that you could access sda3 (windows D) before using windows to delete the Linux partitions?

I still can’t work out how the Linux partitioner could cause this problem, as sda3 should not have been touched.

Has a partitioning tool other than one that comes with Linux or windows been used at any time on this HDD?
I have used one that determined the start and end of partitions differently to the Linux partitioning tool, and damaged a Linux partition.

In this case, because testdisk can list the files in the damaged partition, the recovery method does not need to change.

And there is a space between 2734618099 (end sector of sda3) and 3907029168 (wich is the total numbers of sectors that disk has).

With three primary partitions two separate areas of free space on the disk has little point, but this can be addressed after the data recovery.

I didn’t tried to recover files yet because its very bad weather, and electricity is constantly failing. So when everything get’s back to normal i will reporte again.

This is the correct thing to do, as is not rushing into this with a need to recover the files immediately.