Changelog ========= 2005-10-29 Doesn't go into details about setting up a system from stage1/3, it's mostly geared to how you can install and get a system running as fast as possible. Introduction ============ The Cobalt RaQ3/4 has been end of lifed since 2003, however they can still be used quite well as a backup, light development machine or cluster node. Most of the utilities and software required to use these boxes can be found online and are completely opensource. This howto will try to explain how you can install the Gentoo distribution on Cobalt Raq3 and Raq4 servers, not any others like the raq550/xtr/1/2 and cubes. There are currently two ways of accomplishing this, you can either use the network, or remove the harddisk from the server and use another machine to install a distribution on this disk. Please note that we will _NOT_ install the cobalt contol panel software on these machines, they will only be used as generic servers. If you do want this software, check out the BlueQuartz and RaQDevil links in the Websites section. From a personal and hardware perspective I can't really recommend these machines for any production webhosting, they're just too underpowered for most hosting requirements these days. Pre-install configuration ========================= To install a generic distribution on these machines you must first flash the ROM chip. The cobalts don't have a normal bios, but use an chip with a cutdown version of the linux kernel, this kernel is used to read a "normal" kernel from your disk, load it into RAM and execute it, yielding a normal linux bootup process. To flash the ROM you need the tool, flashtool. And a current ROM which can be found on the sourceforge page, http://cobalt-rom.sf.net The procedure to do this is not included in this document, since it has been thoroughly described on Jeff Walters site. http://gentoo.404ster.com/texts.php?action=view&id=2 This site is a great source of information about cobalts in general, you can find more direct links in the websites section below. A smal tip if you download the rom files from the sourceforge project, read the release note (book icon) to see which ROM can be used for your cobalt. After you upgraded the ROM and verified that it worked it is time to choose your installation method. We'll briefly describe both here. Network install: You can use the network install if you have multiple cobalts to restore. It's very similar to the original OS restore CD that came with the CDs. Harddisk install: This requires opening the cobalt and placing the harddisk in another machine. It's much simpler since you don't have to build a network install environment, but it doesn't scale to multiple machines. Please also note that with both methods it's highly desirable that you have a computer with a serial cable attached to the cobalt to monitor the install process. Harddisk install ================ This process is quite simple and mirrors the usual Gentoo install quite nicely. * Remove disk and install it in a generic PC * Boot from a current Gentoo LiveCD * Ensure that you have network access * Partition the disk * Make the filesystems * Mount the filesystems * Enable Swap * Decide if you want to build from scratch or use a stage4 tarball * Install the stage * Unmount filesystems and shutdown * Attach a serial console to your cobalt * Install the disk back into the cobalt and boot * You should now have a working machine Open the Cobalt and remove the harddisk, place it in another machine and boot from a current Gentoo LiveCD. In this example we'll asume that the disk is configured as /dev/hda. Next partition the disk, we'll go for a root fs, /var and /home, very similar to the original Cobalt layout. You can use sfdisk and the following file if you're unsure about fs sizes: == hda.part ,4096,L,* ,512,S ,1024 ,2048 == then use: /sbin/sfdisk -uM -L /dev/hda < hda.part To partition the disk. Next make the filesystems, ext3 is _highly_ recommended: mkfs.ext3 /dev/hda1 mkfs.ext3 /dev/hda3 mkfs.ext3 /dev/hda4 mkswap /dev/hda2 Mount the filesystems: mount /dev/hda1 /mnt/gentoo mkdir -p /mnt/gentoo/var mount /dev/hda3 /mnt/gentoo/var mkdir -p /mnt/gentoo/home mount /dev/hda4 /mnt/gentoo/home swapon /dev/hda2 cd /mnt/gentoo Now decide if you want to start from scratch or go for a complete install. Since CPU power is limited on these machine, you should try and use a stage3. If you just want a full featured install with all the usual server applications, try this unofficial stage4. It's the quickest route to getting productive fast. We'll asume the stage4 here. wget http://www.zolder.org/cobalt/stage4-x86-2005.1.tar.gz wget http://www.zolder.org/cobalt/stage4-x86-2005.1.tar.gz.md5sum Verify if the file hasn't been corrupted: md5sum -c stage4-x86-2005.1.tar.gz.md5sum Unpack the stage: tar -zxvpf stage4-x86-2005.1.tar.gz -C /mnt/gentoo Basically that's it, you don't need to install a bootloader. You can optionally change the network configuration (it defaults to dhcp): nano /mnt/gentoo/etc/conf.d/net rm -f /mnt/gentoo/stage4-x86-2005.1.tar.gz Umount the filesystem and shutdown cd /root umount /mnt/gentoo/home umount /mnt/gentoo/var umount /mnt/gentoo swapoff /dev/hda2 halt Place the disk back into your cobalt and power it up. Make sure that you're booting from disk by holding the S key when the machine boots, then selecting "Default boot method" and "From Disk". After the on disk kernel has been picked up and loaded into RAM, you should start to see messages appear on the LCD panel. When the install is done you should see the message containing hostname and ip, the standard hostname is "cobalt". You can now log into the system with ssh as root, with the default password "cobalt". Make sure you change this. You want to check out things like * /var/lib/portage/world * /etc/portage * /etc/make.conf to see if this stage matches your taste, then modify accordingly. Please note that php is used from dev-lang/php which is at the moment of this writing ~x86 masked. It also has the experimental fastbuild USE flag which hasn't been tested properly yet. The boot sequence has been made as light as possible, so you might want to start configuring your system from there. The installed system can now be used as a normal gentoo installation. Just mind the fact that: * You can not run a vanilla kernel, you'll need the cobalt patches * You don't have a videocard, so watch the init getty assignments * Notice the /proc/cobalt directory with usefull information * Make use of the LCD panel with: - sys-apps/cobalt-panel-utils - sys-apps/lcdsplash - sys-apps/lcdutils If you want to shutdown the machine, select the "S" button and then halt, or reboot. That's it, you're all ready to go :-) Tweaking the default stage3 =========================== Not yet. Network install =============== The network install is usefull if you want to install a lot of cobalts or if you don't want to remove the harddisk from the chassis. However because we're using the cobalts CPU it can be a lot slower then a harddisk install, unpacking the stage4 takes about . It tries to mirror the original OS Restore CD as much as possible, with the notable exception that this doesn't run from a livecd but from an already installed system. Let's start with a quick overview: * Make sure you're on a dedicated (V)LAN without DHCP. * Get a system that can be used as a dedicated install machine. * Make sure that it has a DHCP and NFS server. * Download the cobalt-nfsroot-2005.1.tar.bz2 package from the server * Extract it to /nfsroot-x86 * Modify your DHCP and NFS server so that the cobalt can boot from it. * Attach a serial console to your cobalt * Boot the cobalt with the "Boot from network" option * Monitor the install process through the serial console * After the installation is finished, reboot Because the network install uses DHCP to assign ip's to the kernel, it's very important that you either have access to the DHCP server config on the current LAN or use a dedicated LAN where you can setup a new DHCP server. Also, because of the default password you're better off not allowing outside access to this LAN. In the current example we'll use a machine that's has been installed with a normal version of Gentoo Linux, it has net-misc/dhcp and net-fs/nfs-utils merged, and uses the ip address: 192.168.100.4/24. Now download the cobalt nfsroot package from as follows: wget http://www.zolder.org/cobalt/nfsroot-x86-2005.1.tar.bz2 wget http://www.zolder.org/cobalt/nfsroot-x86-2005.1.tar.bz2.md5sum Verify if the file hasn't been corrupted: md5sum -c nfsroot-x86-2005.1.tar.bz2.md5sum Unpack the stage to your root filesystem, this will get you a /nfsroot-x86 directory. tar -jxvpf nfsroot-x86-2005.1.tar.bz2 -C / Inside /nfsroot-x86/root/etc/ you will find sample configs for DCHP and NFS. -- /etc/dhcp/dhcpd.conf subnet 192.168.100.1 netmask 255.255.255.0 { range 192.168.100.66 192.168.100.126 opeiotns routeres 192.168.100.1; next-server 192.168.100.4; option root-path = "/nfsroot-x86"; } -- -- /etc/exports /nfsroot-x86 192.168.100.0/255.255.255.0(rw,no_root_squash,sync) -- Copy the file into /etc/dhcp/ or modify your local version with the statement above. Next, make sure that your NFS is ready to go, add the lines in the exports file to your systems /etc/exports or overwrite your current file. /etc/init.d/dhcp start /etc/init.d/nfs start Now you're all set to go, connect your serial console machine to the cobalt. Startup your cobalt while pressing the S button and select "Boot from net". If everything goes well you should start to see the ROM kernel get an IP address, find the NFS server, mount it, and then initialize from there. After a while you'll see a login prompt. Now login with root and password cobalt. You can now follow the procedure in the previous chapter, or use an small experimental install script. We'll assume the latter, so go to /root/wrk/install, review the install.sh file (defaults should be fine), and run it with "sh ./install.sh". Monitor the install sequence, if it is finished you'll see the message: "Install finished, try rebooting" Reboot the machine with "/sbin/reboot". Make sure the system boots from disk by default. If the install finished successfully you should start seeing messages on the LCD panel, and finally the hostname "cobalt" and a DHCP assigned IP. You can now login with as root with password "cobalt". For further information about the software on this system, Go to the previous chapter and check the specifics of the software installed. If you verified that this procedure has worked, you can add the commands to /etc/conf.d/local.start to get completely automated install. That's it, happy cobalting :) Websites ======== Cobalt ROM project: http://sourceforge.net/projects/cobalt-rom Jeff Walters Gentoo Cobalt site: http://gentoo.404ster.com Duncan Laurie Debian Cobalt site: http://cobalt.iceblink.org/kernel/debian/debian-cobalt-howto.txt http://cobalt.iceblink.org Running the cobalt software on generic x86 boxes: http://www.raqdevil.com/ (with FreeBSD) http://bluequartz.org/ (with Fedora, also has lots of background info) Shop: http://www.raqware.com/ General links: http://www.raqlinks.com/ http://www.cobaltfaqs.com/ Author ====== Frido Ferdinand frido.ferdinand@gmail.com