The default Banana Pi OMV image doesn't have vi installed, so to install it, we would normally do this:
sudo apt-get install vi
The computer will go out to the internet, download the vi sofware (along with any other dependencies) and install it for you, but without a connection, this process won't work
To work-around this, we can use a tool called apt-zip, which figures out what files need to be downloaded, and generates a script to get them. You then transfer this script to another computer that has an internet connection and run it, to download everything. Then, you transfer the downloaded files back to the bPi, where apt-zip can install them.
However, we face the ironic problem of how to install this tool without an internet connection We have to do this manually:
- First, download the package from hereAt the time of writing, OMV is built upon Debian Wheezy, so you will need to get the corresponding version of apt-zip..
- Then install it:
Getting the vi package
We can now start installing vi. First, create a temporary directory for apt-zip to put its work files e.g. /tmp/apt-work/.
We then run apt-zip to figure out what is needed to install viNote that the package we want to install is called vim, not vi!:
apt-zip can save the generated scripts to a removable USB drive, but since we have a network connection to the bPi, we can transfer the files using scpOr you can just put them in a shared folder., so we need the --skip-mount option to stop it from trying to mount the output directory. The internet-connected computer I'll be downloading the files on is a Windows box, and so I include the -M wget-dos option, to tell apt-zip to generate a Windows batch file (instead of a Linux shell script).
After transferring the generated scripts to my Windows computer, I want to run the fetch-script-wget-dos-bananas.bat script, but there is a minor problem: it checks that the programs it needs are available, but if the PATH contains any directories that have a space, this will confuse it We can hack around this by temporarily setting our PATH to point to only the directory where wget.exe lives e.g.
We can now run the fetch-script-wget-dos-bananas.bat scriptNote to self: run this in a DOS box, not 4NT.. Note that you will need wget installed, to actually download the files - I use gow, which provides a set of the most commonly-used Linux tools for Windows, but Cygwin should also work.
Installing the vi package
|« Managing a Banana Pi without an internet connection||Tutorial index||Setting the current time on a Banana Pi without an internet connection »|
[ + ]
|1.||↵||At the time of writing, OMV is built upon Debian Wheezy, so you will need to get the corresponding version of apt-zip.|
|2.||↵||Note that the package we want to install is called vim, not vi!|
|3.||↵||Or you can just put them in a shared folder.|
|4.||↵||Note to self: run this in a DOS box, not 4NT.|