NOTICE: this page describes the old, manual procedure for bootstrapping Debian in a slug, using the SlugOS/LE kernel (formerly know as DebianSlug). Currently, if you want to install Debian in your slug it is recommended that see the new instructions about Debian/NSLU2 and use debian-installer, as described in http://www.cyrius.com/debian/nslu2/.
Now you have a little endian SlugOS/LE image that can be used to bootstrap the offical Debian arm port (you didn't do this yet? Go here and install it first). Here's how to do it.
Debian "Sid" (unstable) Bootstrap
(v 3.10 as of Aug 2006)
Boot your newly flashed slug
Boot your just reflashed image and log in using ssh as
Partition the hard drive and create filesystems
Partition your hard disk if you haven't already, assuming you have a empty (unpartitioned) drive.
Adjust the partition size to fit your needs. You might have to reboot if fdisk gives you a warning message saying that the partition table could not be re-read.
Setup the filesystem and swap:
If you have rebooted after running fdisk, the device /dev/sda1 might get mounted. If so the "mkfs.ext3 /dev/sda1" command will fail. I unmounted the device with the command "umount /dev/sda1" and re-ran the mkfs command successfully.
Notice: after the bootstrap procedure, you will need to run
Mount the hard drive(s) filesystem:
Setup your internet connection
If you are using DHCP, please ignore the two steps below. If you're using a static IP address, then you need to need to do the following:
For (1), assuming that aaa.bbb.ccc.ddd is the IP address of your router/gateway, then type:
For (2), if you know that your router/gateway is also a DNS server, then you can use the same address above for the address below. Otherwise, you'll have to get that information (WinXP/2k/98 in a command prompt, type
Get and run the bootstrap utility, debootstrap
Grab the debootstrap .udeb from a Debian mirror (remember to look for a mirror close to you that carries the
Extract the debrootstrap udeb:
Notice: previous versions of debootstrap required Perl in order to retrieve package data, but the latest version (0.3.3) includes
Run debootstrap with your choice of Debian distro and mirror:
Depending on your network connection, this will take at least 50 minutes (even with a broadband connection), because this downloads and installs many Debian packages.
As sid is unstable by definition, the results of this can vary a lot! If you get error messages, try again later when the repsitory will be eventually fixed, or think about trying to use stable (see below).
If even after downloading from ftp.nl.debian.org you see only a couple of packages retrieved, and not hundreds, try again.
The bootstrap is not completed successfully until the last line is:
Copy in some important configuration files:
Notice: you may only needed to copy
You may also need to copy
Copy in the kernel modules from the flash image:
Mount the proc filesystem:
Now chroot into your new Debian environment for the final steps:
Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout) by typing:
followed by a ^X (control-X) to get out of nano. Be sure you type Y when asked to save the file.
Edit the inittab file. Type:
Add the network driver explicity to
For more detailed setup of the network, read man interfaces and edit /etc/network/interfaces.
After debootstrapping, the debian system has no apt sources.list.
Update the Debian distro and install cron, nslu2-utils and popularity-contest. Popularity-contest reports what architecture and packages you are using back to the Debian community anonymously to help in deciding where to put developer effort. In order to promote nslu2 and arm you are kindly requested to say "yes" to enabling popularity-contest.
Notice: you must set the current date before running apt-get update. Otherwise gpg signature checking will fail.
To install these packages, type:
Now configure the
Now install openssh-server. This takes a couple of minutes, because it will generate the necessary host keys. Install will fail if /etc/shadow is missing. It will also fail if you don't install "adduser-ng" package before installing openssh-server.
To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install
Then select the correct timezone:
Notice (added by Petr Jakes): It takes long time to check the file system for big harddrives (500G) during the boot. System can not boot because of that in some cases. For example, after changing time (hwclock -w) directly after SlugOS/LE install, I was not able to boot from the 500GB HDD without following tune2fs command. Because of above mentioned type in:
Notice (added by Steve G): If like me you tried to be clever and put
before unmounting the filesystems. There are probably better hacks, such as creating
Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.
Unmount your filesystems:
Make the external drive with Debian on it your boot device:
Reboot into Debian, by typing "reboot" at the prompt.
Installing kernel-modules (SlugOS/LE 3.10beta)
Notice: these instructions only apply if you are running SlugOS/LE after the manual bootstrap procedure. If you have installed Debian/NSLU2 using debian-installer, you should install the official Debian modules through
If you're running SlugOS/LE 3.10beta and have to install additional kernel modules (USB-sound e.g.), you have to use the kernel-modules on
http://ipkg.nslu2-linux.org/feeds/debianslug/cross/3.10-beta. There are two ways to install such modules, using
Install using dpkg
Download the module you want to your NSLU2 using
You will probably see a few warnings about missing dependencies. Ignore all warnings regarding the lack of
Check the output of
If there are warnings about unresolved symbols, it's very likely that the new kernel module depends on another one that's not yet installed. You can check this with
Modprobe should automatically load dependent modules (if they're installed), so check the loaded modules:
If one or more modules which are listed in "depends" of your module, you have to install them as described above.
Another way to install a kernel module for SlugOS/LE is to manually decompress the .ipk file, copy the module to the
In order to unpack the .ipk file, you'll need
Now, after downloading the desired module, unpack the .ipk file and the data.tar.gz file inside it:
After that, the module .ko file will be in the correct place under
If it succeeds, you'll be able to see the module loaded into the kernel:
Again, if there is some dependency problem, you can use
These are the differences between the thing you need to do for sid, so you still have to read the above!
Instead of using sid, run debootstrap with debian sarge:
Don't forget to add the following to /etc/apt/sources.list:
Replace "openssh-server" with "ssh".
Make sure you install udev:
nslu2-utils is not in the stable feed, so get it and it's dependencies directly from the pool:
Or try doing it with apt-pinning, explained here: http://jaqque.sbih.org/kplug/apt-pinning.html(approve sites)
Replace modutils with module-init-tools (being in the chroot) :
Upgrade DebianSlug to newer firmware
Note that the account is
There are some Debian-specific tips in
The status LED will continue to flash amber. There is a nslu2-tools debian package under development that will contain a LEDs binary that will switch it back to green.
The LEDs should be operating as expected after rebooting the slug.
I followed the above instructions, but my nslu2 failed to boot afterwards. However, after doing a "turnup -i /dev/sda1 -t ext3", erasing the content of the partition "mkfs.ext3 /dev/sda1" and debootstrapping again everything worked fine. Could it be, that "turnup -i" writes the boot sector of the hard drive?
'''All you need to do is run
My nslu2 also failed to load after the bootstrap. The nslu2 boots but halts just after mounting the external disk and adding swap (the last line in /var/log/messages was "kernel: EXT3? FS on sda1, internal journal"). The nslu2 does not ack pings and does not provide ssh access. After some trials, "turnup -i -f /dev/sda1 -t ext3" copied the root filesystem into sda1. When the operation finished, rebooted the nslu2 and then it suddenly worked!
I am using a micro (4gig) usb-attached hard disk as the root partition. After following all of the instructions, my nslu2 would could continue to boot with the flash filesystem. After a few trials, it looks like the disk needs a brief period to spin up. I used "turnup disk -s5 /dev/sda1 -t ext3" and everything worked properly!
the right firmware
Be sure to get the little endian SlugOS (SlugOS/LE) firmware, that may still be identified as DebianSlug, and NOT the big endian SlugOS (OpenSlug) firmware. If you happen to pick the big endian version and follow the instructions above (as I mistakenly did) it will manifest itself by finishing the debootstrap step entirely too quickly, and the log will report:
/mnt/debinst/work/usr/lib/debootstrap/pkgdetails: 1: Syntax error: word unexpected (expecting ")")
view · edit · print · history · Last edited by fcarolo.
Based on work by fcarolo, Robert Nocera, Chris Emerson, Sinclair, Peter Enzerink, Steve G, Eltator, David Barroso, Petr Jakes, madbull, akent, drone, TylerOderkirk, henning, max, Dave Hrynkiw, shiyeeshiyeedk, Marc-André, ST, Tom Gross, es, jamesphasespacecom, Lionel, Rob Lockhart, emm_is, ediaz, Brian, 1234, jackson, Maarten Ditzel, Don Lubinski, PatrickSchneider, Peter Hartzler, jr, Zak, Hartmut Goebel, Ryan Cresawn, mayhan, Jim Drash, rwhitby, hmn, Paul, Sinclair73, jens, Patrick Schneider, Miro Dietiker, bwalle, Angua, joschkopf, SimonJosefsson, repvik, ajday, and eFfeM.
Originally by rwhitby.
Page last modified on November 19, 2007, at 04:36 PM