NSLU2-Linux
view · edit · print · history

Once your NSLU2 is flashed with the new firmware, you may want to upgrade to the newer version of BusyBox. ("BusyBox combines tiny versions of many common UNIX utilities into a single small executable...." per http://www.busybox.net/about.html ). On the other hand, you may prefer to download full versions of these utilities (see discussion below).

Generally, this will do the upgrade:

  1. ipkg update
  2. ipkg install busybox

If upgrading Busybox doesn't work because you've installed other packages and are seeing something like:
...
Package busybox wants to install file /opt/bin/reset
But that file is already provided by package ncurses
Cannot find package busybox.
Check the spelling or perhaps run 'ipkg update'
An error ocurred, return value: 4.

... then use:

ipkg --force-overwrite install busybox

Once this is done, the newer busybox will be installed into /opt/bin/busybox. The problem here is that the existing busybox in /bin will be first in your PATH environment variable. In order to fix this, change the shell portion in /etc/passwd like:

dbixler:XXXXXXXXXX:2000:501::/share/hdd/data/public:/opt/bin/sh

and create a /etc/shells file like:

~ $ cat > /etc/shells
/opt/bin/sh
/bin/sh

You need the /etc/shells so that dropbear (if it's installed) allows the /opt/bin/sh as a valid shell upon login. It is also needed for vsftpd when enabling local user access.

Furthermore, add this line in /etc/profile so that /opt/bin is first in the search path.

PATH=/opt/bin:${PATH}

This way all the other tools busybox provides are accessible too.

With the latest optware, busybox, coreutils, inetutils etc all use update-alternatives. So these packages can co-exist. Full version utilities have higher priorities and will be selected as the target of symbolic link during ipkg install and ipkg remove. So suggestion below is no longer needed.

From: Inge Bjørnvall Arnesen <i.b.arnesen@...>
Subject: RE: [nslu2-linux] Another problem package on 3.18 - BusyBox 1.0

I just want to promote my "busybox 1.0 as non-package"-method explained in the second section of http://www.nslu2-linux.org/wiki/Unslung/ReSling . Busybox 1.0 is between the rock and the hard place in that it is there to fill in the blanks left by Busybox 0.6, coreutils, inetutils, procps, which etc. combined (which is not that much). It is a hard position to be in and with the inflexibility of ipkg this leads to (in my view) the abolishion of Busybox 1.0 as a live package, though makes it able to linger on as a binary with manually managed links.

If you already have sensible packages like inetutils installed, then you download busybox to /opt/tmp, extract the files using "ar"/"tar" and put Busybox and the links you want into your file system. Alternativly you can uninstall inetutils, ncurses etc, install busybox 1.0, manually remove it as a package, delete conflicting links and reinstall inetutils, ncurses etc, leaving Busybox 1.0 to take care of the non-conflicting things.

Vive la revolution,
-- Inge

From: John Bowler <jbowler@...>
Subject: RE: [nslu2-linux] Another problem package on 3.18 - BusyBox 1.0

That makes sense to me (for openslug too).

There's also the --install option to busybox, this will make the appropriate links (symbolic or hard as required) to the busybox executable. If busybox is built with this option then it's also possible to 'repair' a system after ipkg remove of something. In fact there's a hidden advantage to this option - currently the links are all symbolic and these take up extra space in the file system. Ipkg has a bug which means that it can't handle a busybox package with hard links, but the --install option works perfectly to install them...

view · edit · print · history · Last edited by BrianZhou.
Based on work by Jim DeLaHunt, barrym, wstewart, Roger Goun, and krisvdc.
Originally by dbixler.
Page last modified on November 08, 2007, at 03:32 AM