DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2012-02-14 16:28:44

InBonobo
Member
From: Toronto
Registered: 2009-01-18
Posts: 34
Website

HELP! made a big boo boo

I was doing some directory maintenance on my box over SSH and entered an extra space, which may have caused a major disaster:

Code:

root@dlinky:/mnt/HD_a2/incoming# mv Sample /* .
mv: cannot remove '/dev/pts/0': Operation not permitted
mv: cannot remove '/dev/pts': Device or resource busy
mv: cannot remove '/dev': Directory not empty
^[[A^[[A^[[B^[[B

Basically, I dropped by mistake an extra space between "Sample" and "/". When I heard the disk had started churning, I hit Ctrl+C but the damage had been done. Commands don't seem to work anymore:

Code:

# ls /
-sh: ls: not found

What exactly has happened and how do I find my way out of this mess?


1 DNS-323, HW B1, 2 x 2TB WD Black (WD2001FASS), fw 1.09, fun_plug 0.5
1 DNS-321, HW A2, 2 x 1TB Seagate Barracuda 7200.11 (currently failed)
Here's my Hacking DNS-323 and DNS-321 NAS Guide smile

Offline

 

#2 2012-02-14 17:04:28

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: HELP! made a big boo boo

You have moved Sample and /* to /mnt/HD_a2/incoming.

If you are lucky, your /lib directory still exists. In that case you can just revert it:

Code:

/mnt/HD_a2/incoming/bin/mv /mnt/HD_a2/incoming/* /

But for safety you might first want to look what you've collected:

Code:

/mnt/HD_a2/incoming/bin/ls /mnt/HD_a2/incoming/

Offline

 

#3 2012-02-14 18:26:10

InBonobo
Member
From: Toronto
Registered: 2009-01-18
Posts: 34
Website

Re: HELP! made a big boo boo

Thank you, Mijzelf.
Although the commands are in the bin directory, as expected, I'm still getting -sh: ls: not found
Maybe it's because the parent directory is not executable, or some other file permissions got messed up.
Tab doesn't autocomplete either.

I'm able to browse on the local machine (win 7), which had Volume_1 and 2 already mounted, but other machines on the LAN can no longer mount these volumes.

Is there any way to force the execution of a file (command) even when its permission are messed up? Also, I seem to have a few "[" files in most newly created directories as well as in the old /ffp/bin, still accessible, apparently, through Windows Explorer on this machine.

I can browse the volumes through WinExp but cannot move the files that way due to insufficient permissions.


1 DNS-323, HW B1, 2 x 2TB WD Black (WD2001FASS), fw 1.09, fun_plug 0.5
1 DNS-321, HW A2, 2 x 1TB Seagate Barracuda 7200.11 (currently failed)
Here's my Hacking DNS-323 and DNS-321 NAS Guide smile

Offline

 

#4 2012-02-14 20:04:20

InBonobo
Member
From: Toronto
Registered: 2009-01-18
Posts: 34
Website

Re: HELP! made a big boo boo

Browsing through the GUI, it seems that the entire root directory was moved (bin, default, dev, etc, ffp, home, lib, l+f, mnt), including a "image.cfs" file.

I've decided to bite the bullet and reinstall Fonz - the new version from the /oarm directory. I thus downloaded fun_plug and fun_plug.tgz to root of Volume_1 and will be rebooting shortly.

Should I perform a unit reset first? Any other tips for a quick restoration?
Maybe it's just me, but the wiki ( http://dns323.kood.org/howto:ffp ) does not seem to be loading in anything but Firefox.


1 DNS-323, HW B1, 2 x 2TB WD Black (WD2001FASS), fw 1.09, fun_plug 0.5
1 DNS-321, HW A2, 2 x 1TB Seagate Barracuda 7200.11 (currently failed)
Here's my Hacking DNS-323 and DNS-321 NAS Guide smile

Offline

 

#5 2012-02-14 21:26:15

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: HELP! made a big boo boo

InBonobo wrote:

Although the commands are in the bin directory, as expected, I'm still getting -sh: ls: not found

That can mean that the /lib directory was already moved. In that case you should provide a library search path:

Code:

LD_LIBRARY PATH=/mnt/HD_a2/incoming/lib /mnt/HD_a2/incoming/bin/ls /mnt/HD_a2/incoming/

Or maybe the symlink (sh is a symlink to busybox) points to /bin/busybox, instead of busybox. In that case you should call busybox directly:

Code:

/mnt/HD_a2/incoming/bin/busybox ls /mnt/HD_a2/incoming/

Or a combination, when both problems are true:

Code:

LD_LIBRARY PATH=/mnt/HD_a2/incoming/lib /mnt/HD_a2/incoming/bin/busybox ls /mnt/HD_a2/incoming/

For mv you can use the same tricks. It's also just busybox.

Offline

 

#6 2012-02-14 21:55:43

InBonobo
Member
From: Toronto
Registered: 2009-01-18
Posts: 34
Website

Re: HELP! made a big boo boo

Code:

-sh: LD_LIBRARY: not found

sad

Would you recommend I try to reinstall 0.5 or jump to 0.7 for my DNS-323?

I can't access the FAQ and all the info I find is for booting up from a USB drive; yet my USB drive is invisible unless I install the .ko file, and to install the .ko I have to install a funplug, which is a bit of a Catch 22.


1 DNS-323, HW B1, 2 x 2TB WD Black (WD2001FASS), fw 1.09, fun_plug 0.5
1 DNS-321, HW A2, 2 x 1TB Seagate Barracuda 7200.11 (currently failed)
Here's my Hacking DNS-323 and DNS-321 NAS Guide smile

Offline

 

#7 2012-02-15 03:46:00

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: HELP! made a big boo boo

I'd suggest reinstalling FFP (stick with the version you know for now) and then clean everything up.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#8 2012-02-15 10:14:29

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: HELP! made a big boo boo

InBonobo wrote:

Maybe it's just me, but the wiki ( dns323.kood.org/howto:ffp ) does not seem to be loading in anything but Firefox.

http://dns323.kood.org/howto:ffp is correct wiki address. Owner of dns323.info domain has given it up and now it's parked.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#9 2012-02-15 14:05:32

InBonobo
Member
From: Toronto
Registered: 2009-01-18
Posts: 34
Website

Re: HELP! made a big boo boo

Thank you, FunFiler and Sala.
I thought about flashing with alt-f2 (I have B1 fw 1.04), but reading some reports of bricking in their Issues section curbed by enthusiasm. Funplug 0.7 oarm was an interesting update and before doing that I was going to do a hard factory reset. Holding the reset button did nothing and neither did the front button so I had to cut the power.

Much to my surprise, upon reboot everything just worked!

I then tried to mv everything back and got a bunch of errors. Made a tarball with all the rm - r, reboot, everything's fine. The only problem is in the dmesg tail:

Code:

---[ last dmesg log ]---
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sdb4
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

I'm not too keen on doing this as this can cause far worse problems than it solves; I'm inclined to leave it as is.
At the time of the error transmission was downloading something but there wasn't much else doing sustained writes. Furthermore, transmission recovered gracefully.
Should I run e2fsck or should I scan the drives with the 1.09 FW utility?

Last edited by InBonobo (2012-02-15 14:07:08)


1 DNS-323, HW B1, 2 x 2TB WD Black (WD2001FASS), fw 1.09, fun_plug 0.5
1 DNS-321, HW A2, 2 x 1TB Seagate Barracuda 7200.11 (currently failed)
Here's my Hacking DNS-323 and DNS-321 NAS Guide smile

Offline

 

#10 2012-02-15 20:18:59

rsd76
Member
Registered: 2010-04-18
Posts: 47

Re: HELP! made a big boo boo

To run the e2fsck utility your drives should be offline. However running ffp from does disks make it normally impossible to umount the drives.

Maybe http://dns323.kood.org/howto:cleanboot is an option for you.


Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin & Hobbes)

Offline

 

#11 2012-02-16 19:20:06

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: HELP! made a big boo boo

The scan utility from DLink likely won't do anything useful. I could be wrong.

I would think it mandatory to fix the filesystem asap.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB