HP Media Vault ipkg Instructions

Hacking the Media Vault with IPKG

Using ipkg to install modules on the HP MediaVault Generation 1

Before doing anything described on this page, please recognize that using a device that holds your only copy of your backup is not compatible with 'experimenting'.  If you intend to do anything explained here, please either get another Media Vault that you reserve for experimentation purposes or backup all your Media Vault files to another location, in the event that you make your Media Vault non-operational and lose its contents.

Karl Brose came up with a way to run ipkg modules compiled for the MIPS architecture by using a program he wrote called JRUN to change the location of the root directory to some directory on the hard drive.  JRUN stands for 'jail run' since this allows you to run programs from inside what is a sort of 'jail' or sandbox so as not to need to change the actual  root directory structure on the Media Vault. 

You can use the startup.sh script to launch these programs and, in the event that something stops working, a hard reset will break the connection by deleting startup.sh and should put your Media Vault back to normal.  However, this is not a 100% guarantee so please heed the warning in the first paragraph concerning your data!

Download zip file for JRUN.  You can unzip it on a PC and then follow the README file which is inside that zip file.  Here are the contents of the README file:


Date: Nov 4, 2007, Last Update: 2007/11/04 22:14:15 $
Author: Karl Brose, karlbrose at gmail dot com
License: This file and all software in this package is
released under the GNU General Public License 2.0,


RUNNING 3RD PARTY LINUX APPLICATION PACKAGES (IPKG)
ON THE HP MEDIA VAULT


* Introduction

* Prerequisites

* Installation

Create a designated folder or separate share on the Media Vault copy the provided zip file to that share or folder extract the contents of the zip file into the same directory with WinZip or another archiver program. Telnet into your HPMV, locate the package just installed in your filesystem and run the 'jrun' program. When running the program add a parameter '/setup'
i.e.:

/shares/Volume1/MYJRUNSHARE/jrun /setup

Now you can login to the new environment by executing

/shares/Volume1/MYJRUNSHARE/jrun

You will get a new shell prompt after this.



* Installing Applications

First initialize your ipkg configuration:

ipkg update

Try installing some packages:

ipkg install vim

ipkg install rsync


* Installation From Source Code


* Change Log

2007-11-04 Initial Public Offering @ US$0.00, only upside potential !!


* Known Issues

DNS resolution seems to be very slow, I included the ip/host for openwrt in
the /etc/hosts file.


* Credits

The current busybox implementation used by JRun was taken from the OpenWRT project by installing the OpenWRT build system and compiling a basic configuration with busybox and uclibc and extracting the executable and libraries from the root file system. Refer to http://www.openwrt.org

$Id: README,v 1.1 2007/11/04 22:14:15 nasmaker Exp $

 


Here is a short step-by-step guide that Chris Seto wrote on using JRUN:

** IPKG on the HP MV1 **
* Written by Chris Seto (aka, chris12892(at)gmail.com) with information by Karl Brose
* Questions/Comments? write me at chris12892(at)gmail.com
* PLEASE: do not redistribute the document without my written permission.
* VER. 1.00 RW3 PUBLIC

** PREFACE **
* If you are reading this, chances are you know what IPKG is. In case you don't, IPKG is a package system originally built for computers with severe storage limitations.
* Packages are files which contain programs to extend the functionality of a device.
* IPKG has been used on such embedded Linux firmwares as OpenWRT, UNslung, DD-WRT, and the Asus-WL router firmware.
* IPKG is an acronym for Itsy Package Management System.
* This guide is about, as the title suggests, how to get IPKG running on the HP MediaVault.
* IPKG packages have an .ipk file extension.
* Some examples of IPKG packages are: NTP servers, Rsync, VIM, VPN clients, http/https proxies, SQL servers,and much, much more!

** DISCLAIMER **
* WARNING: this is an experimental procedure. Attempt this at your own risk.
* I nor Karl Brose may not be held responsible if something goes wrong, and you end up with damaged hardware and/or software.
* This guide is provided AS-IS with NO warranty what-so-ever.

!!-WARNING Please read this entire document before attempting the described procedure-!!

NOTE: This guide was designed for Windows XP. Commands and/or methods may vary on other OSes.
=================================
Step A:
NOTES: You may put jrun where you see fit, but you will also need to modify the commands for that location.
A1. Create a share on the MV where you want IPKG to live. For the guide, we will name this share "jrun", and it will be in Volume1.
A2. Unzip jrun_kit.zip, by right clicking on it, and selecting "Extract All..." and extract it to the share created in Step A, A1.
DONE; Move to Step B.

