# Urgent - restore ReiserFS partitions! [solved]

## tomAEs

hey there,

i lost the last 5 partitions out of 10 on my hd after i thought i could quickly create a new partition on the remaining free space under windows... guess i learned something here - never touch windows partition manager... well at least the data should still be there only the partition table should be broken.

i already tried testdisk to restore the lost partitions - no luck.

does anybody knows a tool or trick how i can access my data?

maybe i can mount the partitions with directly specifing the offset of the partition for the mount command like this:

```
mount -o ro,offest=32256 -t ext3 /dev/hda /mnt/somemoutpoint
```

i know i can mount my primary partition with this offset, but how exactly do i get offsets for the following partitions?

Please help!Last edited by tomAEs on Mon Oct 01, 2007 1:46 pm; edited 1 time in total

----------

## sammy2ooo

I had a similar problem before. First of all you should visit the following links

http://www.faqs.org/docs/Linux-HOWTO/LILO-crash-rescue-HOWTO.html#disk_partition_rescue

http://tldp.org/HOWTO/html_single/Partition/#recovering

Then secondly, what does fdisk think about your partition table? Please remeber to not write anything to the damaged disk using the w switch!!! 

I was able to repair my destroied part table using gpart. Maybee this works for you to. If you are able to fix the partiton table you can go over and use reiserfsck to check the data. Restoring the mbr is the smallest problem we have here...

----------

## tomAEs

fdisk only recognizes the mentioned first 5 partitions.

I'm currently running gpart and are waiting for the results... will post the results asap.

thanks for your answer.

----------

## tomAEs

ok gpart only found the mentioned first few partitions. I'm running it now with the options -n h -f ... maybe i got more luck with this

----------

## energyman76b

you can always try to find the partitions in a hexeditor ...

----------

## tomAEs

well if i knew what exactly to look for, indeed i could....

after gpart is done, i'll give the above posted link a try

http://tldp.org/HOWTO/html_single/Partition/#recovering

----------

## tomAEs

 :Cool: 

after hours and hours of running several tools restoring my partitions i still didn't get any results.

so my last hope was indeed my little hexeditor. i wrote down the partition tables and checked the entries of the harddrive. this way i quickly discovered the error. windows deleted the link from partition 5 to partition 6, so also all following partitions weren't accessible.

the problem now of course was, i did'n know the start adress of partition 6, so i could restore the link. what i did was loading gigabyte for gigabyte into the hexeditor and searched for the magic numbers of the partition table "55aa" with some starting zeros (so in fact "000055aa". finally i found the correct extended partition table and i was able to restore the adress in the partition table of sda5.

Reboot and - DADA - All partitions were back again!!

i'm still wondering why windows deleted the mentioned entry and why no tool was able to discover the error. at the end it wasn't that complicated.

----------

## sammy2ooo

great job man...   :Very Happy: 

----------

## energyman76b

I just accidentally removed two partitions, swap&ext3. i created them sunday night on some spare space to hold a opsensuse 'emergency' system, and downloaded some mails into it. Well, I was pretty nervous to get the emails (and some stuff I have written) back - luckily it worked. testdisk ftw!

----------

