Manually unpacking a tar ball of Debian on NSLU2
If for some reason you cannot use the installer on NSLU2, you can manually unpack a tar ball which I have prepared for these systems. You simply need to attach the USB drive to a PC first to prepare it according to the following instructions.
Preparing the hard drive
First, you have to partition the disk. I have used the partition scheme where a separate partition is used for /home. Therefore, you need to create /dev/sda1 for the root partition, /dev/sda2 as an extended partition from which swap (sda5) and home (sda6) are created. You can use a different layout but in this case you need to adapt /etc/fstab after unpacking the tar ball.
I used the following layout. There's no particular reason for using this partitioning layout. I simply used something similar to what debian-installer would create but you're welcome to use a different layout (in which case you need to update /etc/fstab though).
Device Boot Start End Blocks Id System /dev/sda1 * 1 120 963868+ 83 Linux /dev/sda2 121 311 1534207+ 5 Extended /dev/sda5 121 132 96358+ 82 Linux swap /dev/sda6 133 311 1437786 83 Linux
Use fdisk to partition your disk (let's call the disk sda for now). Mark sda1 as a bootable partition (press the key a in fdisk) and make sure that the partition is labled as a Linux partition (type 83). Make sure that the root partition is large enough to install all the applications you're interested in (at least 2-3 GB on a hard drive, and whatever you can spare if you're using a USB stick). Now format the drive:
% mkfs.ext3 /dev/sda1 % mkfs.ext3 /dev/sda6 % mkswap /dev/sda5
Mount the disk somewhere:
% mount /dev/sda1 /mnt
Downloading and installing the Debian base system
Download the compressed base system (about 101 MB). This contains a basic system with a standard set of package of Debian 4.0 (etch, r3).
% wget http://people.debian.org/~tbm/nslu2/etch/base.tar.bz2 % wget http://people.debian.org/~tbm/nslu2/etch/base.tar.bz2.asc
Verify that the GPG signature matches:
% gpg --keyserver subkeys.pgp.net --recv-key 68FD549F % gpg --verify base.tar.bz2.asc base.tar.bz2
Now untar this system onto the drive as the root user:
% cd /mnt % tar -xjvf ~/base.tar.bz2
Boot the system
Put your NSLU2 in upgrade mode and write the etch firmware image (md5sum: d3da6fe6876db04fa594a3d8bd932a96) using upslug2. Connect your hard drive immediately when upslug2 is done and then your device will reboot. The first time you boot, the system will probably check your drives. Please wait patiently until this is over. When the drive check is done, your NSLU2 will reboot again and directly boot into your new Debian system.
The system includes support for the Intel IXP4xx network chip (including the proprietary microcode that is required for operation) and will try to obtain an IP address via DHCP on eth0. SSH is installed and remote root logins are allowed. The password is root. There are no users yet. The SSH key of the host is:
46:a6:d1:72:d5:10:2b:1b:07:2a:e3:cc:46:47:02:83
What to do now
You have have a working system. There are a few things you should do, though:
- change the root password
- add normal user accounts
- regenerate the SSH key (since the private key is included in the base
system on my web page) by running:
rm /etc/ssh/ssh_host* ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
- edit /etc/apt/sources.list and use a Debian mirror close to you and then type: apt-get update
- install ntpdate to make sure the clock is always up-to-date; otherwise attempts to install new packages might fail due to GPG verification errors (for the first time, you'll probably have to setup the clock manually using the date command).
- upgrade your system using apt-get dist-upgrade to make sure you have the latest updates.
- change the timezone with tzconfig
- Finally, you may be interested in reading some tips for running Linux on a flash device (in case you didn't install Debian on a hard drive but a USB flash stick) and for reducing memory usage.
Go back to my Debian on NSLU2 page.