Use the Custom Ipkg Installer
From OpenFSG
Contents |
Intro
It is a good idea to know were the ipkg comes from. Don't you agree? :-)
- What is NSLU?
NSLU is a hardware device a little similar to FSG. It runs Linux (as FSG does). A lot of the work done for the NSLU Linux software can be used by FSG and vice versa.
- What is the NSLU-Linux community?
They are a group of people working on this embedded Linux version. You can find their efforts at http://www.nslu2-linux.org/wiki/ and all the information related to FSG at http://www.nslu2-linux.org/wiki/FSG3/HomePage
- What are Packages?
In general, packages are commonly-available software programs that we have simply ported to the NSLU2-Linux. The effort to do this work is provided by the volunteer NSLU2 Linux community. You will find that many of these software programs or "Packages" do quite diferent things. Just look at List of Compatible ipkgs
- What is Optware?
The Optware package system was originally created to accompany the Unslung firmware for the NSLU2. Now it has been expanded to cover FSG and a variety of other platforms as listed at http://www.nslu2-linux.org/wiki/Unslung/OptwarePlatforms
- What is ipkg?
IPKG is a very lightweight package management system. It was designed for Linux installations with severe storage limitations such as handheld computers. iPKG is more than just an embedded Linux flash image builder, (although it does that fairly well). It also allows for dynamic installation/removal of packages on a running system.
- The IPKG version for FSG
An installer for the ipkg package distribution system has been custom made for the FSG, DTG and NDP. Gone are the days of many awkward scripts and careful procedures. This new custom installer is VERY simple.
What packages can I find?
Just look at the list of avaliables packages for you device here.
What are this packages for?
You can find a FILE for FSG v3, FSG V4. DTG v4. and NDP v4. where explains all the information about every package.
IPKG Installation Procedure
Preparation
Note: In newer firmware, the Freecom firmware has included IPKG out of the box, so you don't need to install it anymore. Jump to Installing Packages
You do not need to do this if you run a more recent firmware. For Firmware 4.2.7 and 4.3.8, Jump to IPKG with 4.2.7-4.3.8
- Download the installer:
- For the FSG V3 firmware: http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/fsg3-bootstrap_1.0-6_armeb.xsh
- For the FSG V4 firmware: http://ipkg.nslu2-linux.org/feeds/optware/fsg3v4/cross/stable/fsg3v4-bootstrap_4.0-3_armeb.xsh
- For the DTG V4 firmware: http://ipkg.nslu2-linux.org/feeds/optware/dt2/cross/stable/dt2-bootstrap_1.2-5_arm.xsh
- For the NDP V4 firmware: http://ipkg.nslu2-linux.org/feeds/optware/vt4/cross/stable/vt4-bootstrap_1.2-5_arm.xsh
- Put it someplace on your FSG, DTG or NDP.
Installation
Note: You do not need to do this step for Firmware 4.2.7 and 4.3.8. Jump till IPKG with 4.2.7-4.3.8
- Login to SSH
- Logging in as root
- Make sure you change the root password (type passwd)
- Type sh /path_to_the_fsg_ipkg_installer
- For example, if your user name was Tom and you put the script in your user folder, just type sh /home/tom/fsg3-bootstrap_*.xsh
- The script will ask you to delete 2 folders the first time. Remove and run again the script. It might not ask - mine didn't, but this may be because I previously had ipkg installed?
Example install (this is from the V3 firmware, the V4 firmware bootstrap will look different)
FSG-3 Bootstrap extracting archive... please wait bootstrap bootstrap/wget-ssl.ipk bootstrap/ipkg.ipk bootstrap/ipkg.sh bootstrap/bootstrap.ipk bootstrap/bootstrap.sh bootstrap/openssl.ipk 55125 1 records in 55125 1 records out Creating temporary ipkg repository... Installing FSG-3 bootstrap package... Unpacking bootstrap.ipk...Done. Configuring bootstrap.ipk...Done. Installing ipkg... Unpacking ipkg.ipk...Done. Configuring ipkg.ipk...Done. Removing temporary ipkg repository... Installing OpenSSL... Installing openssl (0.9.7l-3) to root... Configuring openssl Successfully terminated. Installing wget... Installing wget-ssl (1.10.2-3) to root... Configuring wget-ssl Successfully terminated. Creating /opt/etc/ipkg/cross-feed.conf... Setup complete.
IPKG with 4.2.7-4.3.8
Since Firmware 4.2.7, the Freecom firmware has included IPKG out of the box. But at least the 4.2.7 and 4.3.8 firmware for FSG has a wrong name for the configuration file
- Hence on FSG Firmware 4.2.7 and 4.3.8, correct this by
- Logging in as root
- type:
cp /etc/ipkg.conf.FSG3 /etc/ipkg.conf
- Hence, starting with Firmware 4.2.7 and 4.3.8, you may skip the Preparation and Installation steps described before and immediately start with Installing Packages.
IPKG with NPD 4.4.5 and 4.4.8
The Network Drive Pro with 4.4.5 and 4.4.8 firmware ipkg feeds seem to be wrong. You had to edit /etc/ipkg.conf to remove the following feeds:
src/gz cross http://ipkg.nslu2-linux.org/feeds/optware/dt2/cross/stable src/gz armel http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable
and replace the 2 lines with this one:
src/gz cross http://ipkg.nslu2-linux.org/feeds/optware/vt4/cross/stable/
This gave you most packages, except those that require libstdc++ which seems to be impossible to build until the toolchain is repaired to have the correct g++ header. (3 May 2008)
Installing Packages
- Type ipkg update to get the latest lists of ipkgs
- Type ipkg list to list all available packages
- Type ipkg info package-name to see information on a particular package.
- Where "package-name" is a pattern or a package name i.e. "*python*" or "python"
- Type ipkg install package-name
- After Installing:
- Reboot the FSG via the web interface or by typing reboot
- Login to SSH and su to root
Examples of Installing Packages
See openssh for an example of installing the openSSH ipkg.
Troubleshooting
sort: not found
Currently with firmware 4.2.7 (4.3.8 not tested) and with current bootstrap you will run into problems with "sort" not being found when installing packages, for example:
/opt/bin/update-alternatives: /opt/bin/update-alternatives: 185: sort: not found
A Workaround was posted by rwhitby, see: Forum post by rwhitby. Try running this commands:
- ipkg install coreutils
- ln -s /opt/bin/coreutils-sort /usr/bin/sort
- ipkg install --force-reinstall coreutils
If the reinstall of coreutils worked without errors, you are good to go. If not, you will have to do the bootstrap again, and enter those commands immediately after the first ipkg update.
ipkg update fails
After installing ipkg the first thing you should do is run ipkg update. If it fails with:
Downloading http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/Packages.gz An error occurred, return value: 2. Collected errors: ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -q -P /tmp/ipkg-uxCQyU http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/Packages.gz'Note that this package is for the FSG, use another one as mentioned in Preparation for DTG or NDP.
Then try this command by itself (which is one of the above, but without the quiet option):
wget --passive-ftp -P /tmp http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/Packages.gz
If it can't resolve the domain name ipkg.nslu2-linux.org then you need to correct the DNS entry on the WAN port (which it will be using). This should be automatically set if you are using DHCP, but otherwise you will have to set a static IP, gateway and DNS entry.
Check this is working correctly by entering the command:
nslookup ipkg.nslu2-linux.org
Update If this fails and you have your FSG sat behind a router you may need to edit /etc/resolv.conf to point to your DNS server or local gateway.
resolv.conf should include a line such as;
nameserver 192.168.1.1
If 192.168.1.1. is not your local gateway or DNS server change it to your routers gateway address.
update-alternatives errors
With some versions of the Optware installer the update-alternatives path is incorrect, which results in errors like:
//usr/lib/ipkg/info/coreutils.postinst: //usr/lib/ipkg/info/coreutils.postinst: 4: /opt/bin/update-alternatives: not found
Executing the following commands after the installation of Optware solves the problem:
ln -s /usr/bin/update-alternatives /opt/bin/update-alternatives ipkg update ipkg upgrade

