Ipkg on the Linkstation (for end-users)

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 13:48, 15 June 2006 by Bauldrick (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ipkg on the LinkStation

A preconfigured ipkg client is included with Projects/OpenLink OpenLink firmwares 0.60 and higher (only betas are available at this time). All the .ipk files contained in the official [LinkStationWiki ipkg feed] are based upon OpenLink 0.60 and higher. They may work on older versions of OpenLink or on non-OpenLink firmware LinkStations, although this is highly discouraged because of potential dependency issues.

Manually Installing ipkg

WARNING: The following procedure currently does not work. In fact, it is outright dangerous. The available libc6 package in the feed has been upgraded, and the libraries in that package are not compatible with many binaries from old 0.5x firmware. The package in the feed now contains a libc with version 2.3.5, while the previous package contained 2.3.2. If you install the current libc6 package from the feed on a 0.5x firmware and make the 2.3.5 lib the default (@@ldconfig@@) important programs will fail afterwards, and you possibly need to open the LS, hook up the disk to some other machine, mount the disk and fix the library links in /lib!

%red%However, you might have some luck - on some systems, it's possible to (shortly) login via SSH/Telnet after the system has booted and before some daemon shuts it down and lets the red LED flash. If you've got such a system, you "just" ned to replace the /lib/libpthread-0.10.so by a non-broken one. Such a "non-broken" file can be found in the OpenLink 0.52b image. I put that file on my server, so that it's easier to fix your systems. To fix, follow these steps:

  1. login via SSH/Telnet to the LinkStation as root
  2. wget -P /lib [this]
  3. reboot
  4. -> System fixed

If you want to use .ipk packages on an unsupported firmware or older firmware, you first need to install a version of ipkg manually:

  • Untar the package to the filesystem root (/)
  • Manually configure the configuration files

Manual Installation | This section only pertains to non-OpenLink 0.60 and higher firmware LinkStations. Most users can skip ahead to the next section.

Immediately after this, you should use ipkg to update ipkg and all dependencies to the latest versions. You should do this particularly if you don't have libc6, but only the original libgcc, e.g., as it comes with OpenLink 0.51b. First go to http://feed.linkstationwiki.org/stable/arch and look for the latest version numbers. Then:

  • Get the 'db1-compat' library (depends on libc6, which might not be installed at this point, so use '-force-depend')
  • Get the libc6
  • Get the latest ipkg

Now you can use ipkg with the pre-installed feed, see #InstallFeed below.

You also may build the ipkg client from the source code. If you go this route, we highly recommend you use the source files contained in the [downloads area]. Otherwise you may download the source code from http://www.handhelds.org/sources.html. You will need the older native development tools or cross-compilation toolchains to compile the source code. You also need to build libc6 and its dependencies.

Installing Packages via a Feed

ipkg can automatically fetch and install packages from an online repository called a feed. ipkg will automatically download the requested package and its related dependencies, install the package and dependencies, and perform any setup operations, as specified in the packages.

The official LinkStationWiki feed is located at http://feed.linkstationwiki.org/. Feeds for a particular ipkg installation are configured in the file /etc/ipgk.conf with the src option. The ipkg configuration which comes with the OpenLink firmware is already set up for using the LinkStationWiki feed. See LinkStationWiki feed URLs if you want to verify the feed configuration or need to manually configure ipkg for the LinkStationWiki feed.

If you have a configured ipkg you can start to use the feed. Begin by updating the list of available packages:

ipkg update

Then display the list of available packages:

ipkg list

You may search for a particular package by using the grep program:

ipkg list|grep packagename

Once you know what to install installing packages from the feed is very simple:

ipkg install packagename

Some packages feature installation scripts which help configure the software. If the requested package has such a script, you will automatically be prompted to provide information.

Upgrading Already Installed Packages

You can upgrade already installed software quite easily:

ipkg upgrade

Manually Installing .ipk Packages

Unless you have a specific reason not to, you should always install packages via the official feed. However, in certain cases, you may wish to manually install packages:

ipkg install packagename_version.ipk

Note: The current version of ipkg may leave an empty directory in your tmp directory. You can delete this directory after completing a package installation (the tmp directory is also automatically cleared during each reboot).


There are a number of security issues related to installing 3rd party .ipks. These issues are not unique to the ipkg system, but stem from the fact that ipkg and other packaging systems allow to install packages which have been built by other people. Therefore, you should only install packages from feeds and sources you trust.

Some potential security issues:

  • A package can accidentally or intentionally change access rights, e.g., a package can open the whole /etc directory to all users or set the SUID bit on some binary.
  • Replacement or manipulation of security relevant binaries (e.g. the shell) or configuration files.

* Installation of malicious binaries, e.g., backdoors and root kits. This only is an issue with untrusted feeds or .ipks.

  • Accidental or intentional changes of security-relevant configuration files.

Other ipkg Articles