NSLU2-Linux
view · edit · print · history

This document describes the necessary steps to prepare the DS-101(g+) for later ipk-package installation, so that you can install packages from the feed by doing ipkg install <packagename>

There is work in progress getting the DS-101j bootstrap working! (Check the bottom of the page!)

Prerequisites

Make sure that you have enabled telnet on the DS-101(g+) as described here.

Option 1: Download the bootstrap script:

Download ds101-bootstrap_1.0-4_armeb.xsh (for the DS-101) or ds101-bootstrap_1.0-4_powerpc.xsh (for the DS-101g+). Place the script in the public share, either through smbfs or ftp.

These links were verified at Mar 18, 2007.

Install

 
 $ telnet <hostname-or-ip-of-ds-101>
 $ cd /volume1/public
 $ sh ds101-bootstrap_1.0-*.xsh (* is either armeb or powerpc)

In order to do this, you must have root-privileges! After the installation, call ipkg update and start installing optware packages. Refer to "How To use ipkg" for more details on how ipkg works.

Files modified by the ds101-bootstrap install scripts:

  • /etc/rc.local: Mount /opt at bootup, call /opt/etc/rc.optware if present
  • /etc/profile: add /opt/bin and /opt/sbin to the PATH
  • /etc/ld.so.conf: add /opt/lib to the dynamic linker configuration
  • /opt/etc/ipkg/cross-feed.conf: ipkg feed for your platform

Option 2: Build from source

1. Checkout the sources:

 
$ wget http://www.nslu2-linux.org/Makefile ; make optware-ds101
or
$ wget http://www.nslu2-linux.org/Makefile ; make optware-ds101g

 
$ cd optware/ds101 (or optware/ds101g)
$ make ipkg-ipk
$ make ds101-bootstrap-xsh

2. Copy the self-extracting archive to your DS-101(g+) public share.

You might use ftp for transfering the file or mount the public share using smbfs. The following file must be copied to the DS-101(g+):

 
  optware/ds101/builds/ds101-bootstrap_0.1-8_armeb.xsh
or
  optware/ds101g/builds/ds101-bootstrap_0.1-8_powerpc.xsh

6. Install

 
 $ telnet <hostname-or-ip-of-ds-101>
 $ cd /volume1/public
 $ sh ds101-bootstrap_0.1-8_*.xsh (* is either armeb or powerpc)

After the installation, call ipkg update and start installing optware packages...

What the xsh script actually does

1. skip the first n bytes of the script and pipe the rest of the xsh file to tar

2. tar will extract the following files to a directory 'bootstrap'

  • bootstrap.sh - shell script that does the actual setup/installation
  • ipkg.sh - shell script version of the Itsy Package Manager
  • bootstrap.ipk - ipk containing missing glibc libraries
  • ipkg.ipk - the binary version of ipkg
  • wget-ssl - required by ipkg to fetch packages from the net
  • openssl.ipk - openssl (required by wget-ssl)

3. the xsh script cd's to the bootstrap dir and calls bootstrap.sh

4. bootstrap.sh sets up a temporary directory /tmp/ipkg-bootstrap for later use by ipkg.sh

5. bootstrap.sh uses ipkg.sh to install bootstrap.ipk

6. bootstrap.ipk brings the missing libraries and also set's up some config files on your box:

  • it creates /opt and /volume1/opt directories (preinst)
  • it bind-mounts /volume1/opt to /opt (preinst)
  • it creates /opt/etc, /opt/var/lib, /opt/lib/ipkg/info and /opt/tmp (preinst)
  • it adds /opt/lib to /etc/ld.so.conf and on the g+ it also calls ldconfig (postinst)
  • it adds /opt/bin and /opt/sbin to the PATH in /etc/profile
  • it creates/modifies /etc/rc.local to bind-mount /volume1/opt and call /opt/etc/rc.optware

7. bootstrap.sh uses ipkg.sh to install the ipkg package (binary version)

8. bootstrap.sh removes the temporary ipkg directory (/tmp/ipkg-bootstrap) since it can now use the ipkg version installed in step 7.

9. bootstrap.sh installs openssl.ipk and wget-ssl.ipk

10. the script finally creates /opt/etc/ipkg/cross-feed.conf pointing to the DS-101(g+) ipkg feed

11. the bootstrap script returns

12. the xsh script removes the bootstrap directory and finally exec's the shell to activate changes in /etc/profile


Bootstrapping on a DS101j

The standard procedure works on 101j's using the latest firmware (Firmware 2.0.3 - 0518), but the web interface isn't accessible afterwards (Apache error...).

flipflip adds: Bootstrapping on a DS101j (Firmware 2.0.1 - 3.0281)

I had to manually install the package since there were issues with system libraries. The following assumes that the bootstrap file ist on the diskstation and the commands are executed as root. Extraction of the tarball and the files within from the bootstrap file:

 
dd if=ds101-bootstrap_0.1-8_armeb.xsh bs=181 skip=1 of=ds101-bootstrap_0.1-8_armeb.tar.gz
tar -xzf ds101-bootstrap_0.1-8_armeb.tar.gz

