I’m desperately trying to get unrar or p7zip on my Mirror gen 2.
I’ve found many topics about installing additional stuff on My Cloud Mirror gen 1, some of them mentioning p7zip, but they’re always with a major disclaimer “only for firmware v4”, which is not what gen 2 is running. Furthermore, some of these instructions are also based on replacing the whole firmware/OS with a Debian or Ubuntu, which, in my case, is going a bit overboard just for being able to unrar from shell.
Is any of more experienced people able to help? Maybe @Fox_exe?
You can use Chrooted Debian and install anything inside (Include unrar-free / p7zip-full and other debian apps).
Something can be extracted with default archiver: tar xvf archive.gz
Unzip also available in system. Rar? Do not use this propriaritary and old format. lzma (7zip) and xz - better
As you might guess, I’m not the one packing in this old and proprietary format, but I’d like to unpack the content arriving in this format; preferably automatically and preferably with a lightweight footprint.
Currently, I’m aiming just for something that works for myself, but in a long run I’d like to wrap my current scripts as apkg and give them out to whomever might have the similar needs #ifyouknowwhatimean
@Dachaz Did you find a solution to this problem? I have been trying to figure this out for a week now and it is driving me crazy. Who would have known that something as simple as .rar files would not be supported by the WD Mirror gen 2?
If you have found something I am sure all owners of this otherwise excellent device would love to hear about it
@Rockyen Yeah, just two weeks back I figured out that I could make use of Docker that’s running on the system in order to unrar things (having failed to compile a native binary). It’s not the fastest solution, but it is definitely faster than unraring over WiFi from my desktop.
@Dachaz Thank you for the swift reply. Thats amazing news!
Now for someone that is not that familiar with coding. Is this entered via putty SSH or similar? And does it unpack the whole range of rars from .rar to .r***?
Yeah, you need to SSH to the device using either Putty or some other method (I’m not a Windows user, so I’m not familiar what are the alternatives nowadays).
I’ve only tested unpacking the newer rar naming scheme (***.part1.rar) — if you start with the first archive (part1) it will automatically go through all of them. My assumption is that the case is the same for the old naming scheme (rar/r01/r02, etc.)
Worked like a charm! Thank you for this brilliant solution.
On a side note this does remind me of the good o’l days on MS-DOS. Guess the next step is making some kind of GUI for this as my current solution is a lot of copy pasting to get around all the typing.
Again, thank you for saving the day. I was starting to regret my purchase as only a minor amount more money would have gotten me a fully customizable NAS with mediaplayer capabilities and HDMI.
Docker works great. I couldnt figure out how to use rar.sh though. It is installed as trying to reinstall gives me a copy rar.sh.1. But when using the command it returns a rar.sh function not found.
Ok, maybe the instructions I wrote on github for using unrar.sh are leaned too much towards users more familiar with ssh/bash
Let’s assume you have your downloads in a share called “Downloads”. When you ssh (putty) to your device, that’s going to be /shares/Downloads.
I have just tested this myself, to confirm that it will work for you as well:
# go to your downloads folder
cd /shares/Downloads
# download the unrar script
wget --no-check-certificate https://raw.githubusercontent.com/Dachaz/docker-unrar-armhf/master/unrar.sh && chmod +x unrar.sh
# unpack a rar file in the Downloads folder, mind the ./ in the beginning
./unrar.sh FILE_NAME.rar
A thing to keep in mind: the unpacking script will not be available in other folders on your device (i.e. you always need to ssh to the same folder where you downloaded the script), but you can unpack files anywhere on your device. This means that if you wanted to unpack /shares/Games/TotallyLegalGame.rar you would
# Go to where your unrar.sh is, from our previous example that's /shares/Downloads
cd /shares/Downloads
./unrar.sh /shares/Games/TotallyLegalGame.rar
Now, speaking of “some kind of GUI” for this — what I could make is an application that you install on the NAS itself, which you could use to unpack archives. This would work similarly to how Transmit or Plex Server or other apps you install on the NAS work. Additionally, it could have some sort of scanning functionality which says “Scan the following folders for new archives and try to unpack and delete them”. This all means that you still wouldn’t be able to just connect to your NAS from Windows and double click a rar and magically get it unpacked by the device
Would this make sense to you, as a non-programming user?