NSLU2-Linux
view · edit · print · history

Debian.Bootstrap History

Hide minor edits - Show changes to markup

June 28, 2008, at 11:19 PM by rwhitby --
Changed line 128 from:

tzconfig

to:

dpkg-reconfigure tzdata

June 15, 2008, at 08:17 AM by rwhitby --
Changed lines 1-2 from:

If the Debian Installer does not support your device (as is the case for the Iomega NAS100d currently), you can use debootstrap to install Debian instead.

to:

If the Debian Installer does not support your device (as is the case for the Iomega NAS100d and Freecom FSG-3 currently), you can use debootstrap to install Debian instead.

June 15, 2008, at 08:12 AM by rwhitby --
Changed line 61 from:

wget http://ftp.au.debian.org/debian/pool/main/d/debootstrap/debootstrap-udeb_1.0.0_arm.udeb

to:

wget http://ftp.au.debian.org/debian/pool/main/d/debootstrap/debootstrap-udeb_0.3.3.2etch1_arm.udeb

Changed line 69 from:

ar -x debootstrap-udeb_1.0.0_arm.udeb

to:

ar -x debootstrap-udeb_0.3.3.2etch1_arm.udeb

July 05, 2007, at 08:57 AM by rwhitby --
Changed line 132 from:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

to:

Set the date correctly here.

Changed lines 136-138 from:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

to:
Changed line 140 from:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry:

to:

If hwclock doesn't work, then do the following first:

Changed lines 144-145 from:

S0:2345:respawn:/sbin/getty 115200 ttyS0

to:

rm /dev/rtc mknod /dev/rtc c 254 0

Changed lines 149-155 from:

For more detailed setup of the network, read man interfaces and edit /etc/network/interfaces.

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:

to:

Then save the correct time into the hwclock:

Changed lines 153-155 from:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

to:

hwclock -w

Changed line 157 from:

Install the latest kernel image:

to:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

Changed lines 161-164 from:

echo "do_initrd = Yes" >> /etc/kernel-image.conf apt-get -y install initramfs-tools scp buildhost:linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb . dpkg -i linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb

to:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

Changed lines 167-170 from:

Copy the kernel and initrd, and use whatever means is usual for your device to flash these files into the appropriate partitions.

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

to:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry:

Changed line 171 from:

dpkg-reconfigure passwd

to:

S0:2345:respawn:/sbin/getty 115200 ttyS0

Changed lines 175-181 from:

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:

For more detailed setup of the network, read man interfaces and edit /etc/network/interfaces.

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:

Changed lines 185-187 from:

apt-get -y install openssh-server

to:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

Changed line 191 from:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

to:

Install the latest kernel image:

Changed lines 195-196 from:

apt-get install locales dpkg-reconfigure locales

to:

echo "do_initrd = Yes" >> /etc/kernel-image.conf apt-get -y install initramfs-tools scp buildhost:linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb . dpkg -i linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb

Changed lines 202-204 from:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems:

to:

Copy the kernel and initrd, and use whatever means is usual for your device to flash these files into the appropriate partitions.

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

Changed lines 209-211 from:

umount /mnt/debinst/proc killall syslogd anacron umount /mnt/debinst

to:

dpkg-reconfigure passwd