Step B:
NOTES: none.
B1. We need to telnet into your MediaVault. Start>run, and type "cmd" (Without quotes) and hit enter.
B2. In the terminal window, type "telnet <your-MV's-name>" without quotes and without the brackets.
NOTE: From now on, every command you see after # should be inputted in the MV telnet session.
B3. Tell jrun to setup: # /shares/Volume1/jrun/jrun /setup
B4. Start jrun: # /shares/Volume1/jrun/jrun
B5. # mount /proc
B6. Update IPKG's database of packages # ipkg update
DONE; IPKG is installed! Move to STEP C.

Step C:
NOTES: This is a list of the very basic commands and info for/about IPKG, for a more extensive list of commands, just type "# ipkg" at the jrun prompt.
* You may install IPKG packages by "# ipkg install <package name>"
* You may run packages by "# /shares/Volume1/jrun/jrun <package> &"
* You may start packages by inserting "/shares/Volume1/jrun/jrun <package> &" into the startup.sh file in /shares/Volume1/.
* You may remove installed packages by "# ipkg remove <package name>"
* Please do not install too many packages. The MV is not as powerful as a full blown computer, and too many packages may cause it to become unstable.
* By default, packages are downloaded from the OpenWRT repository.
=================================

Many thanks to Karl  for figuring out how to take advantage of the ipkg repositories with minimal risk to the Media Vault.  Also thanks to Chris Seto for his testing and step-by-step instructions.


IPKG for the HP Media Vault Generation 2

Before doing anything described here, please recognize that using a device that holds the only copy of your backup is not compatible with 'experimenting'.  If you intend to do anything explained here, please either get another Media Vault that you reserve for experimentation purposes or backup all your Media Vault files to another location, in the event that you cause your Media Vault to become non-operational or to  lose its contents. Please note that installing software on the MV2 is more risky than on the MV1 since you are actually modifying the OS files on the hard drive and there is no 'undo' command like you have with the MV1 where a hard reset deletes the startup.sh file. You can always do a firware reload, but it puts your data at higher risk should the MV2 fail to boot after you've made some changes.

The short version:

Download ipkginstall.zip

1. Extract the file.
2. Copy the file (ipkginstall.sh) and the dir (ipkgsetup) to a share on the Media Vault
3. SSH in, and cp the file, and dir to "/"
4. # sh ./ipkginstall.sh

The Long Version:
** Installing IPKG on the HP MediaVault 2100 (i.e., the Generation 2 Media Vault) **
* Written by Chris Seto, with information from http://www.nslu2-linux.org/wiki/MSSII/HomePage
* Please do not redistribute without my permission
* Questions? Comments? Email me at: chris12892 <AT> gmail <dot> com

** Disclaimer **
* Warning, this is an experiential procedure. Use this document at your own risk. I may not be held responsible for damaged property, should something get broken. 

** What is IPKG, and what will it do for me? **
* If you are reading this, chances are you know what IPKG is. In case you don't, IPKG is a package system originally built for computers with severe storage limitations. 
* Packages are files which contain programs to extend the functionality of a device.
* IPKG has been used on such embedded Linux firmwares as OpenWRT, UNslung, DD-WRT, and the Asus-WL router firmware.
* IPKG is an acronym for Itsy Package Management System.
* This guide is about, as the title suggests, how to get IPKG running on the HP MediaVault MV21.
* IPKG packages have an .ipk file extension.
* Some examples of IPKG packages are: NTP servers, Rsync, VIM, VPN clients, http/https proxies, SQL servers, and much, much more!

First, you need the .zip file containing IPKG as explained above.

Now, we are going to copy the script, and the .ipk file on tothe root of a share. As an example, let's say the share's name is "fileshare". REMEMBER to change this when you follow these instructions.

We will also need to SSH into the MV. For this, we will use PuTTY. Download PuTTY here:
http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe
Install PuTTY and start PuTTY. Set it to SSH into your MV. Click "Open" at the bottom, when you are done.

You should now see a window pop up. It will ask for a login. your user name will be "root".
Your password will be what ever the admin account on your MV2 uses.

Follow these commands to install IPKG into the "/opt" directory.
# cd /share/1000/fileshare/
# sh ./ipkginstall.sh

You will now see a few lines of text appear as the setup script runs.

You are now done with the installation of IPKG!

IPKG, and the binaries of packages, will be stored in /opt/bin. You will need to put this in front, when you execute a package. For example, say you install a package called "foobar". To execute this package, you can do:
# /opt/bin/foobar


-- Test/Update IPKG --
1. Enter:
# /opt/bin/ipkg
If you get a list of options, that means that IPKG has been installed successfully.

2. # ipkg update

Done.

Return to the HP Media Vault FAQ

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