NSLU2-Linux
view · edit · print · history

DebianSlug.OpenDebianSlug History

Hide minor edits - Show changes to markup

February 15, 2007, at 11:38 AM by fcarolo -- undo vandalism
Changed lines 1-277 from:

vuws besptkfh oqxjgidp agdhoflps fhkd gepvmh lprdgxk

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

February 14, 2007, at 11:50 PM by nfzeo xmhvr -- nfzeo xmhvr
Changed lines 1-277 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

to:

vuws besptkfh oqxjgidp agdhoflps fhkd gepvmh lprdgxk

November 28, 2006, at 01:05 PM by Phil -- revert spam
Changed lines 1-277 from:

<a href="http://za.20fr.com/phentermine-online">phentermine online</a> [URL=http://za.20fr.com/phentermine-online]phentermine online[/URL]

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

November 28, 2006, at 10:06 AM by Bill --
Changed lines 1-277 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

to:

<a href="http://za.20fr.com/phentermine-online">phentermine online</a> [URL=http://za.20fr.com/phentermine-online]phentermine online[/URL]

November 25, 2006, at 04:30 AM by fcarolo -- revert spam
Changed lines 1-277 from:

<a href="http://za.20fr.com/buy-phentermine">buy phentermine</a> [URL=http://za.20fr.com/buy-phentermine]buy phentermine[/URL]

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

November 24, 2006, at 10:27 PM by Helga --
Changed lines 1-277 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

to:

<a href="http://za.20fr.com/buy-phentermine">buy phentermine</a> [URL=http://za.20fr.com/buy-phentermine]buy phentermine[/URL]

November 21, 2006, at 01:45 PM by PatrickvdP -- Removed spam
Changed lines 1-277 from:

<a href="http://za.20fr.com/buy-phentermine">buy phentermine</a> [URL=http://za.20fr.com/buy-phentermine]buy phentermine[/URL]

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

November 21, 2006, at 12:32 PM by Hillary --
Changed lines 1-277 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

to:

<a href="http://za.20fr.com/buy-phentermine">buy phentermine</a> [URL=http://za.20fr.com/buy-phentermine]buy phentermine[/URL]

November 12, 2006, at 02:55 PM by Steve G -- Undo spam
Changed lines 1-277 from:

<a href="http://buy-phentermine.vserpi.com">buy phentermine</a> [URL=http://buy-phentermine.vserpi.com]buy phentermine[/URL]

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

November 12, 2006, at 06:23 AM by Hillary --
Changed lines 1-277 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

Relevant information should be moved from here to the main DebianSlug area.

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

If you install Debian on your slug, please add your name to this page.

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

The manual steps required to do this are as follows:

  1. Install OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
  4. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz
  5. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  6. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
  8. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf etc/resolv.conf
    cp /etc/hosts etc/hosts
    cp /etc/hostname etc/hostname
    cp /etc/defaultdomain etc/defaultdomain
  9. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  10. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
  11. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository.
    comment out the current repositories by adding a # in front of them
    then add: deb http://ftp.armeb.net/debian sarge main
    use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository
  12. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
    [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
  13. Set the root password so you can get in when you SSH into it after reboot: passwd
  14. Go back to flash rootfs: exit
  15. Unmount proc from /mnt: umount /mnt/proc
  16. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.
  17. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)

    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
    (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

    (Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
    Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
    Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
    ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
    out of the way, e.g. by changing the filenames to start with a lowercase letter.
    # mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
    # mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
    # mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
    # mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
    You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )
  18. Reboot the system to start Debian: shutdown -r now
  19. Upon startup of debian, SSH into it and start installing...

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

  1. Run tzconfig to set up the proper timezone (UT by default)
  2. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
  3. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
    You can read more on the Debonaras wiki

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0

(:tableend:)

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
  4. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  5. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  6. Chroot to the NFS root:
    chroot /mnt
  7. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  8. Set the root password:
    passwd
  9. Go back to flash rootfs: exit
  10. Unmount proc: umount /mnt/proc
  11. Unmount the NFS share: umount /mnt
  12. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  13. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }

(:tableend:)

  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 deb http://ftp.armeb.net/debian sarge main

(:tableend:)

  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

to:

<a href="http://buy-phentermine.vserpi.com">buy phentermine</a> [URL=http://buy-phentermine.vserpi.com]buy phentermine[/URL]

June 11, 2006, at 05:09 AM by rwhitby --
Added lines 3-4:

Relevant information should be moved from here to the main DebianSlug area.

June 11, 2006, at 05:08 AM by rwhitby --
Changed lines 1-2 from:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and DebianSlug/Bootstrap to the official Debian arm little-endian distribution.

to:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and Bootstrap to the official Debian arm little-endian distribution.

June 11, 2006, at 05:08 AM by rwhitby --
Added lines 1-2:

OpenDebianSlug is obsolete. Use the DebianSlug firmware and DebianSlug/Bootstrap to the official Debian arm little-endian distribution.

June 06, 2006, at 06:07 PM by MVM -- Have to stop Exim4 when umount /mnt
Changed line 48 from:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd.

to:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd. [MVM:] I also had to kill the exim4 process.

May 20, 2006, at 11:30 PM by PP --
Changed lines 42-43 from:

(Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.) ([PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.)

to:

(Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
[PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.

May 20, 2006, at 11:29 PM by PP --
Changed line 43 from:
 [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
to:

([PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.)

May 20, 2006, at 11:27 PM by PP --
Changed line 43 from:

[PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.

to:
 [PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.
May 20, 2006, at 11:26 PM by PP -- warning about upgrading in chroot
Added line 43:

[PP:] Upgrading might result in all manner of processes running from /mnt that need to be killed later!! You might just choose apt-get update followed by apt-get install ssh and do the upgrades and installing anacron + popularity-contest after rebooting.

May 20, 2006, at 11:19 PM by PP -- also klogd
Changed line 47 from:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [Peter] I also had to kill the latest syslogd (?)

to:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [PP:] I also had to kill syslogd and klogd.

May 03, 2006, at 03:39 PM by Jim Drash -- ftp.deboraras.org is deprecated. Replaced by ftp.armeb.net
Changed line 13 from:

cd /mnt ; wget http://ftp.debonaras.org/sarge/rootfs/nslu2-sarge-0.2.tar.gz

to:

cd /mnt ; wget http://ftp.armeb.net/other/rootfs/nslu2-sarge-0.2.tar.gz

Changed line 33 from:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/sarge/debian repository. \\
to:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.armeb.net/debian repository. \\
Changed lines 35-36 from:

then add: deb http://ftp.debonaras.org/sarge/debian sarge main
use "deb http://armeb.debian.net/debian-armeb sid main contrib override" for unstable repository

to:

then add: deb http://ftp.armeb.net/debian sarge main
use "deb http://ftp.armeb.net/debian sid main contrib override" for unstable repository

Changed line 219 from:
  • Rather than the package repository announced by Lennert, you should now use ftp.debonaras.org. Edit the file /etc/apt/sources.list to look like:
to:
  • Rather than the package repository announced by Lennert, you should now use ftp.armeb.net. Edit the file /etc/apt/sources.list to look like:
Changed line 222 from:
 deb http://ftp.debonaras.org/sarge/debian sarge main
to:
 deb http://ftp.armeb.net/debian sarge main
March 30, 2006, at 05:50 PM by Joe Jones --
Added line 66:

Comment:The SLUg? status light will continue to flash until you perform dpkg-reconfigure exim4-config, so if you can't ssh straight away, give it a moment to finish booting

March 29, 2006, at 09:40 PM by Joe Jones -- Remove top headers...no issues with install process - added unstable repository
Deleted lines 0-4:

DO NOT FOLLOW THESE INSTRUCTIONS - They do not work properly and will cause your SLUG not to boot!

Comment: I followed those instructions as described beneath, and the things went fine. BTW, at everytime you could boot the slug without a hd attached, and figure out what causes boot problems.

Added line 36:

use "deb http://armeb.debian.net/debian-armeb sid main contrib override" for unstable repository

March 29, 2006, at 07:55 PM by caplink811 -- add a comment
Deleted lines 0-1:
Changed lines 3-5 from:
to:

Comment: I followed those instructions as described beneath, and the things went fine. BTW, at everytime you could boot the slug without a hd attached, and figure out what causes boot problems.

March 28, 2006, at 07:50 PM by HH --
Added lines 2-5:

DO NOT FOLLOW THESE INSTRUCTIONS - They do not work properly and will cause your SLUG not to boot!

March 25, 2006, at 03:40 PM by HH --
Changed lines 1-3 from:

DO NOT FOLLOW THIS...CURRENTLY APT-GET PACKAGE INSTALLS DON'T WORK PROPERLY!

to:
March 25, 2006, at 02:59 PM by HH -- CURRENTLY APT-GET PACKAGE INSTALLS DON\'T WORK PROPERLY
Added lines 1-3:

DO NOT FOLLOW THIS...CURRENTLY APT-GET PACKAGE INSTALLS DON'T WORK PROPERLY!

March 02, 2006, at 01:34 AM by NitroAir --
Changed line 18 from:

[beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.\\

to:

[beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.

March 02, 2006, at 01:33 AM by NitroAir -- oops
Deleted line 18:

[nitroair] I believe the line mv nslu2-sarge-0.2/* . should be mv nslu2-sarge-0.2/* ..

March 02, 2006, at 01:32 AM by NitroAir -- edit from . to ..
Changed line 16 from:

mv nslu2-sarge-0.2/* . \\

to:

mv nslu2-sarge-0.2/* .\\

Changed lines 18-19 from:

[beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.

to:

[beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
[nitroair] I believe the line mv nslu2-sarge-0.2/* . should be mv nslu2-sarge-0.2/* ..

January 26, 2006, at 02:28 PM by Stein -- Upgrading from OpenSlug to OpenDebianSlug
Changed lines 73-87 from:

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:
to:

Upgrading from a working OpenSlug to OpenDebianSlug

If you are converting from a working OpenSlug (with external disk root file system) to OpenDebianSlug and want to keep your data: Follow my amended instructions bellow:

Before you start it can be wise to do ipkg list_installed > mylist on the openslug to get a list of what programs to install once you have OpenDebianSlug up and running...
Step 1: You can skip turnup init as this has already been done.
Step 2: If you don't have a swap partion I recommend setting up a swap file (See step 11).
Step 3: To avoid your old openslug interfering with the debian root file system, I recommend moving all folders to a backup directory (and you can reuse some of your config files... :-)
Follow step 3
cd /mnt; mkdir backup
mv -r <dirname> backup/
You may leave the "home" dir and disregard the error message: mv: unable to rename `nslu2-sarge-0.2/home': Directory not empty. The rest of the files will be moved.
Step 7:
cp backup/etc/fstab etc/fstab
cp backup/etc/network/interface etc/network/interface
I didn't change etc/mailname.
Step 8: Use the files from your backup directory:
cp backup/etc/resolv.conf etc/resolv.conf
cp backup/etc/hosts etc/hosts
cp backup/etc/hostname etc/hostname
cp backup/etc/defaultdomain etc/defaultdomain
Step 11: Before you do step 11 we can setup a swap file if you don't have a swap partion. dd if=/dev/zero of=/var/swapfile bs=1024 count=131072 (creates a 128 mb file)
mkswap /var/swapfile
swapon /var/swapfile (Uses the file as swap :-)
edit/ create /etc/init.d/swapfile:

Changed lines 103-124 from:
  nfs.example.org:/fs/slug      /      nfs   defaults        0 0
to:
 #!/bin/sh
case "$1" in start) echo "* Starting swapfile..." swapon /var/swapfile echo "done." ;; stop) #Don't know if you need to stop it on shutdown... #echo "* Stoping swapfile..." #swapoff /var/swapfile #echo "done." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0
Added lines 126-153:

ln -s /etc/init.d/swapfile /etc/rcS.d/S100swapfile (starts swap at boot)
13: Before we exit we need to turn off the swap
swapoff /var/swapfile
Continue with step 13
God luck!

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

  nfs.example.org:/fs/slug      /      nfs   defaults        0 0

(:tableend:)

December 31, 2005, at 08:11 AM by mk --
Changed lines 160-162 from:
to:
  • To power down the slug by using the power button you have to change the /etc/inittab file (otherwise the system will only be rebooted):
    Replace the line
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
    by
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now
December 16, 2005, at 09:45 PM by Peter --
Changed lines 46-47 from:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [Peter] I also had to kill the latest syslogd (?)

to:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [Peter] I also had to kill the latest syslogd (?)

December 16, 2005, at 09:44 PM by Peter --
Changed lines 46-47 from:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful.

to:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful.

December 16, 2005, at 09:43 PM by Peter -- added kill syslogd
Changed lines 46-48 from:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful.

to:

[Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful. [Peter] I also had to kill the latest syslogd (?)

December 07, 2005, at 12:39 AM by ka6sox --
Changed lines 5-6 from:

It is also very important that you install and enable the popularity-contest package so that we can pprove we have enough users to enable armeb to become an official Debian supported architecture.

to:

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

November 28, 2005, at 01:28 PM by JimmyFergus -- how to include the loop kernel module for swap files over NFS
Added lines 99-102:
  1. If you will want to have a swap file over NFS (you probably will), install the loop kernel module. You need to get the package file and install it. e.g.:
    wget http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.7-beta/kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    ipkg install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
    rm install kernel-module-loop_2.6.12.2-r17.1_nslu2.ipk
November 23, 2005, at 04:11 AM by marcusb -- instructions for booting from NFS
Changed lines 5-6 from:

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

to:

It is also very important that you install and enable the popularity-contest package so that we can pprove we have enough users to enable armeb to become an official Debian supported architecture.

Changed lines 73-80 from:

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:
to:

Installing the root filesystem on NFS

You can also boot Debian from an NFS share. This can be useful for experiments and for diskless operation. You don't need to attach any disks to the slug, but you will need an NFS server, of course.

We assume the NFS server is nfs.example.org.

On the NFS server:

  1. Fetch the pre-built rootfs (see above).
  2. Extract it somewhere, let's say in /fs/slug.
  3. Add an entry for /fs/slug to /etc/exports, giving the slug read-write access. You need the no_root_squash option.
  4. Tell NFS to reload its configuration:
    exportfs -r
    or, on Debian systems:
    /etc/init.d/nfs-kernel-server reload
  5. Customize fstab, network/interfaces, mailname, resolv.conf, hosts, hostname and defaultdomain in the /fs/slug/etc directory (see below for examples). Note that the first line of fstab should now read something like:
Changed lines 90-105 from:
 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }
to:
  nfs.example.org:/fs/slug      /      nfs   defaults        0 0
Changed lines 92-131 from:
  • Rather than the package repository announced by Lennert, you should now use ftp.debonaras.org. Edit the file /etc/apt/sources.list to look like:
to:
  1. Edit etc/apt/sources.list to use the debonaras.org repository.

On the slug:

  1. Install OpenSlug and turnup init as usual.
  2. Mount the root filesystem:
    mount -o nolock nfs.example.org:/fs/slug /mnt
    I have found the nolock option to be necessary, possibly because OpenSlug does not have rpc.statd.
  3. Copy the Openslug kernel modules to the Debian tree:
    cd /mnt
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
  4. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  5. Chroot to the NFS root:
    chroot /mnt
  6. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install anacron popularity-contest
    apt-get install ssh
    Note that this will generate new SSH host keys.
  7. Set the root password:
    passwd
  8. Go back to flash rootfs: exit
  9. Unmount proc: umount /mnt/proc
  10. Unmount the NFS share: umount /mnt
  11. Make the NFS share be the root filesystem on startup:
    turnup nfs nfs.example.org:/fs/slug
  12. Boot Debian: reboot

From here, follow the rest of the procedure for the disk-based install.

Some info on use:

  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:
Changed lines 134-149 from:
 deb http://ftp.debonaras.org/sarge/debian sarge main
to:
 #
 # ProFTPd FTP daemon - http://www.proftpd.org
 #
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }
Changed lines 151-159 from:

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

to:
  • Rather than the package repository announced by Lennert, you should now use ftp.debonaras.org. Edit the file /etc/apt/sources.list to look like:
Changed lines 154-157 from:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0
to:
 deb http://ftp.debonaras.org/sarge/debian sarge main
Changed lines 158-161 from:

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

to:

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

Changed lines 167-169 from:
        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ
to:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap            swap    defaults        0  0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0
Changed lines 174-186 from:
to:

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ

(:tableend:)

November 20, 2005, at 03:09 PM by FredV -- hwclock problems
Changed lines 48-49 from:

(Note: be sure to have the system clock set right, the boot will fail if it's wrong). (As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

to:


(Note: be sure to have the system clock set right, the boot will fail if it's wrong).
(As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

(Note2: The problem seems to be in the hwclock command, which apparently can hang during boot.
Maybe it's related to this: http://www.nslu2-linux.org/wiki/HowTo/FixTheClockUsingAdjtimexAndNtpclient
Anyway, if manually setting the date doesn't help (box won't boot, no ping reply), reboot it without the hard disk attached,
ssh into the system, reattach the drive, mount it and move the respective start/stop scripts
out of the way, e.g. by changing the filenames to start with a lowercase letter.
# mv /mnt/etc/rcS.d/S18hwclockfirst.sh /mnt/etc/rcS.d/s18hwclockfirst.sh
# mv /mnt/etc/rcS.d/S50hwclock.sh /mnt/etc/rcS.d/s50hwclock.sh
# mv /mnt/etc/rc0.d/K25hwclock.sh /mnt/etc/rc0.d/k25hwclock.sh
# mv /mnt/etc/rc6.d/K25hwclock.sh /mnt/etc/rc6.d/k25hwclock.sh
You will likely want to set up something like ntpd or an ntpdate command through a crontab entry later. )

November 20, 2005, at 10:45 AM by geoff -- how to set the date
Changed line 33 from:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/sarge/debian repository.
to:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/sarge/debian repository. \\
Added line 49:

(As an example, to set the current time and date to July 31, 11:16pm, type ``date 07312316 (note that the time is given in 24 hour notation). If you wanted to change the year as well, you could type ``date 073123161998. )

November 20, 2005, at 10:34 AM by geoff -- fixed formating
Changed lines 34-35 from:

@@comment out the current repositories by adding a # in front of them @@then add: deb http://ftp.debonaras.org/sarge/debian sarge main

to:

comment out the current repositories by adding a # in front of them
then add: deb http://ftp.debonaras.org/sarge/debian sarge main \\

November 20, 2005, at 10:32 AM by geoff -- the respository supplied is wrong
Changed lines 33-35 from:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/ repository.
to:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/sarge/debian repository.

@@comment out the current repositories by adding a # in front of them @@then add: deb http://ftp.debonaras.org/sarge/debian sarge main

November 15, 2005, at 02:08 PM by Markus Fritsche -- Added note to set the sysclock right.
Changed lines 45-46 from:
  1. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)
to:
  1. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)
    (Note: be sure to have the system clock set right, the boot will fail if it's wrong).
November 02, 2005, at 07:21 AM by becol_be -- make leds react to runlevel changes
Changed lines 59-63 from:
  • To make the leds react to changes in runlevels, copy the init scripts:

@@cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/ and update the runlevel links @@update-rc.d zleds defaults 99 05 @@update-rc.d leds_startup defaults 01

to:
  • To make the leds react to changes in runlevels, copy the init scripts and update the runlevel links:
    cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/
    update-rc.d zleds defaults 99 05
    update-rc.d leds_startup defaults 01
November 02, 2005, at 07:14 AM by becol_be -- change leds on runlevel change
Added lines 59-63:
  • To make the leds react to changes in runlevels, copy the init scripts:

@@cp /initrd/etc/init.d/zleds /initrd/etc/init.d/leds_startup /etc/init.d/ and update the runlevel links @@update-rc.d zleds defaults 99 05 @@update-rc.d leds_startup defaults 01

October 31, 2005, at 09:36 AM by drone -- add link to debootstrap
Added lines 115-118:

debootstrap

For debootstrapping your debian from an already flashed openslug, have a look at Debonaras wiki

October 24, 2005, at 06:21 AM by skr -- use relative path
Changed lines 24-27 from:

cp /etc/resolv.conf /mnt/etc/resolv.conf
cp /etc/hosts /mnt/etc/hosts
cp /etc/hostname /mnt/etc/hostname
cp /etc/defaultdomain /mnt/etc/defaultdomain

to:

cp /etc/resolv.conf etc/resolv.conf
cp /etc/hosts etc/hosts
cp /etc/hostname etc/hostname
cp /etc/defaultdomain etc/defaultdomain

October 14, 2005, at 10:31 PM by attila -- run tzconfig to set time zone
Added line 48:
  1. Run tzconfig to set up the proper timezone (UT by default)
October 07, 2005, at 10:08 AM by rwhitby --
Added lines 5-6:

It is also very important that you install and enable the popularity-contest package so that we can prove we have enough users to enable armeb to become an official Debian supported architecture.

October 04, 2005, at 07:48 PM by Joakim --
Changed lines 41-42 from:
  1. Unmount the drive so the next command will work: umount /mnt
to:
  1. Unmount the drive so the next command will work: umount /mnt
    [Joakim] I had to kill the running anacron process, started earlier by the apt-get install anacron command, for the umount to be successful.
October 01, 2005, at 06:01 PM by tiboo -- typo
Changed lines 115-117 from:

Or if you wish to leverage the native configure enviornment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

to:

Or if you wish to leverage the native configure environment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

September 29, 2005, at 02:59 PM by rwhitby --
Changed lines 47-49 from:
to:
  1. Report the existence of your new armeb Debian machine:
    /etc/cron.weekly/popularity-contest
September 29, 2005, at 02:57 PM by rwhitby --
Changed lines 45-47 from:
to:
  1. Make sure you reconfigure exim4:
    dpkg-reconfigure exim4-config
September 29, 2005, at 02:53 PM by rwhitby --
Added line 35:

apt-get install anacron popularity-contest \\

September 29, 2005, at 02:49 PM by rwhitby --
Changed line 20 from:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples).
to:
  1. Edit /mnt/etc/fstab, /mnt/etc/network/interfaces and /etc/mailname (see below for examples).
September 27, 2005, at 01:43 AM by buytenh -- Move everything over to ftp.debonaras.org.
Changed line 11 from:

cd /mnt ; wget http://debian.nslu2-linux.org/nslu2-sarge-0.2.tar.gz

to:

cd /mnt ; wget http://ftp.debonaras.org/sarge/rootfs/nslu2-sarge-0.2.tar.gz

Changed line 31 from:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org repository.
to:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org/ repository.
Changed line 73 from:
 deb http://ftp.debonaras.org/debian sarge main
to:
 deb http://ftp.debonaras.org/sarge/debian sarge main
September 25, 2005, at 11:13 PM by bakotaco -- typo
Changed lines 22-23 from:

cp /etc/resolv.conf
/mnt/etc/resolv.conf \\

to:

cp /etc/resolv.conf /mnt/etc/resolv.conf \\

September 25, 2005, at 10:56 PM by bakotaco -- prettified the layour
Changed lines 10-12 from:
  1. Fetch the pre-built rootfs and put it on the drive: cd /mnt ; wget http://debian.nslu2-linux.org/nslu2-sarge-0.2.tar.gz
  2. Extract it: tar zxf nslu2-sarge-0.2.tar.gz ; mv nslu2-sarge-0.2/* . ; rmdir nslu2-sarge-0.2 [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  3. Copy the Openslug kernel modules to the Debian tree: cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
to:
  1. Fetch the pre-built rootfs and put it on the drive:
    cd /mnt ; wget http://debian.nslu2-linux.org/nslu2-sarge-0.2.tar.gz
  2. Extract it:
    tar zxf nslu2-sarge-0.2.tar.gz
    mv nslu2-sarge-0.2/* .
    rmdir nslu2-sarge-0.2
    [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
  3. Copy the Openslug kernel modules to the Debian tree:
    cp -Ra /lib/modules/* lib/modules
    cp /etc/modprobe.conf etc
Changed lines 21-23 from:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /mnt/etc/resolv.conf ; cp /etc/hosts /mnt/etc/hosts ; cp /etc/hostname /mnt/etc/hostname ; cp /etc/defaultdomain /mnt/etc/defaultdomain.
  2. Mount proc on /mnt/proc in order to be able to use the network: mount -t proc proc /mnt/proc
  3. Chroot to the external drive to make changes to it using Debian programs: cd / ; chroot /mnt
to:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug:
    cp /etc/resolv.conf
    /mnt/etc/resolv.conf
    cp /etc/hosts /mnt/etc/hosts
    cp /etc/hostname /mnt/etc/hostname
    cp /etc/defaultdomain /mnt/etc/defaultdomain
  2. Mount proc on /mnt/proc in order to be able to use the network:
    mount -t proc proc /mnt/proc
  3. Chroot to the external drive to make changes to it using Debian programs:
    cd /
    chroot /mnt
Changed lines 33-37 from:
  1. Get the latest package list, upgrade and install SSH for login: apt-get update ; apt-get dist-upgrade ; apt-get install ssh (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
to:
  1. Get the latest package list, upgrade and install SSH for login:
    apt-get update
    apt-get dist-upgrade
    apt-get install ssh
    (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
September 23, 2005, at 12:17 PM by Drone -- Added link to Debonaras.org
Changed lines 27-28 from:
to:
You can read more on the Debonaras wiki
September 22, 2005, at 10:56 PM by Eric Nelson -- added -f arg to the interfaces file to supress tainting of the kernel stuff causing failed boot
Changed lines 80-81 from:
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
to:
        pre-up modprobe -f ixp425_eth
        pre-up modprobe -f ixp400
September 22, 2005, at 08:12 PM by Phil Endecott -- Link to new printing page
Changed lines 87-88 from:

Cross-compilation

to:

Cross-compilation

Changed lines 91-96 from:

Or if you wish to leverage the native configure enviornment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

to:

Or if you wish to leverage the native configure enviornment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

Printing

Printing to a USB printer using CUPS is described on the Printing page. A similar approach will be required for other tasks that need additional kernel modules.

September 21, 2005, at 03:15 AM by dyoung --
Added lines 90-91:

Or if you wish to leverage the native configure enviornment with the speed of CrossCompiling, see UseDistCCWithCrossCompiler .

September 19, 2005, at 09:37 PM by beewoolie --
Changed line 11 from:
  1. Extract it: tar zxf nslu2-sarge-0.2.tar.gz ; mv nslu2-sarge-0.2/* . ; rmdir nslu2-sarge-0.2
to:
  1. Extract it: tar zxf nslu2-sarge-0.2.tar.gz ; mv nslu2-sarge-0.2/* . ; rmdir nslu2-sarge-0.2 [beewoolie] If you end up using a tar other than the busybox version, you may encounter some warnings about the time stamps being in the future. You can suppress these warnings by adding the 'm' switch to the tar command: tar zmxf and so on.
September 19, 2005, at 09:06 AM by rwhitby --
Changed line 17 from:
  1. Edit /etc/apt/sources.list (see below) to use the debonaras.org repository.
to:
  1. Edit /etc/apt/sources.list (see below) to use the http://ftp.debonaras.org repository.
Changed line 51 from:
  • Rather than the package repository announced by Lennert, you should now use packages.debonaras.org. Edit the file /etc/apt/sources.list to look like:
to:
  • Rather than the package repository announced by Lennert, you should now use ftp.debonaras.org. Edit the file /etc/apt/sources.list to look like:
Changed line 54 from:
 deb http://packages.debonaras.org/debian sarge main
to:
 deb http://ftp.debonaras.org/debian sarge main
September 17, 2005, at 03:00 PM by buytenh -- add link to OpenDebianSlugUsers page
Added lines 3-4:

If you install Debian on your slug, please add your name to this page.

September 14, 2005, at 09:02 AM by rwhitby --
Changed lines 74-75 from:

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

to:

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and insert the following lines after the line starting with "iface eth0 inet" (make sure you copy in your own ethernet MAC address from the sticker on the bottom of your slug):

Added line 80:
        pre-up ifconfig eth0 hw ether 00:04:5A:XX:YY:ZZ
September 14, 2005, at 04:31 AM by ka6sox --
Changed line 12 from:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf mnt/etc/resolv.conf ; cp /etc/hosts mnt/etc/hosts ; cp /etc/hostname mnt/etc/hostname ; cp /etc/defaultdomain mnt/etc/defaultdomain.
to:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /mnt/etc/resolv.conf ; cp /etc/hosts /mnt/etc/hosts ; cp /etc/hostname /mnt/etc/hostname ; cp /etc/defaultdomain /mnt/etc/defaultdomain.
September 14, 2005, at 04:26 AM by ka6sox --
Changed line 12 from:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
to:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf mnt/etc/resolv.conf ; cp /etc/hosts mnt/etc/hosts ; cp /etc/hostname mnt/etc/hostname ; cp /etc/defaultdomain mnt/etc/defaultdomain.
September 12, 2005, at 08:56 PM by Phil Endecott -- Correct link
Changed line 86 from:

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompilation?.

to:

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompiling.

September 12, 2005, at 08:55 PM by Phil Endecott -- Link to CrossCompilation page
Added lines 83-86:

Cross-compilation

If you want to cross-compile programs for your OpenDebianSlug, see CrossCompilation?.

September 11, 2005, at 05:58 PM by Phil Endecott -- Can use \"turnup memstick\"
Changed line 21 from:
  1. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3
to:
  1. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3 (or turnup memstick with the same args if you're using a USB flash device)
September 11, 2005, at 05:57 PM by Phil Endecott -- Aargh wiki syntax snaffu
Changed lines 16-17 from:
  1. Get the latest package list, upgrade and install SSH for login: apt-get update ; apt-get dist-upgrade ; apt-get install ssh

(Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)

to:
  1. Get the latest package list, upgrade and install SSH for login: apt-get update ; apt-get dist-upgrade ; apt-get install ssh (Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)
September 11, 2005, at 05:55 PM by Phil Endecott -- Note SSH host keys will change
Added line 17:

(Note that this will generate new ssh host keys, replacing the ones that OpenSlug's ssh was using, which will make your ssh client complain when you reconnect later.)

September 11, 2005, at 05:53 PM by Phil Endecott -- Remove spurious /mnt
Changed line 12 from:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
to:
  1. Copy the existing /etc/resolv.conf, /etc/hosts, /etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
September 06, 2005, at 05:55 AM by PP -- Change sources before apt
Added line 15:
  1. Edit /etc/apt/sources.list (see below) to use the debonaras.org repository.
September 06, 2005, at 05:50 AM by PP -- using proc on chroot-environment
Changed line 13 from:
  1. Mount proc on /mnt/proc in order to be able to use the network: @@mount -t proc proc /mnt/proc
to:
  1. Mount proc on /mnt/proc in order to be able to use the network: mount -t proc proc /mnt/proc
Changed line 18 from:
  1. Unmount proc from /mnt: @@umount /mnt/proc
to:
  1. Unmount proc from /mnt: umount /mnt/proc
September 06, 2005, at 05:49 AM by PP --
Added line 13:
  1. Mount proc on /mnt/proc in order to be able to use the network: @@mount -t proc proc /mnt/proc
Added line 18:
  1. Unmount proc from /mnt: @@umount /mnt/proc
September 05, 2005, at 12:01 PM by PinguTux -- Fix Table Layout
Changed line 63 from:
 /dev/sda2       swap    swap    defaults        0       0
to:
 /dev/sda2       swap            swap    defaults        0  0
September 02, 2005, at 03:09 PM by ingeba --
Changed lines 11-12 from:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf, /etc/hosts, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
to:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples).
  2. Copy the existing /etc/resolv.conf, /etc/hosts, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
September 02, 2005, at 03:08 PM by ingeba -- Host file for local host name lookup
Changed line 11 from:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hostname /etc/defaultdomain /mnt/etc.
to:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf, /etc/hosts, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hosts /etc/hostname /etc/defaultdomain /mnt/etc.
September 02, 2005, at 03:07 PM by ingeba -- Hostname copy from Openslug
Changed line 11 from:
  1. Edit /mnt/etc/fstab, /mnt/etc/hostname and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf and /etc/defaultdomain (if present) from Openslug: cp /etc/resolv.conf /etc/defaultdomain /mnt/etc.
to:
  1. Edit /mnt/etc/fstab and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf, /mnt/etc/hostname and /etc/defaultdomain (should be present) from Openslug: cp /etc/resolv.conf /etc/hostname /etc/defaultdomain /mnt/etc.
September 02, 2005, at 02:06 PM by ingeba -- Info on /etc/defaultdomain
Changed line 11 from:
  1. Edit /mnt/etc/fstab, /mnt/etc/hostname and /mnt/etc/network/interfaces (see below for examples). Copy the existing resolv.conf from Openslug: cp /etc/resolv.conf /mnt/etc.
to:
  1. Edit /mnt/etc/fstab, /mnt/etc/hostname and /mnt/etc/network/interfaces (see below for examples). Copy the existing /etc/resolv.conf and /etc/defaultdomain (if present) from Openslug: cp /etc/resolv.conf /etc/defaultdomain /mnt/etc.
September 02, 2005, at 01:55 PM by ingeba -- New repo URL
Changed lines 23-25 from:
  1. With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  2. Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  3. If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:
to:
  • With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
  • Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
  • If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:
Changed lines 45-52 from:

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

to:
  • Rather than the package repository announced by Lennert, you should now use packages.debonaras.org. Edit the file /etc/apt/sources.list to look like:
Changed lines 48-51 from:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap    swap    defaults        0       0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0
to:
 deb http://packages.debonaras.org/debian sarge main
Changed lines 52-55 from:

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

to:

Some working config files

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

Changed lines 61-62 from:
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
to:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap    swap    defaults        0       0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0
Added lines 68-78:

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400

(:tableend:)

August 30, 2005, at 07:41 PM by ingeba -- Removed sample interfaces files as a modded Openslug one would do
Changed lines 49-51 from:

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB).

/etc/fstab:

to:

/etc/fstab

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB). Just add further data partitions:

Changed lines 61-63 from:

I use DHCP for network settings:

/etc/network/interfaces:

to:

/etc/network/interfaces

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

Deleted lines 67-83:
 # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
 # /usr/share/doc/ifupdown/examples for more information.
 # /etc/network/interfaces
 # configuration file for ifup(8), ifdown(8)
 #
 # The loopback interface
 auto lo
 iface lo inet loopback
 #
 # The NSLU2 built-in ethernet
 auto eth0
 # Automatically generated from /etc/default/sysconf
 # The pre-up option must always be supplied, regardless
 # of configuration, to set the hardware correctly.
 # Severe network problems may result if this option is
 # removed.
 iface eth0 inet dhcp
Deleted lines 69-70:
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77
Changed lines 72-96 from:

You can also use static network settings:

Note: XX:XX:XX:XX:XX:XX is your MAC address which is on your slug, often starts with 00:0F:66:...

/etc/network/interfaces (modification to above): (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 iface eth0 inet static
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77
        netmask 255.255.255.0
        gateway 192.168.1.1

(:tableend:)

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400

(:tableend:)

to:
August 30, 2005, at 07:38 PM by ingeba --
Changed line 25 from:
  1. If installing proftpd with xinetd, add the following file to /etc/xinetd.d/proftpd
to:
  1. If installing proftpd with xinetd, create the file /etc/xinetd.d/proftpd with the content:
Changed line 29 from:
 # ProFTPd? FTP daemon - http://www.proftpd.org
to:
 # ProFTPd FTP daemon - http://www.proftpd.org
Changed lines 104-105 from:

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line staring with iface eth0 inet:

to:

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line starting with "iface eth0 inet":

August 30, 2005, at 07:36 PM by ingeba -- Info on copying and modifying the interfaces file from Openslug
Changed lines 25-30 from:

Some working config files

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB).

/etc/fstab:

to:
  1. If installing proftpd with xinetd, add the following file to /etc/xinetd.d/proftpd
Deleted lines 27-41:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap    swap    defaults        0       0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

I use DHCP for network settings:

/etc/network/interfaces: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
 # /usr/share/doc/ifupdown/examples for more information.
 # /etc/network/interfaces
 # configuration file for ifup(8), ifdown(8)
Changed lines 29-31 from:
 # The loopback interface
 auto lo
 iface lo inet loopback
to:
 # ProFTPd? FTP daemon - http://www.proftpd.org
Changed lines 31-42 from:
 # The NSLU2 built-in ethernet
 auto eth0
 # Automatically generated from /etc/default/sysconf
 # The pre-up option must always be supplied, regardless
 # of configuration, to set the hardware correctly.
 # Severe network problems may result if this option is
 # removed.
 iface eth0 inet dhcp
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77
to:
 service ftp
 {
       flags            = REUSE
       socket_type      = stream
       instances        = 30
       wait             = no
       user             = root
       server           = /usr/sbin/proftpd
       server_args      = --config /etc/proftpd.conf
       log_on_success   = HOST PID
       log_on_failure   = HOST
       disable          = no
 }
Changed lines 46-50 from:

You can also use static network settings:

Note: XX:XX:XX:XX:XX:XX is your MAC address which is on your slug, often starts with 00:0F:66:...

/etc/network/interfaces (modification to above):

to:

Some working config files

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB).

/etc/fstab:

Changed lines 54-60 from:
 iface eth0 inet static
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77
        netmask 255.255.255.0
        gateway 192.168.1.1
to:
 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap    swap    defaults        0       0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0
Changed lines 60-61 from:
to:

I use DHCP for network settings:

/etc/network/interfaces: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
 # /usr/share/doc/ifupdown/examples for more information.
 # /etc/network/interfaces
 # configuration file for ifup(8), ifdown(8)
 #
 # The loopback interface
 auto lo
 iface lo inet loopback
 #
 # The NSLU2 built-in ethernet
 auto eth0
 # Automatically generated from /etc/default/sysconf
 # The pre-up option must always be supplied, regardless
 # of configuration, to set the hardware correctly.
 # Severe network problems may result if this option is
 # removed.
 iface eth0 inet dhcp
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77

(:tableend:)

You can also use static network settings:

Note: XX:XX:XX:XX:XX:XX is your MAC address which is on your slug, often starts with 00:0F:66:...

/etc/network/interfaces (modification to above): (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 iface eth0 inet static
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
        address 192.168.1.77
        netmask 255.255.255.0
        gateway 192.168.1.1

(:tableend:)

In general, since you could wget the OpenDebianSlug rootfs, you know your Openslug network setting are correct. You can then just copy the /etc/network/interfaces file from OpenSlug and instert the following two lines after the line staring with iface eth0 inet:

(:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400

(:tableend:)

August 29, 2005, at 03:17 AM by g2 -- Add MAC addr
Added line 63:
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
Added lines 69-70:

Note: XX:XX:XX:XX:XX:XX is your MAC address which is on your slug, often starts with 00:0F:66:...

Added line 77:
        pre-up ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
August 29, 2005, at 01:03 AM by rwhitby --
Added lines 65-80:

You can also use static network settings:

/etc/network/interfaces (modification to above): (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 iface eth0 inet static
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        address 192.168.1.77
        netmask 255.255.255.0
        gateway 192.168.1.1

(:tableend:)

August 28, 2005, at 10:55 PM by buytenh -- /var/preserve is in the prebuilt filesystem
Deleted line 23:
  1. To prevent vi from complaining on startup about missing recovery dir: mkdir /var/preserve
August 28, 2005, at 10:54 PM by buytenh -- instruct user to set hostname in /etc/hostname
Changed line 11 from:
  1. Edit /mnt/etc/network/interfaces and /mnt/etc/fstab (see below for examples). Copy the existing resolv.conf from Openslug: cp /etc/resolv.conf /mnt/etc.
to:
  1. Edit /mnt/etc/fstab, /mnt/etc/hostname and /mnt/etc/network/interfaces (see below for examples). Copy the existing resolv.conf from Openslug: cp /etc/resolv.conf /mnt/etc.
Deleted line 22:
  1. The hostname is not preserved - set it manually: hostname myslugname
August 28, 2005, at 10:53 PM by buytenh -- module-init-tools is included by default now
Changed line 13 from:
  1. Get the latest package list, upgrade and install SSH for login and module tools so the network can be started: apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
to:
  1. Get the latest package list, upgrade and install SSH for login: apt-get update ; apt-get dist-upgrade ; apt-get install ssh
August 28, 2005, at 10:51 PM by buytenh -- change name of repo server and tarball (nslu2-sarge-0.2)
Changed lines 8-9 from:
  1. Fetch the pre-built rootfs and put it on the drive: cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  2. Extract it: tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
to:
  1. Fetch the pre-built rootfs and put it on the drive: cd /mnt ; wget http://debian.nslu2-linux.org/nslu2-sarge-0.2.tar.gz
  2. Extract it: tar zxf nslu2-sarge-0.2.tar.gz ; mv nslu2-sarge-0.2/* . ; rmdir nslu2-sarge-0.2
August 28, 2005, at 09:53 PM by ingeba --
Deleted line 64:
        pre-up ifconfig eth0 hw ether 00:0F:66:7F:0A:B9
August 28, 2005, at 09:52 PM by ingeba --
Changed line 11 from:
  1. Edit /mnt/etc/network/interfaces and /mnt/etc/resolv.conf and /mnt/etc/fstab
to:
  1. Edit /mnt/etc/network/interfaces and /mnt/etc/fstab (see below for examples). Copy the existing resolv.conf from Openslug: cp /etc/resolv.conf /mnt/etc.
August 28, 2005, at 09:50 PM by ingeba --
Changed line 9 from:
  1. Extact it: tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
to:
  1. Extract it: tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
August 28, 2005, at 09:49 PM by ingeba -- Added sample fstab and interfaces
Changed line 7 from:
  1. Mount the external storage root partition as /mnt, in this example we use /dev/sda2
to:
  1. Mount the external storage root partition as /mnt, in this example we use /dev/sda1: mount /dev/sda1 /mnt
Changed line 17 from:
  1. Make external drive rootfs on startup: turnup disk /dev/sda2 -t ext3
to:
  1. Make external drive rootfs on startup: turnup disk /dev/sda1 -t ext3
Changed lines 28-29 from:
to:

Some working config files

I have divided my disk into 2 partitions: root (~10GB) and swap (256MB).

/etc/fstab: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 /dev/sda1       /               ext3    defaults        1  1
 /dev/sda2       swap    swap    defaults        0       0
 proc            /proc           proc    defaults        0  0
 usbfs           /proc/bus/usb   usbfs   defaults        0  0

(:tableend:)

I use DHCP for network settings:

/etc/network/interfaces: (:table border=0 width=100% bgcolor=#eeffee:) (:cell:)

 # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
 # /usr/share/doc/ifupdown/examples for more information.
 # /etc/network/interfaces
 # configuration file for ifup(8), ifdown(8)
 #
 # The loopback interface
 auto lo
 iface lo inet loopback
 #
 # The NSLU2 built-in ethernet
 auto eth0
 # Automatically generated from /etc/default/sysconf
 # The pre-up option must always be supplied, regardless
 # of configuration, to set the hardware correctly.
 # Severe network problems may result if this option is
 # removed.
 iface eth0 inet dhcp
        pre-up modprobe ixp425_eth
        pre-up modprobe ixp400
        pre-up ifconfig eth0 hw ether 00:0F:66:7F:0A:B9
        address 192.168.1.77

(:tableend:)

August 28, 2005, at 09:36 PM by ingeba --
Changed lines 8-9 from:
  1. cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  2. tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
to:
  1. Fetch the pre-built rootfs and put it on the drive: cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  2. Extact it: tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
Deleted line 10:
  1. Copy the LED-program to Debian: cp /sbin/leds sbin (this will later be supplemented with device creation and use of LED settings in the startup scripts)
Changed lines 26-28 from:
to:
  1. Copy the LED-program to Debian and make the LED device: cp /initrd/sbin/leds /sbin; mknod /dev/leds c 126 0; chmod 660 /dev/leds (this will later be supplemented by the use of LED settings in the startup scripts). Try experimenting by typing leds and see the power LED go from blinking yellow to steady green.
August 28, 2005, at 09:21 PM by ingeba --
Changed lines 26-29 from:
to:
  1. To prevent vi from complaining on startup about missing recovery dir: mkdir /var/preserve
August 28, 2005, at 09:17 PM by ingeba -- xterm settings for putty
Changed lines 20-26 from:
  1. Upon startup of debian, SSH into it and set the hostname: hostname myslugname
to:
  1. Upon startup of debian, SSH into it and start installing...

Some info on use:

  1. The hostname is not preserved - set it manually: hostname myslugname
  2. With Putty as SSH client, you can use xterm-color instead of xterm-pcolor as terminal type.
August 28, 2005, at 09:09 PM by ingeba -- More verbose info. Added root passwd setting and hostname info
Changed lines 10-11 from:
  1. cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
to:
  1. Copy the Openslug kernel modules to the Debian tree: cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
  2. Copy the LED-program to Debian: cp /sbin/leds sbin (this will later be supplemented with device creation and use of LED settings in the startup scripts)
Changed lines 13-22 from:
  1. cd /
  2. umount /mnt
  3. turnup disk /dev/sda2 -t ext3 ; chroot /mnt
  4. apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
  5. exit ; shutdown -r now
to:
  1. Chroot to the external drive to make changes to it using Debian programs: cd / ; chroot /mnt
  2. Get the latest package list, upgrade and install SSH for login and module tools so the network can be started: apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
  3. Set the root password so you can get in when you SSH into it after reboot: passwd
  4. Go back to flash rootfs: exit
  5. Unmount the drive so the next command will work: umount /mnt
  6. Make external drive rootfs on startup: turnup disk /dev/sda2 -t ext3
  7. Reboot the system to start Debian: shutdown -r now
  8. Upon startup of debian, SSH into it and set the hostname: hostname myslugname
August 28, 2005, at 05:30 PM by ingeba -- Typewriter fonts for input and info about /dev/sda2 being example
Changed lines 7-10 from:
  1. Mount the external storage root partition as /mnt
  2. cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  3. tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
  4. cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
to:
  1. Mount the external storage root partition as /mnt, in this example we use /dev/sda2
  2. cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  3. tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
  4. cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
Changed lines 12-21 from:
  1. cd /
  2. umount /mnt
  3. turnup disk /dev/sda2 -t ext3 ; chroot /mnt
  4. apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
  5. exit ; shutdown -r now
to:
  1. cd /
  2. umount /mnt
  3. turnup disk /dev/sda2 -t ext3 ; chroot /mnt
  4. apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
  5. exit ; shutdown -r now
August 28, 2005, at 05:26 PM by ingeba -- Added unmounting of disk rootfs prior to turnup
Changed lines 12-14 from:
  1. cd / ; turnup disk /dev/sda2 -t ext3 ; chroot /mnt
to:
  1. cd /
  2. umount /mnt
  3. turnup disk /dev/sda2 -t ext3 ; chroot /mnt
August 28, 2005, at 03:11 PM by rwhitby --
Changed line 11 from:
  1. Edit /mnt/etc/network/interfaces and /mnt/etc/resolv.conf
to:
  1. Edit /mnt/etc/network/interfaces and /mnt/etc/resolv.conf and /mnt/etc/fstab
August 28, 2005, at 02:03 PM by rwhitby --
Changed lines 13-16 from:
  1. apt-get update ; apt-get dist-upgrade ; apt-get install ssh
to:
  1. apt-get update ; apt-get dist-upgrade ; apt-get install ssh module-init-tools
  2. exit ; shutdown -r now
August 28, 2005, at 02:00 PM by rwhitby --
Changed lines 12-14 from:
to:
  1. cd / ; turnup disk /dev/sda2 -t ext3 ; chroot /mnt
  2. apt-get update ; apt-get dist-upgrade ; apt-get install ssh
August 28, 2005, at 01:56 PM by rwhitby --
Changed line 5 from:
  1. Install |OpenSlug and turnup init as usual.
to:
  1. Install OpenSlug and turnup init as usual.
August 28, 2005, at 01:56 PM by rwhitby --
Changed lines 1-14 from:

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

to:

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

The manual steps required to do this are as follows:

  1. Install |OpenSlug and turnup init as usual.
  2. Attach your external storage, partition and format it (make sure you include a swap partition).
  3. Mount the external storage root partition as /mnt
  4. cd /mnt ; wget http://sukurys.wantstofly.org/sarge-armeb.tar.gz
  5. tar zxf sarge-armeb.tar.gz ; mv sarge-armeb/* . ; rmdir sarge-armeb
  6. cp -Ra /lib/modules/* lib/modules ; cp /etc/modprobe.conf etc
  7. Edit /mnt/etc/network/interfaces and /mnt/etc/resolv.conf
August 28, 2005, at 01:25 PM by rwhitby --
Added line 1:

OpenDebianSlug is the name of a distribution that allows you to run Debian (ARM, big endian) on an unmodified Linksys NSLU2 with no extra hardware required.

Page last modified on February 15, 2007, at 11:38 AM