This is an old revision of the document!


How-to chroot into Debian

Files needed

Installing steps

  1. Copy the bzip and tar utilities to /mnt/HD_a2. E.g., on a linux machine, extract the utilities with tar xjf bzip2-1.0.3.tar.bz2 and tar xjf tar-1.15.92.tar.bz2, and then use ftp to transfer the extracted binaries and set executable permissions on them.
  2. mkdir /mnt/HD_a2/work && cd /mnt/HD_a2/work
  3. Copy debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2 to /mnt/HD_a2/work/
  4. ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat
  5. /mnt/HD_a2/bzcat debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2 | /mnt/HD_a2/tar -xvf -
  6. export DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap
  7. Copy and extract busybox-1.00.tgz and add extracted bin and sbin directory to a PATH. For example, use ftp to copy the file to /mnt/HD_a2, and then:
    1. cd /mnt/HD_a2 && gunzip -c busybox-1.00.tgz | /mnt/HD_a2/tar -xvf -
    2. export PATH=/mnt/HD_a2/bin:/mnt/HD_a2/sbin:$PATH

Note: Before proceeding to the next step, you must have internet access from the DSM-G600

  1. /mnt/HD_a2/bin/sh /mnt/HD_a2/work/usr/sbin/debootstrap --arch powerpc etch /mnt/HD_a2/debian http://archive.debian.org/debian. Use an appropriate Debian mirror or (preferably) an apt proxy. See this article on using debootstrap.
  2. cp /etc/resolv.conf /mnt/HD_a2/debian/etc/resolv.conf
  3. cd /
  4. mount -t proc proc /mnt/HD_a2/debian/proc
  5. chroot /mnt/HD_a2/debian /bin/bash
  6. apt-get update
  7. apt-get install locales
  8. dpkg-reconfigure locales
  9. passwd root
  10. apt-get install dropbear
  11. apt-get install hotplug

Once Debian has been installed as per the above procedure, the next time the unit is restarted, just do the PATH export and the chroot to enter Debian.

/etc/fstab

Needed only if you're going to hdd-boot or use loader.o

/dev/sda3               /               ext3            noatime                 0 0
/dev/sda1               none            swap            sw                      0 0
none                    /proc           proc            defaults                0 0
none                    /dev/shm        tmpfs           defaults                0 0

/etc/network/interfaces

Needed only if you're going to hdd-boot or use loader.o

mapping hotplug
        script grep
        map eth0 eth0

auto eth0
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 192.168.1.1

FIXME This wiki page is writing in progress - 90% done 8-)

Links


Personal Tools