I just broke SSH on my MBL; need help

Aha, and weird.

I had downloaded the cmdline version, also on the webpage you cited. It did not recognize the file.

I’ve now got the win32 version, and it does.  I’ve extracted the file.

One more double-checking question before  I go ahead.  My device is the 2TB “My Book Live”, purchased recently and part number WDBACG0020HCH-00.  Is this correct firmware?

Yep its correct

You are gonna want to update after you get your shares set back up. I recommand rolling back to 02.11.09-053 because the last 2 firmwares have major changes and upgrading from 02.11.09-053 to the new firmware will be a smooth process.

Make sure you recheck the guide I had a small typo and it is now fixed

cp /DataVolume/shares/Public/resetButtonAction.sh /usr/local/sbin/resetButtonAction.sh

Hmm, one more paranoid question…

I’m looking at resetButtonAction.sh. I don’t  completely understand it, so this question may be offbase, but it looks like it expects my device to be a raid device with two drives /dev/md0 and /dev/md1.

But, my unit is single disk, and has no md1 device.

    root@CentralPark:~# ls -d /dev/md*
    /dev/md /dev/md0
_    root@CentralPark:~# _

Also, your instructions said that I would need to replace an earlier version of resetButtonAction.sh in /usr/local/sbin.

But, I had no such file pre-existing there.

So, double-checking again… is this the right script for this device?

David

Yep, the OS runs in software raid.

sda1 OS (raid) md0 or md1

sda2 OS (raid) md0 or md1

sda3 swap

sda4 data

Type mount in the terminal window and you will see the OS raid mount as /md0 or /md1

I gotta run, be back in around 2 hours… Lemme know how it goes

Well, the script ran but the device did not shutdown for reboot.

It clearly ran to the end of the script… the console shows:

    Copy image to upgrade device /dev/md1
   3999616+0 records in
    3999616+0 records out
    2047803392 bytes (2.0 GB) copied, 341.927 s, 6.0 MB/s

    
    all done, now rebooting

    Broadcast message from root@CentralPark (pts/0) (Thu May 2 17:09:30 2013):
    The system is going down for reboot NOW!
    CentralPark:~#

I assume that is just another symptom of the damage I did via apt-get, I know I can power-cycle and, assuming everything went well, I’ll come up in the new OS. But, I’m leery about doing so and losing my ssh access in case anything has gone wrong.  What can I check to verify that the new OS has installed cleanly, before I boot?

In any event, I’ll hold off on rebooting until after you get back.

David

PS I am **bleep** lucky that the shutdown is not working. Confession: I am a complete bonehead when stressed, and I somehow did not copy the img file to the the Public directory. (Don’t ask … I could describe the steps that led to this idiocy, but doesn’t really matter).  In any event, the first time I ran the script, it had no img file to copy. Lucky for me, it did not reboot, so I got a second chance.   But, it would be good to add a check that the file actually exists (and maybe even require an MD5 check??). The next ■■■■■ will not be as lucky as I just was.

It looks like it copied an image to me

That is the correct output at the end of the script

copying image to disk…

3999616+0 records in

3999616+0 records out

2047803392 bytes (2.0 GB) copied, 170.032 s, 12.0 MB/s

1 Like

It booted.  I still need to do the setup, reconnect to the shares, etc., but I hope that will all be straightforward.

And then, back to your script to setup git again, unless I find a way around my original problem.  (This all began because needed to run Git in a directory on the NAS. It didn’t work, and WD support says it is because of a problem in how the device implements SSH).  Anyway, all that is a subject for later.

Meanwhile, thank you very much! You were an amazing help today.

David

No problem :slight_smile: if you come up with anything interesting, please feel free to write a guide.

I spoke too soon. :cry:

As expected, The GUI dashboard offered an upgrade. I accepted. It showed an error, and then seemed to start again.

Now, the black popup in the top-right corner says that the firmware update was successful, with a timestamp 20+ minutes ago.

Meanwhile, a white popup in the middle of the screen says that the update is 4% through upgrading, but has not changed in many minutes.

I opened a second browser window in parallel and occasionally refresh it. Sometimes it gives the same 4% message. Other times, it gives “31118 - Unknown error. Please ensure you are not facing network connectivity issues and try again.”.

The LED is steady.  The color is – I’m not sure: either white or light blue".

Should I wait even longer, or power-cycle?

Hey, ssh is enabled. Looks like that carried over from before!

I got in and did a ‘top’.  Looks like the the cpu is being eaten by something called mediacrawler, which must be a script, because it seems to be kicking off ‘du’ and ‘ls’, also running very heavy.

