Recovering Linux Based File System

I have an HP Mediavault 2020 and there is some proprietary OS on the drives as explained in the link below.

http://www.k0lee.com/hpmediavault/diskformat/index.html

I've found the ReIser4 entry thru HexEdit at location ADBDBFC0

But unable to find the mount point.

I'm terrible with Linux and was hoping someone could lend some advice...especially the bash script at bottom of link.  Please see the code snippet.

Can't determine how to run the code.  This would hopefully find the correct location.
#!/bin/bash

i="0"
while [ $i -lt 80 ]
do
losetup -o $[ 512071732 - 65536 - $i] /dev/loop0 /dev/sdb
mount -r -t reiserfs /dev/loop0 /tmp/tmp
if (( $? )); then
{
        echo "could not mount";
        losetup -d /dev/loop0
}
        else
{
        echo "mounted using byte position: $[ 512071732 - 65536 - $i] ";
        exit;
}
fi;
i=$[$i+1]
done

Open in new window

OnsiteSupportAsked:
Who is Participating?
 
OnsiteSupportAuthor Commented:
I ran the code against the entire drive and still cannot find any mount points.  anyone have ideas on how to mount this reiserfs system?
0
 
ajay_mhasalCommented:
Hi,

If you found the ReIser4 entry thru HexEdit at location ADBDBFC0 then try running following script and check for mount point at /tmp/tmp (you need create this dir if you dont have it already)

-----------------------------------------------------------------------------------------------
#!/bin/bash

i="0"
while [ $i -lt 80 ]
do
losetup -o $[ 2914893760 - 65536 - $i] /dev/loop0 /dev/sdb
mount -r -t reiserfs /dev/loop0 /tmp/tmp
if (( $? )); then
{
        echo "could not mount";
        losetup -d /dev/loop0
}
        else
{
        echo "mounted using byte position: $[ 2914893760 - 65536 - $i] ";
        exit;
}
fi;
i=$[$i+1]
done
----------------------------------------------------------------------------------------
0
 
OnsiteSupportAuthor Commented:
ajay-
my problem is HOW to run the script.   I created the file using VI...but then don't know how to simply execute it ....yes, a true beginner.

Thanks

BTW...your live-cd recommendation was a great start to this annoying project :)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
darrickhartmanCommented:
First you need to make the script executable:

chmod a+x <scriptname>

Then execute it:

./<scriptname>

0
 
ajay_mhasalCommented:
Hi,

Thanks for the comment, Use following commands to run the script

# chmod 770 <script-name>

# sh <script-name>

OR

# ./<script-name>
0
 
OnsiteSupportAuthor Commented:
got it....I tried it for a bit this morning.  The offset may be wrong.  It wasn't finding any mount points.  I'll be looking at this later today.

Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.