K0LEE.com Sitemap


Home
Aviation
HP FAQs
Other Hobbies
Work


Picture Keeper - the easiest way to protect your pictures!

HP MediaVault MV2100 Series "hacking" FAQ

Written by Chris Seto (chris12892-AT-gmail.com), with contributions. Thanks to Lee Devlin for hosting this FAQ!


Please read first -- A warning on "hacking" your MV2

Index
Installing IPKG
startup.sh
Firefly (iTunes) web access
Mount the mobile rack drive as a separate volume
PHP bootup subsystem
Fixing TTY warning and getting the 'more' command to work
Transmission Bittorrent Installation
Using the MV2 as a general purpose web server (external link, hosted on an MV2)

Installing IPKG

IPKG may be added to the MV2. See Lee Devlin's IPKG page here. The linked method uses the Unslung repository.


Startup.sh

One way to start scripts and applications is to use a startup script. The MV1 had this feature, and the way it worked was that a script named "startup.sh" was inserted into the root of Volume1. The MV2 does not currently support this feature by stock, but a PHP script in /etc/init.d may be modified to check for, and execute startup.sh . The instructions for this modification are here.

Mount the mobile rack drive as a separate volume

By default, the mobile rack drive is mounted with the system drive as a JBOD. Nick from the Yahoo group discovered that you can modify the startup scripts to lie and tell the MV that the system only has one drive. You may access the guide here.

Firefly Web Access

It is possible to open the web page for Firefly.  You can see (but not change) the Firefly variables.   Just add port 3689 your Media Vault's web address and it will open the Firefly configuration window.   The user is 'admin' and password is 'mt-daapd'.


PHP bootup subsystem

WARNING: The PHP bootup subsystem is _very_ fragile. Do not edit it unless you know exactly what you are doing, and can risk losing ALL data on your MV2. If you make a mistake when editing these files, you may brick your MV2.

The MV2 uses a PHP based subsystem to boot up. Initially, rcS in /etc/init.d/ is followed. In the script, control is handed off to rc.bootup with is the main PHP file. Functions are defined in .inc files in /etc/inc/.

You may edit the files in init.d and inc, but make sure to reset the files back to their original permissions when you are done. failure to do so may brick your MV2 on the next bootup.

When editing the PHP bootup subsystem files, make sure to check your syntax and form before saving, and rebooting. If you were to typo something, you could brick your MV2 on the next bootup.

Please note that the PHP bootup subsystem is very fragile. You must make sure to do everything correct when editing the files contained in it.

When you edit the files, make sure to do it in these steps

1. Check permissions of the file with SSH
2. Change the permissions to allow editing
3. Edit the file
4. Check syntax, form, and make sure there are no mistakes
5. Save the file
6. Change the file back to the permissions it way on before you edited it.


Fixing the TTY warning and getting the 'more' command to work

The MV2 has an issue when you log in via SSH that generates a TTY warning.  This also prevents the 'more' command from responding properly to a <space bar> so that you can display files.  You can fix it by copying these commands and executing them in this order.  The first command makes a backup of a file and the second one performs a stream edit on the original file.

# cp /etc/udev/rules.d/50-udev.rules /etc/udev/rules.d/50-udev.rules.orig
# sed -i -e '/ttyS0.*SYMLINK="tty"/d; /console.*MODE="0622"/aKERNEL=="tty", NAME="%k", MODE="0666"' /etc/udev/rules.d/50-udev.rules

Then you must reboot for this to take effect.


Transmission Bittorrent Installation

Transmission is a simple bittorrent client that has a web interface. You can run it on the MV2 and access it from anywhere with a browser at the address http://hpmediavault:9091 (assuming your MV2 is named 'hpmediavault'). It's convenient to have the MV2 run a bittorrent client so that when you want to download a large torrent, you don't have to have PC on continuously. Before installing it, you'll need to use the the ipkg instructions on the MV2 hacking page to get ipkg working as explained here. After setting up ipkg, you can just type:

ipkg install transmission

To get it up and running, It is necessary to edit the settings.json file located under this directory:

/.config/transmission-daemon

Specifically, change these two lines to read as follows:

"download-dir": "\/share/1000/Videos",

(On my MV2, "/share/1000/Videos" is a valid directory, yours may be different, check to make sure since that number 1000 can change if you've been adding or removing drives.)

and

"rpc-whitelist": "192.168.*.*,127.0.0.1",

(Unless you add 192.168.*.* it will not allow logins from other computers on the network, it generated a 401 error. This assumes your internal network is on address 192.168.*.*, if not, modify accordingly.)

Then you'll need to set up these environment variables which, for testing purposes, you can do from the command line:

export EVENT_NOEPOLL=1
export TRANSMISSION_WEB_HOME=/opt/share/transmission/web/

Then to start it:

/opt/bin/transmission-daemon -f

The -f option will run it with a text output on its status to your SSH window and help you to see if it's working. If it works, then it will just be a matter of putting those commands in a startup file to allow it to run automatically on startup. Otherwise, it will stop running when you log out of the SSH session.

To test it, open a browser and navigate to http://hpmediavault:9091 and see if you get a window. If you do, use a service such as mininova.org to find a valid URL for a torrent and paste it into the URL window to see if it works.

I added the lines to the end of /etc/init.d/rc.bootup that make it check for startup.sh as explained here.

Inside startup.sh put these lines to set the environment variables and launch Transmission during boot up:

export EVENT_NOEPOLL=1
export TRANSMISSION_WEB_HOME=/opt/share/transmission/web/
/opt/bin/transmission-daemon


This web page has had 7134 visits since Sept 22, 2009.