Does the MBL do some kind of heavy-duty media cataloging when it first starts up? (Especially since I did an upgrade with half a terabyte of media on the device?  If this theory makes sense, then I guess my best bet is to let it finish. How long should I give it before deciding something is unreasonable? (hours? days? longer?)

Yes please wait it out. The first update message is one from the downgrade

It sits at 4% for a little while while it unpacks the deb

Yep it is re-indeximg all your media. I think you can kill that PID and the upgrade should speed up and go through.

or you can wait it out… Could take a day or so if you have a lot of media

Were you able to get the upgrade done? Drive working ok? Did you have to kill mediacrawler?

I finally killed mediacrawler, and disabled the file (turned off -x on mediacrawlerd) since I don’t expect to ever need it.

I’ve now completed the update and recreated the shares and users, per your instructions.

Here are a few more tips, for the next reader of this thread or to add to your tips:

  • I had to recreate all the shares. It was easy to remember the exact names and spellings by looking at the directories under /shares.

  • The shares that had non-public permissions were a little bit trickier. I needed to rename them back and forth, as you suggested. In some cases, even that wasn’t enough; I needed to reboot. After rebbot, I could connect fine to all of them.

  • The shares display in the dashboard showed each of the shares as having 0GB of content. This, too, fixed itself when I rebooted.

All the standard features are now working again, thanks.

I’m now back to tackling my original git issue. Your instructions look good, but I don’t quite understand why they work. Can you explain a bit more? (Sorry to be a pain, but just want to make sure I know what’s going on before I delete so many files).

David

I never tried to install git (so know it has not been tested) but I know that installing packages with files linked to the wd-nas file can cause issues bricking the dashboard. Running the command removes package references to the firmware preventing all the conflict errors where installing certain packages. One such package is php5…

As far as commenting out wheezy repos, I have run into several issues installing packages from wheezy causing my dashboard to brick and other packages not being discovered in programs such as pyLoad after I installed them from wheezy. One example of that would be python-imaging which is needed for pyLoad. Worked from squeeze…Did not work from wheezy install.

I bricked my drive trying do the exact same thing a couple of weeks back.

nfodiz guided me through fixing it, and I came across this post today when trying to install git again. I figured I’d take his advice  again on this one. Followed his instructions to a tee, and now I’ve got git on the drive.

Hope this helps!  :smiley:

Nice :slight_smile: I wouldn’t mind a guide of some sort walking me through the process of using GIT to git clone a repo and install that software if either of you ever had the time and felt like sharing a little knowledge :slight_smile:

My best guess is

comment out wheezy repos

rm -f /var/lib/dpkg/info/wd-nas.*

apt get update

apt-get intall git-core ?

go to git-hub and find software you want to install

cd

mkdir /git

cd git

In order to install a local copy of the repository, click on the button marked ‘Git Read-Only’ and copy the text of the URI on its right?

git clone git://github.com/quick2wire/quick2wire-python-api.git (example)

Then The README file on Git should tell me what do to install the software in the repository?

Feel free to create a new thread and step us through this process as it sounds interesting

Hi,

I am copying the first comment of Degeldeg by changing something. There are some different situations but the problem is totaly same. (i write diffrences with red fonts):

"I’ve done something stupid, and am stopping for help before I make things worse or my machine reboots and I lose all connectivity.

 

I wanted to install git on my My Book Live. so…

 

- I enabled ssh

- logged in as root to the device

- did    apt-get update; apt-get install git

- It wanted to install a large number of packages, replace many, and remove some.

- I was a bit worried that it wanted to remove open-ssl, but it looked like it was installing related replacements, so I said ok.

- Along the way, it asked about overwriting /etc/{apache2,cli}/php.ini.

_- For both, I said to not replace the old versions _

- When apt-get finished, it warned “Your apache2 configuration is broken, so we’re not restarting for you”

- My existing ssh connections to the box are not available now, and I can not make a new one; new connections are refused.

 

The NAS web page is broken. The main page displays, but none of the links works, and it reports 0 GB data stored, even though the data is intact."

I think, I bricked my drive trying do the exact same thing.

There is no connection between MBL with computer. Led light is white now.

What am i going to do now? Could anyone tell me step by step?

 

I hope you help me about not to lose my media.

Thanks.

Hi TC_Berk,

Congratulations, you’re in nearly the same boat as me yesterday. The difference is I chose to not keep old versions of the configs.

Follow this guide:

http://community.wd.com/t5/My-Book-Live/GUIDE-Debrick-MyBookLive-v2-0/td-p/567582

And before you ask further…

I’ve done my share of research and Googling, and… no… There is no way to do that without opening your MBL.

Don’t worry, doing it carefully will minimize damage, probably without damage at all …

Go here for detailed instructions on opening it:

http://forums.whirlpool.net.au/archive/2032705

If you want to save your data, you can do it from within System Recovery CD’s GUI … or basically any ext4-enabled Linux, including Ubuntu. I prefer SysRecCD for its smaller download size ( http://www.sysresccd.org).

And then, use neowiz’s guide for installing Transmission without breaking apache2/php:

http://community.wd.com/t5/My-Book-Live/GUIDE-Install-Transmission-2-77/m-p/558638

Best of luck !