Added lines 213-241:

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. (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

apt-get -y install openssh-server 

(:tableend:)

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

apt-get install locales
dpkg-reconfigure locales

(:tableend:)

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst

(:tableend:)

July 05, 2007, at 05:45 AM by rwhitby --
Changed lines 3-4 from:

The following assumes that you are starting with some other compatible little-endian operating system on the device (this may be the vendor's firmware, or some other firmware distribution like SlugOS/LE).

to:

The following assumes that you are starting with some other compatible little-endian operating system on the device (this may be the vendor's firmware, or some other firmware distribution like SlugOS/LE).

Changed line 61 from:

wget http://debian.planetmirror.com/debian/pool/main/d/debootstrap/debootstrap-udeb_1.0.0_arm.udeb

to:

wget http://ftp.au.debian.org/debian/pool/main/d/debootstrap/debootstrap-udeb_1.0.0_arm.udeb

July 05, 2007, at 02:35 AM by rwhitby --
Changed line 69 from:

ar -x debootstrap-udeb_0.3.3.3_arm.udeb

to:

ar -x debootstrap-udeb_1.0.0_arm.udeb

July 03, 2007, at 03:11 AM by rwhitby --
Changed line 61 from:

wget http://ftp.au.debian.org/debian/pool/main/d/debootstrap/debootstrap-udeb_0.3.3.1_arm.udeb

to:

wget http://debian.planetmirror.com/debian/pool/main/d/debootstrap/debootstrap-udeb_1.0.0_arm.udeb

June 17, 2007, at 09:33 AM by rwhitby --
Changed lines 205-207 from:

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:

to:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems:

Changed lines 210-214 from:

/sbin/tune2fs -c 0 -i 0 /dev/sda1

to:
umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst
Deleted lines 216-227:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst

(:tableend:)

June 17, 2007, at 09:23 AM by rwhitby --
Added lines 177-178:

Copy the kernel and initrd, and use whatever means is usual for your device to flash these files into the appropriate partitions.

June 17, 2007, at 09:08 AM by rwhitby --
Changed line 166 from:

Copy in the kernel modules from somewhere:

to:

Install the latest kernel image:

Added line 170:

echo "do_initrd = Yes" >> /etc/kernel-image.conf

June 17, 2007, at 09:06 AM by rwhitby --
Added line 101:

cp /lib/firmware/NPE-B lib/firmware/

Changed line 107 from:

Copy in the kernel modules from somewhere:

to:

Mount the proc filesystem:

Changed lines 111-114 from:

scp buildhost:linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb . ar -x linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb tar zxvf data.tar.gz ./lib/modules rm -f data.tar.gz control.tar.gz debian-binary

to:

mount -t proc proc /mnt/debinst/proc

Changed line 115 from:

Mount the proc filesystem:

to:

Now chroot into your new Debian environment for the final steps:

Changed lines 119-120 from:

mount -t proc proc /mnt/debinst/proc

to:

cd / chroot /mnt/debinst

Changed line 124 from:

Now chroot into your new Debian environment for the final steps:

to:

Then select the correct timezone:

Changed lines 128-129 from:

cd / chroot /mnt/debinst

to:

tzconfig

Changed line 132 from:

Then select the correct timezone:

to:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

Changed lines 136-138 from:

tzconfig

to:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

Changed line 142 from:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

to:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry:

Changed lines 146-148 from:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

to:

S0:2345:respawn:/sbin/getty 115200 ttyS0

Deleted lines 149-156:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

S0:2345:respawn:/sbin/getty 115200 ttyS0

(:tableend:)

Changed lines 166-167 from:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

to:

Copy in the kernel modules from somewhere:

Changed lines 170-172 from:

dpkg-reconfigure passwd

to:

apt-get -y install initramfs-tools scp buildhost:linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb . dpkg -i linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb

Changed lines 176-177 from:

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:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

Changed line 181 from:

apt-get -y install openssh-server

to:

dpkg-reconfigure passwd

Changed line 185 from:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

to:

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.

Changed lines 189-190 from:

apt-get install locales dpkg-reconfigure locales

to:

apt-get -y install openssh-server

Changed line 193 from:

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:

to:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

Changed lines 196-199 from:

/sbin/tune2fs -c 0 -i 0 /dev/sda1

to:
apt-get install locales
dpkg-reconfigure locales
Changed lines 202-204 from:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems:

to:

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:

Changed lines 205-209 from:
umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst
to:

/sbin/tune2fs -c 0 -i 0 /dev/sda1

Added lines 208-219:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst

(:tableend:)

June 17, 2007, at 07:14 AM by rwhitby --
Changed lines 110-113 from:

cp -a /lib/modules/* lib/modules

to:

scp buildhost:linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb . ar -x linux-image-2.6.22-rc4-ixp4xx_2.6.22~rc4-1~experimental.1_arm.deb tar zxvf data.tar.gz ./lib/modules rm -f data.tar.gz control.tar.gz debian-binary

Changed lines 162-163 from:

After debootstrapping, the debian system has no apt sources.list. Type nano /etc/apt/sources.list and prepend with:

to:

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:

Changed lines 170-172 from:

deb http://ftp.de.debian.org/debian unstable main non-free contrib

to:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

Changed lines 176-180 from:

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:

to:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

Changed lines 181-183 from:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

to:

dpkg-reconfigure passwd

Changed lines 185-186 from:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

to:

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.

Changed line 189 from:

dpkg-reconfigure passwd

to:

apt-get -y install openssh-server

Changed line 193 from:

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:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

Changed lines 197-198 from:

apt-get -y install openssh-server

to:

apt-get install locales dpkg-reconfigure locales

Changed line 202 from:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

to:

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:

Changed lines 205-208 from:
apt-get install locales
dpkg-reconfigure locales
to:

/sbin/tune2fs -c 0 -i 0 /dev/sda1

Changed lines 208-210 from:

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:

to:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems:

Changed lines 213-217 from:

/sbin/tune2fs -c 0 -i 0 /dev/sda1

to:
umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst
Deleted lines 219-230:

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst

(:tableend:)

June 17, 2007, at 06:35 AM by rwhitby --
Changed line 131 from:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

to:

Then select the correct timezone:

Changed lines 135-137 from:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

to:

tzconfig

Changed line 139 from:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry:

to:

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout):

Changed lines 143-145 from:

S0:2345:respawn:/sbin/getty 115200 ttyS0

to:

proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 swap swap defaults 0 0

Changed lines 149-152 from:

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. Type nano /etc/apt/sources.list and prepend with:

to:

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry:

Changed line 153 from:

deb http://ftp.de.debian.org/debian unstable main non-free contrib

to:

S0:2345:respawn:/sbin/getty 115200 ttyS0

Changed lines 157-161 from:

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:

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. Type nano /etc/apt/sources.list and prepend with:

Changed lines 164-166 from:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

to:

deb http://ftp.de.debian.org/debian unstable main non-free contrib

Changed lines 168-169 from:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

to:

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:

Changed lines 176-178 from:

dpkg-reconfigure passwd

to:

apt-get update apt-get -y dist-upgrade apt-get -y install anacron popularity-contest nslu2-utils

Changed lines 182-183 from:

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:

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

Changed line 187 from:

apt-get -y install openssh-server

to:

dpkg-reconfigure passwd

Changed line 191 from:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

to:

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.

Changed lines 195-196 from:

apt-get install locales dpkg-reconfigure locales

to:

apt-get -y install openssh-server

Changed line 199 from:

Then select the correct timezone:

to:

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales:

Changed lines 203-204 from:

tzconfig

to:

apt-get install locales dpkg-reconfigure locales

June 17, 2007, at 06:18 AM by rwhitby -- Copied relevant parts from SlugOS/BootstrapLE
Added lines 1-227:

If the Debian Installer does not support your device (as is the case for the Iomega NAS100d currently), you can use debootstrap to install Debian instead.

The following assumes that you are starting with some other compatible little-endian operating system on the device (this may be the vendor's firmware, or some other firmware distribution like SlugOS/LE).

Partition the hard drive and create filesystems

Partition your hard disk if you haven't already, assuming you have a empty (unpartitioned) drive.
To delete partitions, type "d" inside fdisk and remove the existing partitions one by one. (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

fdisk /dev/sda
n  #(add new partition)
p  #(primary)
1  #(1st partition)
1  #(start sector)
+3G  #(end sector/partition size; this adds a partion of 3GB size which will be mounted as /)
n
p
2  #(2nd partition)
1
+512M  #(our swap partition (512MB should be enough))
t  #(change type of partition)
2  #(2nd partition)
82 #(change type to 82 - swap)
w  #(write partition table)
q  #(quits fdisk)

(:tableend:)

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: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

mkfs.ext3 /dev/sda1 # ext3 is a safe choice
mkswap /dev/sda2
sync; sync; sync
swapon /dev/sda2

(:tableend:)

Mount the hard drive(s) filesystem: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

mkdir /mnt/debinst
mount /dev/sda1 /mnt/debinst
mkdir /mnt/debinst/work
cd /mnt/debinst/work

(:tableend:)

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 arm distribution): (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

wget http://ftp.au.debian.org/debian/pool/main/d/debootstrap/debootstrap-udeb_0.3.3.1_arm.udeb

(:tableend:)

Extract the debrootstrap udeb: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

ar -x debootstrap-udeb_0.3.3.3_arm.udeb
tar xzvf data.tar.gz

(:tableend:)

Run debootstrap with your choice of Debian distro and mirror: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

export DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap
./usr/sbin/debootstrap --arch arm etch /mnt/debinst http://ftp.au.debian.org/debian

(:tableend:)

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.

Important: The bootstrap is not completed successfully until the last line is: I: Base system installed successfully.
If you do not get this line, you will not have a successful build. Error messages may be found in /mnt/debinst/debootstrap/debootstrap.log.

Final configuration

Copy in some important configuration files: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

cd ..
cp /etc/resolv.conf etc/resolv.conf
cp /etc/hosts etc/hosts
cp /etc/hostname etc/hostname
cp /etc/network/interfaces etc/network/interfaces

(:tableend:)

Notice: you may only needed to copy /etc/hosts into etc/hosts for DHCP configuration.

Copy in the kernel modules from somewhere: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

cp -a /lib/modules/* lib/modules 

(:tableend:)

Mount the proc filesystem: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

mount -t proc proc /mnt/debinst/proc

(:tableend:)

Now chroot into your new Debian environment for the final steps: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

cd /
chroot /mnt/debinst

(:tableend:)

Put a working fstab file into place (you may need to tweak this config and add extra partitions depending on your partition layout): (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

proc            /proc           proc    defaults        0  0
/dev/sda1       /               ext3    defaults        1  1
/dev/sda2       swap            swap    defaults        0  0

(:tableend:)

Edit the inittab file. Type: nano /etc/inittab and disable the tty[1-6] entries by prefixing the entries with "#". Then add the following serial console entry: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

S0:2345:respawn:/sbin/getty 115200 ttyS0

(:tableend:)

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. Type nano /etc/apt/sources.list and prepend with: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

deb http://ftp.de.debian.org/debian unstable main non-free contrib

(:tableend:)

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: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

apt-get update
apt-get -y dist-upgrade
apt-get -y install anacron popularity-contest nslu2-utils

(:tableend:)

Now configure the passwd package, set the password for root and install openssh-server, so you will be able to log into your device after the reboot. First, configure passwd and enable the shadow passwords when asked.

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

dpkg-reconfigure passwd

(:tableend:)

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. (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

apt-get -y install openssh-server 

(:tableend:)

To get rid of the annoying LC_ALL, LANG etc. errors when running perl and other apps, install locales: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

apt-get install locales
dpkg-reconfigure locales

(:tableend:)

Then select the correct timezone: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

tzconfig

(:tableend:)

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: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:) /sbin/tune2fs -c 0 -i 0 /dev/sda1 (:tableend:)

Finally, type ^D (control-D) or exit to drop out of the chroot done a lot earlier.

Unmount your filesystems: (:table border=0 width=80% bgcolor=#eeffee:) (:cell:)

umount /mnt/debinst/proc
killall syslogd anacron
umount /mnt/debinst

(:tableend:)

Additional docs

  • When your Debian installation has booted, read /usr/share/doc/nslu2-utils/README.Debian
view · edit · print · history · Last edited by rwhitby.
Originally by rwhitby.
Page last modified on June 28, 2008, at 11:19 PM