This creates a bootstrap directory with bootstrap.sh, bootstrap.ipk, ipkg.ipk, openssl.ipk and wget-ssl.ipk.

Issuing bootstrap.sh will fail at some point because of conflicting /opt/libc* files. Anyway, start the script and remove the libraries after the script has failed:

 
sh bootstrap.sh
rm /opt/lib/libc*

Then install the other ipkg-files:

 
/opt/bin/ipkg install openssl.ipk
/opt/bin/ipkg install wget-ssl.ipk

Finally create the file /opt/etc/ipkg/cross-feed.conf with the following contents (one line):

 
src/gz cross http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/stable

Now ipkg should behave normally.

N.B. You might want to read the bootstrap.sh script to see if I forgot something here. Plus, I had more conflicting libraries which are /opt/lib/libpthread* and /opt/lib/libnss_files*. I removed these as well.


root passwd and 2.0.1 - 3.0368 firmware

As said by Philippe Kehl http://oinkzwurgl.org/software/ssods in http://oinkzwurgl.org/dl.php?file=syno-telnet-r3.zip, root password is the same that admin password.

Bootstrap procedure given by flipflip is still ok. The openssh server is back !


After tinkering a bit with the (brilliant) v2.0.1-.3.0371 firmware for DS101 it seems a lot of the nslu-only optware packages work nicely (though they are not available in ipkg for ds101). I have successfully installed libstdc++, php, unrar , rtorrent and many other packages. Download the packages from the nslu-list and manually install using 'ipkg install <filename>'

Be warned: there might be a lot of dependencies - read the descriptions on each package, and double-check if that package is available as DS101 optware using 'ipkg list | grep <package name>'.


I was trying to install bootstrap ds101-bootstrap_1.0-4_armeb.xsh on DS101j Firmware v2.0.3 - 0428. It is NOT working.

This fixed my problem: http://tech.groups.yahoo.com/group/ds101-linux/message/1086 Just added /lib in /etc/ld.so.conf


ds101-bootstrap_1.0-4_armeb.xsh tested on ds-101j firmware DSM 2.0-0640 with success.

But do not forget to add "/lib" at the beginning of /etc/ld.so.conf then run ldconfig BEFORE rebooting

It seems to work fine and ipkg works well.


I have installed the bootstrap on a ds101 (FW 2.0.1 - 3.0371) and got into the following troubles. After successfully installing the bootstrap, installing some other packages (bash, mc, openssh, openssh-sftp-server, sudo, man, man-pages) and performing "ipkg update" and "ipkg upgrade", most of the ds-101 services (e.g. samba) failed to run. The administration web interface was also unable to run.

Trying to start samba by the command "/usr/syno/etc/rc.d/S80samba.sh start" lead to "/usr/syno/sbin/smbd: relocation error: /lib/libgpl.so: symbol __floatsisf, version GCC_3.0 not defined in file libgcc_s.so.1 with link time reference"

Olivers hint (see http://tech.groups.yahoo.com/group/ds101-linux/message/1086) solved the problem for me.

I've just added "/lib" as FIRST line into /etc/ld.so.conf which now looks like this:

 
 /lib
 /opt/lib

Then a "ldconfig" followed by a "reboot" did the rest and all ds-101 services were up and runing.


I was unable to Bootstrap the DS407 (ARM processor). According to other articles on the internet the IPKG is not compatible with the DS407. The error which i recieve is "/opt/bin/ipkg: /opt/bin/ipkg: 1: Syntax error: word unexpected (expecting ")")" Ideas are welcome...


I’ve tried on Mac OS X and Win XP, but doesnt work!? I copy the bootstrap to public and un-tar it on the synobox (DS-106j; FW: 2.0.3 - 0458; BusyBox? v1.1.0 (2007.04.02-17:14+0000)).

“tar -xzvf /volume1/public/bootstrap-ppc.tar.gz root/.bash_profile root/.bashrc volume1/opt volume1/opt/src …”

create link: "ln -s /volume1/opt /opt"

update/upgrade ipkg: Configuring bash Configuring readline Successfully terminated. Collected errors: Warning: remove /bin/bash failed: No such file or directory

"PATH=/opt/bin:/opt/sbin:$PATH”

After re-login: -ash: ipkg: not found & missing the entries in $PATH

Can anybody help me?


I think this page isn't up to date. Where can I find the ds101-bootstrap_0.1-8_armeb.xsh ?

wget http://www.nslu2-linux.org/Makefile ; make optware-ds101 don't work anymore.

Can anybody help me?


I found this tutorial somewhere else: http://www.mpcclub.com/modules/Downloads/10steps_wizd_Synology.pdf(approve sites)

It contains ds101-bootstrap_0.1-8_armeb.xsh as well: http://www.mpcclub.com/modules/Downloads/wizd_synology.zip(approve sites)


This page is password protected.

The password is "ds101boot". Let's see if that stops the automated wiki spam.