How to install Debian on an IndigoVision VP850 ("Standalone NVR") I built a root file system to put in flash, which contains all the tools you need to download Debian directly. We'll also need to change the kernel (esoteric considerations of what root to use: stock Indigo kernels boot on a ramdisk, whereas we want to boot with a temporary initrd root which will be moved to the disk later on. See linux/Documentation/initrd.txt for more details) You'll need a serial console using 115200 8N1. Start by booting into blob (pressing a key at the prompt, just after powering up). Upload and install the root file system: blob> xd ramdisk [using your terminal emulator, select 'send file' using X-Modem protocol, send rfs.jffs2] blob> erase ramdisk blob> flash ramdisk Then reprogram the kernel blob> unlock kernel blob> xd kernel [using your terminal emulator, select 'send file' using X-Modem protocol, send zImage] blob> flash kernel You will also need to program blob to use a different kernel command line which will boot on the ramdisk properly: blob> unlock param blob> cmd mem=64M console=115200,ttyS0 rootfstype=jffs2 root=/dev/mtdblock2 init=/bin/sh Reboot (and let Blob's prompt expire -- The kernel doesn't have a command line that lets it boot from blob's 'boot' command.) The kernel should boot, and end up at a shell prompt. If it doesn't, complain to your vendor. At the prompt: # export PATH=/sbin:/usr/sbin:$PATH # ./startup This loads the drivers, sets up the RAID arrays and mounts /dev/md1 on /mnt. The 'startup' script will later boot the entire sytem, so the last few commands will fail at this point: it's safe to ignore the two error messages on pivot_root and chroot. (Note: We use Indigo's partitionning scheme in the following way: /dev/md0 /dev/hda1+/dev/hdc1 2Gb swap /dev/md1 /dev/hda2+/dev/hdc2 8Gb root /dev/md2 /dev/hda3+/dev/hdc3 450Gb /home This may not be the best, if the machine will serve large Web sites (/var/www on Debian) or receive large amounts of mail (/var/spool). It is however easy to move things around later, using symbolic links or binding (see mount(8)). The partitionning can be changed while running from flash; we'll see how to do that later on). So, we'll now create a Debian base system on /mnt: # cd /mnt # rm -rf NVRConfig tmp # ifconfig eth0 10.1.163.10 # route add default gw 10.0.0.1 (change the network settings to something meaningful for your network) # debootstrap --arch arm woody . ftp://194.80.135.30/sites/ftp.debian.org/debian (the IP address is that of ftp.mirror.ac.uk -- we don't have a name server yet; replace with your favourite mirror.) debootstrap then proceeds to download, unpack and configure all the base packages. Finally it writes "Base system installed successfully" We now need to add a valid fstab: edit /mnt/etc/fstab with: /dev/md1 / ext3 errors=remount-ro 0 1 /dev/md2 /home ext3 defaults 0 0 /dev/md0 none swap sw 0 0 proc /proc proc defaults 0 0 and edit /mnt/etc/inittab, comment out all the 'tty' lines (as we obviously don't have any virtual consoles) and add: T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 Set up the networking for the Debian system: edit /mnt/etc/network/interfaces with: auto eth0 iface eth0 inet static address 10.1.163.10 netmask 255.224.0.0 gateway 10.0.0.1 /mnt/etc/resolv.conf: nameserver 10.0.0.8 (use your own settings of course) and add a hostname in /etc/hostname, and /etc/hosts: 127.0.0.1 localhost and finally authorise root to log in on the serial console (this is disabled by default in case the serial port is connected to a modem -- you may want to disable it again later if that is the case): echo "ttyS0" >> /mnt/etc/securetty The system is now more or less in the state that a CD install would create. Now we can reboot, and tell blob to boot straight through by changing the command line: blob> cmd mem=64M console=115200,ttyS0 rootfstype=jffs2 root=/dev/mtdblock2 init=/startup Rebooting should now bring us to a Debian boot prompt (yay!) Log in as root (no password), and run 'base-config' The rest is just a normal Debian install. Now apt-get install nethack, and enjoy the best adventure game ever, all over a serial console! --- Building the PROM: apt-get source debootstrap cd debootstrap* [edit Makefile, CC=xgcc, ARCH=arm, @43:$(CC) -static ] fakeroot make DESTDIR=/home/yves/cvs_wa/busybox-1.0/_install fakeroot make install cd ../busybox make mkfs.jffs2 -D devices.txt -d _install > rfs.jffs2