Debian on Qube 2
Originally from http://www.zinkwazi.com/tools/qube2/1.html.
Copied here for preservation purposes. Some embedded URLs may no longer be active. This document will be updated to keep it as accurate as possible, possibly diverging from the original content. See the above URL for the original if that content matters to you.
[Cobalt-22] HOWTO Install Debian on a Qube 2 or RaQ 2 Paul Martin <firstname.lastname@example.org> Mon, 8 Jul 2002 20:59:15 +0100 This document describes how to install Debian using a network boot. No screwdriver required. These instructions are relevant to the Qube 2, RaQ 2 and CacheRaQ 2, and ramble a bit. They have not been tested on other types of Cobalt 2800 hardware, but you're welcome to try. Usual disclaimers apply. I've used this procedure to set up four machines, and it's worked for me. It may not work for you. This will invalidate any warranty you may still have had on that Qube 2 or RaQ 2. Prepare the NFS server to allow the Qube/RaQ to pick up an NFSroot kernel. /nfsroot (sorry, that's what the boot ROM requires) should contain: vmlinux_raq-2800.gz and a symlink from "boot" to "." This is obtained from: http://people.debian.org/~pm/mips-cobalt/nfsroot/vmlinux_raq-2800.gz Then "cd /nfsroot && ln -s . boot". Next, prepare the actual NFSroot area. Get http://people.debian.org/~pm/mips-cobalt/nfsroot/nfsroot.tar.gz and unpack it anywhere you have sufficient space (it needs about 6.2MB). Remember where you put it. In the following configuration fragments it has been placed in /mnt/nfsroot. Next, configure your NFS server, exporting: /nfsroot 192.168.1.0/255.255.255.0(ro) /mnt/nfsroot 192.168.1.0/255.255.255.0(ro) (adjust /mnt/nfsroot and the IP addresses according to your needs) Next the DHCP server. If you're using Debian's "dhcp" package, the extra configuration will look something like this: option root-path "/mnt/nfsroot"; # absolute dir on nfs server server-name "192.168.1.1"; # IP of nfs server next-server 192.168.1.1; # IP of nfs server Similarly, the /mnt/nfsroot and IP addresses will be dependent on your configuration. There's more to the configuration than this -- you'll need to specify an IP range for the machine you're installing to use, but configuring DHCP or NFS is beyond the scope of this document. Ensure the DHCP server has been restarted, and the NFS server reconfigured. On the Qube/RaQ hold down the Left and Right arrow buttons near the LCD panel, and switch it on, holding the buttons until "Net booting" appears in the LCD. If you want to watch the bootup sequence, there is logging on the serial port, which is set to 115200 bps 8-N-1. The serial port is *not* used for installation. After much network activity, the message "Now telnet to..." and an IP address will appear on the LCD. Telnet to this address, and you should be in the now familiar dbootstrap Debian installer. Only one telnet session can be open at any one time, so the risk of being hacked during install is minimal. It will probably complain about not finding a root device. Ignore this error. Configure the keyboard just to get past that bit of the menu. When partitioning the hard drive, make a small first partition (hda1) at the start of the disk. 5MB will be more than sufficient. This will be /boot, and will hold the kernel, and a few files to allow the root partition to be elsewhere. This partition has to be ext2, revision 0, with no sparse superblocks, otherwise the boot ROM won't be able to read it. The Debian install program has been modified to know this. No other partitions have this requirement. Partition the rest of the hard drive as you like. Don't forget a swap partition. Back to the menu, initialize your swap partition, and initialize what will be your root partition before you initialize /dev/hda1, which you should initialize as /boot. Install Kernel and Driver Modules: You want to use the "network" option, and use http://people.debian.org/~pm/disks-mipsel/current/ or http://184.108.40.206/~pm/disks-mipsel/current/ as the download URL. This will then install a bootable kernel, and the root pivot program, so that the ROM can boot off /dev/hda1, but you aren't forced to patch the kernel to change the root partition. (The choice of root partition is determined by the contents of the file /boot/rootfs, and the program that does the flip is in /boot/sbin/init.) Configure Device Driver Modules: just go into this, and exit without selecting any modules. Configure the Network: select eth0 and DHCP. Install the Base System: Again you want to install off network. The URL you want is http://ftp.XX.debian.org/debian where the XX is the country code of your country (in the USA it's us, in UK it's uk, in France it's fr, etc). On a 128 kbps line, this bit's going to take about 10 minutes. Make System Bootable: do this. Reboot the System: DO NOT DO THIS YET. If you do so at this stage, you'll have a system that doesn't boot properly. Scroll through the options until you get to "Execute a Shell" (third from bottom). Choose it. You've now got a "#" prompt. Type "chroot /target". You should get a "sh-2.05a#" prompt back. Now run "base-config". Go through the usual setup. It will fail when you get to the apt configuration. There is no "stable" distribution for mipsel yet -- it didn't exist in potato. You need to edit the sources list by hand. It wants to read: deb http://ftp.XX.debian.org/debian woody main (replacing XX as before with your country code.) Do not be tempted to install sid/unstable. There's a problem with the aptitude package that means that it doesn't exist in the mipsel architecture. Don't use tasksel unless you really want to. Use dselect if you can, and let it install the important and standard packages, which should include ssh. It's OK to remove non-essential packages like nfs-common, portmap, and things like that. You can install anything else after you've rebooted. Add package "pump" and remove "dhcp-client". The kernel you've installed doesn't work with dhcp-client. Downloading these packages will take about 50 minutes at 129kbps. If you're on a modem this will take a lot longer. Remember when installing ssh, to enable the sshd installer. You are likely to see error messages of the nature: tar: ./prerm: time stamp 2002-01-27 05:12:03 is 65415453 s in the future They are harmless, caused by the kernel not picking up the right time from the hardware. This will fix itself after rebooting. Eventually, you should be returned to the "sh-2.05a#" prompt. Now you want to edit /etc/inittab (nano is one available editor). Comment out the lines beginning with numbers 1-6 (using #es), and uncomment the T0 line, changing the baud rate from 9600 to 115200. Edit /etc/securetty to add "ttyS0", otherwise you won't be able to login as root on the serial port. Now type "exit", and you're back at the "#" prompt. Exit again, and you're back to the menu. At this point, you can reboot. * * * You might be interested in some utilities to drive the LCD display so you have bootup information, and a "shutdown" menu available on the buttons/LCD. http://people.debian.org/~pm/mips-cobalt/lcdutils-0.2.tar.gz are the utilities to drive the LCD, and http://people.debian.org/~pm/mips-cobalt/lcd.status.patch.gz is a patch to apply in /etc/init.d/ to add a bootup status display. * * * Things that don't work well: * Mixing serial port and network activity. This can freeze the kernel. * Using dual channel ISDN. Packets destined to the Qube/Raq get mangled. Packets gatewaying through the Qube/Raq are OK, and a Qube makes a good on-demand ISDN router/firewall... just don't use it as a web cache or mail server in that instance. Single channel ISDN works fine. -- Paul Martin <email@example.com>