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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
darrickhartmanCommented:
First you need to make the script executable:

chmod a+x <scriptname>

Then execute it:

./<scriptname>

0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.