Here are the steps I used to install Debian woody using debootstrap on the Alchemy development board.

1. Create the nfsroot environment on your workstation

Create a place for the root filesystem.

mkdir -p /tftpboot/10.0.0.3

add that dir to /etc/exports and restart nfs

/tftpboot/10.0.0.3       10.0.0.0/255.255.255.0(rw,no_root_squash,no_all_squash)

debootstrap --arch mips woody /tftpboot/10.0.0.3 http://archive.progeny.com/debian/ woody_mipsel

Then you need to edit some files.

cat >> /tftboot/10.0.0.3/etc/hostname
127.0.0.1                localhost
10.0.0.10                masta
10.0.0.3                  tester

cat > /tftboot/10.0.0.3/etc/fstab
/proc     /proc                 proc     defaults
masta:/ /                                nfs      rw,rsize=8192,wsize=8192,hard,intr    0  0
none            /proc/bus/usb usbfs     defaults                                                                          0  0

echo tester > /tftboot/10.0.0.3/etc/hostname

echo nameserver 10.72.228.235 > /tftboot/10.0.0.3/etc/resolv.conf

2. Boot the system

At the Yamon prompt, load the kernel. The syntax is:

load [-r] [tftp:][//ipaddr][/filename]

You can pre-load some of the values, so you only need to type "load" to actually load a kernel.

load Then start the kernel.

go . ip=CLIENT:SERVER:SERVER:255.255.255.0:::off

The system will boot, but because /etc/inittab doesn't exist yet, init will ask you for a runlevel. Tell it "s" for single use mode. You will be dropped into a shell.

The filesystem is mounted read-only at this point, so remount it read-write. Add the -n option to not update /etc/mtab:

mount -n / -o remount,rw

Then mount the proc filesystem:

mount -n /proc

The date will be wrong, as there is no battery backed hardware clock on the dev board. So set it by hand:

date -s "2003-8-5 9:23"

Now to reinstall all the packages! The packages are already "installed", that is they are on the disk, but the package system doesn't have them in the database yet.

cd /var/cache/apt/archives/
dpkg -i libc6* libstdc++* libncurses5* dpkg_*
dpkg -i apt_*.dpkg

At this point apt is installed. We can install the rest of the debs using apt. We can tell apt to use the "dselect-upgrade" method, but first we need to set the packages. So get a directory listing, massage it a bit and feed it into dpkg --set-selections.

ls *.deb | sed 's/\([^_]*\)_.*/\1 install/' | dpkg --set-selections

Then run apt-get to install the selected packages:

apt-get dselect-upgrade

This sometimes fails. Just keep running it over and over until it's done. Sometimes you need to correct a problem. For example, I needed to rm /var/mail to get base-files to install.


3. Other things that need to be done

To get the serial console working:

- In /etc/inittab, uncomment the T0 line and change the baud

- Add ttyS0 to /etc/securetty

echo ttyS0 >> /tftboot/10.0.0.3/etc/securetty

You can do that (and any other config file editing) from your host system, working on the exported files.

Once everything is all up and running nicely, add some options to /etc/apt/sources.list and do an apt-get update and then apt-get upgrade.

Some packages that need to be added are:

ssh telnet: So we can login over the network ntp-simple: So we can set the date dilo ppp pppoe: Some packages to remove

Also make sure turn off hwclock: update-rc.d -f hwclock.sh remove update-rc.d -f hwclockfirst.sh remove