Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Some good soul is willing to help an ignorant? Please

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
xtrips
Posts: 6
Joined: 2017-11-21 09:30

Some good soul is willing to help an ignorant? Please

#1 Post by xtrips »

Hello,

I have to say first that although I have been a sysadmin on windows server farms I have no experience on Linux at all.
I have NAS that runs on Debian (Netgear ReadyNas Pro). Seems to be version 4, or Etch, I don't know.
I have deleted a share, thinking I was actually deleting the logical share. In fact I deleted the files within that share.
I of course stopped all writing on the NAS.
To try and save some files at least, I need exundelete to run.
I don't have it installed.
Running apt-get update and/or apt-get install extundelete fails because it points to an obsolete repository (http://www.readynas.com).
If I could run extundelete under SSH I could manage but without it I am stuck.
What can I do?

P.S: please be gentle, I don't speak Linux :D

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Some good soul is willing to help an ignorant? Please

#2 Post by steve_v »

Assuming you got no joy from ReadyNAS or it's forums (you have tried there, right?):
Step one is to find out what architecture and release of Debian it runs. The file '/etc/debian_version' and the command 'uname -a' may shed light.
Then go find an extundelete package for it in the archive. I'm guessing it's not based on a current release since it's repos are gone.
Step two is to set up a reliable backup strategy, this kind of thing should never happen.

Ed. If it is Etch, you're SOL for a binary package. Extundelete arrived in Debian in 2011. You could try the oldest package on snapshots, but YMMV.
And the package search is down in the archives. :roll: When did that happen?

Ed. 2 The oldest package I can find needs libc6 2.2.5, that's Lenny. SOL again. Sorry.

Other options:
See if you can get the NAS to boot a modern rescue disk/USB image.
Install Etch in a VM, compile extundelete from source there.
Last edited by steve_v on 2017-11-21 10:33, edited 1 time in total.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

xtrips
Posts: 6
Joined: 2017-11-21 09:30

Re: Some good soul is willing to help an ignorant? Please

#3 Post by xtrips »

And a kiwi came for help.....THX
The debian version is 4.0
And the command returned
Linux NOVANAS 2.6.37.6.RNx86_64.2.4 #1 SMP Thu May 28 16:29:46 PDT 2015 x86_64 GNU/Linux
I went to the archive but I need to know my computer architecture first.
How do I check that for sure?
I know it is based on Intel but I am not sure if 32 or 64 bit.

xtrips
Posts: 6
Joined: 2017-11-21 09:30

Re: Some good soul is willing to help an ignorant? Please

#4 Post by xtrips »

Just saw your edit.
I lost you.
What I know for certain is that this happened to me also like 6 years ago, and a Linux guru used some tool to undelete files. I just gave him access to a remote terminal session and he did it. Did he install extundelete? I don't know. Because since then I reset my NAS to factory default.
Your instructions are beyond me, I am humble.

xtrips
Posts: 6
Joined: 2017-11-21 09:30

Re: Some good soul is willing to help an ignorant? Please

#5 Post by xtrips »

I don't understand, SOL stands for what?
How do I check if I have the lib6... prerequisite?

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Some good soul is willing to help an ignorant? Please

#6 Post by steve_v »

xtrips wrote:I know it is based on Intel but I am not sure if 32 or 64 bit.
It's right under your nose:
Linux NOVANAS 2.6.37.6.RNx86_64.2.4 #1 SMP Thu May 28 16:29:46 PDT 2015 x86_64 GNU/Linux
The kernel is 64bit at any rate.
xtrips wrote:I don't understand, SOL stands for what?
crap Out of Luck. As in, this isn't going to work.
There's no extundelete package for Etch. There never was.
xtrips wrote:How do I check if I have the lib6... prerequisite
You don't, not if it is Etch (4.0). At least not the right version. 'strings /usr/lib/libstdc++.so.6 | grep LIBCXX' (or wherever the library is on Etch) should get you the version.
It might still run, but it's not likely. Dpkg will refuse to install the package, so if you still want to try it you will need to force the issue - see the --ignore-depends option to dpkg.

I don't know what your 'guru' did, but my guess is that he used something other than extundelete. Or got a compatible version from who knows where.

I don't suppose this NAS thing has GCC on it does it? It's unlikely...

I'll have a look around for options after work tomorrow, if I have time. It's after midnight here.
In the meantime, someone who actually used this old Debian version might wander by... I was running Slackware back then.

-----
Gah, can't let it alone. Here, I just compiled extundelete from Lenny in an Etch VM.
I can't be bothered to figure out this ancient version of devscripts, so it's just a bare executable. chmod +x it and run. Hope you have ext2 libs installed.

If you need to install anything that is in Etch, put this in your sources.list:

Code: Select all

deb http://archive.debian.org/debian-archive/debian/ etch main contrib non-free
deb http://archive.debian.org/debian-security/ etch/updates main contrib non-free
VM came from here, if you want it to play with.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
alan stone
Posts: 269
Joined: 2011-10-22 14:08
Location: In my body.

Re: Some good soul is willing to help an ignorant? Please

#7 Post by alan stone »

xtrips wrote:Some good soul is willing to help an ignorant? Please
...
What can I do?
P.S: please be gentle
Step -1. :wink:

xtrips
Posts: 6
Joined: 2017-11-21 09:30

Re: Some good soul is willing to help an ignorant? Please

#8 Post by xtrips »

steve_v wrote:
xtrips wrote:I know it is based on Intel but I am not sure if 32 or 64 bit.
It's right under your nose:
Linux NOVANAS 2.6.37.6.RNx86_64.2.4 #1 SMP Thu May 28 16:29:46 PDT 2015 x86_64 GNU/Linux
The kernel is 64bit at any rate.
xtrips wrote:I don't understand, SOL stands for what?
crap Out of Luck. As in, this isn't going to work.
There's no extundelete package for Etch. There never was.
xtrips wrote:How do I check if I have the lib6... prerequisite
You don't, not if it is Etch (4.0). At least not the right version. 'strings /usr/lib/libstdc++.so.6 | grep LIBCXX' (or wherever the library is on Etch) should get you the version.
It might still run, but it's not likely. Dpkg will refuse to install the package, so if you still want to try it you will need to force the issue - see the --ignore-depends option to dpkg.

I don't know what your 'guru' did, but my guess is that he used something other than extundelete. Or got a compatible version from who knows where.

I don't suppose this NAS thing has GCC on it does it? It's unlikely...

I'll have a look around for options after work tomorrow, if I have time. It's after midnight here.
In the meantime, someone who actually used this old Debian version might wander by... I was running Slackware back then.

-----
Gah, can't let it alone. Here, I just compiled extundelete from Lenny in an Etch VM.
I can't be bothered to figure out this ancient version of devscripts, so it's just a bare executable. chmod +x it and run. Hope you have ext2 libs installed.

If you need to install anything that is in Etch, put this in your sources.list:

Code: Select all

deb http://archive.debian.org/debian-archive/debian/ etch main contrib non-free
deb http://archive.debian.org/debian-security/ etch/updates main contrib non-free
VM came from here, if you want it to play with.
Thank you very much for putting the effort so late at night.
I copied the file on the NAS then ran chmod -x extundelete, which returned no output, right?
The when I ran extundelete I got
-bash: line 7: extundelete: command not found

What does that mean? Missing libraries?

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Some good soul is willing to help an ignorant? Please

#9 Post by steve_v »

xtrips wrote:I copied the file on the NAS then ran chmod -x extundelete, which returned no output, right?
Expected, it's just setting the file executable, in case Dropbox mangled permissions. And it's 'chmod +x', note the + to add the executable bit. -x will remove it.
xtrips wrote:The when I ran extundelete I got
-bash: line 7: extundelete: command not found

What does that mean? Missing libraries?
It means bash could not find the file specified in its executable search path ($PATH).
To run a file that isn't in $PATH (like the one in question) you have to tell the shell where it is. If it's in the current directory, prepending './' will do. So try './extundelete' :P
You'll need some arguments to extundelete too. See the homepage.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

xtrips
Posts: 6
Joined: 2017-11-21 09:30

Re: Some good soul is willing to help an ignorant? Please

#10 Post by xtrips »

steve_v wrote:
xtrips wrote:I copied the file on the NAS then ran chmod -x extundelete, which returned no output, right?
Expected, it's just setting the file executable, in case Dropbox mangled permissions. And it's 'chmod +x', note the + to add the executable bit. -x will remove it.
xtrips wrote:The when I ran extundelete I got
-bash: line 7: extundelete: command not found

What does that mean? Missing libraries?
It means bash could not find the file specified in its executable search path ($PATH).
To run a file that isn't in $PATH (like the one in question) you have to tell the shell where it is. If it's in the current directory, prepending './' will do. So try './extundelete' :P
You'll need some arguments to extundelete too. See the homepage.
Again, thank you for your patience. I know I need to be fed with a spoon,
It runs but obviously I have a problem understanding the syntax to use because I always get
Error parsing command-line options
or
requires an argument
or
No action specified; implying --superblock

I also tried
/c/media# /c/media/extundelete /hidden/Doc/Perso --restore-directory hidden/Doc/Perso
but got
/c/media/extundelete: "/hidden/Doc/Perso" is a directory. You need to use the raw filesystem device (or a copy thereof).

I have no idea where to go from there.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Some good soul is willing to help an ignorant? Please

#11 Post by steve_v »

Well this is pulled from lenny, so it may not be the latest version.At least it runs. I'll try compiling the latest version, perhaps command line arguments have changed.

-----
Here's 0.2.4.

As for extundelete syntax, You'll have to read the instructions. I've never used the thing myself, as I have backups.
extundelete: "/hidden/Doc/Perso" is a directory. You need to use the raw filesystem device
The error you get is pretty self-explanatory if you have read said instructions - you need to specify the block device as well as the directory to restore.
I would guess something like: './extundelete /dev/{insert your block device here} --restore-directory {insert directory to be restored}'.
You will need to fill in directory and the disk it resides on of course. As for getting the block device name, something like 'df /hidden' should give you output including a /dev/sd{x} or /dev/hd{x} under the "Filesystem" column.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply