Ohh ohh /usr/bin was rm

So I guess I had one too many (beers) and I thought I was on 1 dir but was actually on /usr/bin instead. I did the infamous rm -rf * thinking I was in a share dir and low and behold (poof) everything in /usr/bin is now gone.

Yeah I know I will get the “you get what you deserve” type answers and what not but I hope there is a way to recover from this without doing a full unbrick procedure.

I looked at the /usr/local/sbin scripts and most of then are calling something that is in /usr/bin. My initial thought was that I could use those scripts to do a “system restore” or “upgrade to latest” or “upgrade to current” and get going. No dice there since apt/curl and other stuff is in /usr/bin.

I was hoping someone would be so kind in maybe tar up their /usr/bin and pass it along ? Yeah I know this is risky blah blah blah but at this point not sure I have an option.

Any other suggestions would be appreciated.

Thanks !!!

Problem resolved here is what I did.

  1. cat /etc/version
  2. Downloaded the firmware from support site
  3. Extracted the firmware
  4. Mounted the firmware on a “linux” box
  5. tar up the /usr/bin dir from the mounted firmwared
  6. Ran cat file.tgz | ssh root@wdmycloud “cat > file.tgz”
  7. Extracated file.tgz on wdmycloud box

Hope this could help others in the future.

1 Like

Thank you for sharing the outcome.