Cobalt Netboot: Okay, this netboot setup is a little more complex than the netboots for SGI machines primarily due in part to the various limitations of the older cobalt bootloader. There are several steps involved, but before I get to the details, The booting details work like this. 1) Power On, Hold down L/R Arrows to netboot 2) Cobalt Bootloader sends DHCP Request 3) DHCP Request received, tells Bootloader its IP Address and server to NFS mount the rootfs from 4) Bootloader NFS Mounts root, and boots the kernel named /boot/vmlinux_raq-2800.gz 4) Kernel boots. That above, in a nutshell, is how the old cobalt bootloader works. The process will be different, and easier, for people who use the newer bootloader, but this mini-document will not focus on that aspect right now. What we'll focus on is how to utilize the above system to netboot a functional and usable miniroot for the purposes of installing gentoo. The above process will be followed up until the end of the 4th step, because the kernel we will be netbooting will not infact be a real linux kernel, but the chain loader for the newer colo bootloader. The colo bootloader *just* gained tftp/net/dhcp support, which works in our favour by using it as a intermediate bootloader to be able to boot a full-featured kernel without having to worry about the size limitations imposed by the old bootloader. //------------------------------------------- Legend: == datestamp of the creation of the kernel/initrd == Version of colo being used for netbooting So the process will work like this: 1. Setup a machine that can provide three things: DHCP, NFS, and TFTP support. Whether this is a single machine or these services spread across multiple machines doesn't matter, but these are the three services that will be needed. Also make sure you have a serial cable handy that can handle a serial console (i.e., null-modem adapter, etc..). The Cobalt's serial console operates at 115200 8N1 (115200bps, 8 Bits, No Parity, 1 Stopbit). This is a requirement because the colo bootloader *will* need user interaction to procede with the netboot at this point in time. 2. Download the file "cobalt-nfsboot-colo_.gz" and unpack it into a directory which can be setup as an NFS export. 3. Create a symlink to this directory name "/nfsroot" (ln -sf /nfsroot). The /nfsroot is what the old cobalt bootloader looks for, and is, unfortunately, a requirement. 4. Add one entry to /etc/exports, which looks like this below: /nfsroot 192.168.x.x(rw,async,no_root_squash) Where 192.168.x.x (this assumes a class C private IP) is the IP address that will be assigned to the cobalt machine via DHCP. The NFS options are what work for me, so might as well use them. 5. Start/restart your NFS server. 6. Edit your dhcpd.conf file, set it up for serving netboot images if it isn't already (see the actual Gentoo/MIPS guide or the Sparc Netboot HOWTO for more information on this), and add a specific entry for the cobalt similar to this: host myhostname { #// Ethernet address of the client machine hardware ethernet aa:bb:cc:dd:ee:ff; #// IP address to assign fixed-address 192.168.x.x; #// TFTP Server next-server 192.168.x.y; #// NFS Server and NFS path to mount server-name "192.168.x.y"; option root-path "/home/nfs/cobaltroot"; #// The name of the file to be downloaded by the PROM filename "cobalt-netboot-.img.gz"; } 7. Start/restart the DHCP server. 8. Download the file "cobalt-netboot-.img.gz". This is the actual, full kernel that will be netbooted by the colo bootloader. Place it into a directory that can be accessed and read by a tftp server. 9. Setup and configure a tftp server. This part isn't discussed in full detail because tftp servers tend to be a little like an arcanic voodoo art. As long as the server can transfer the kernel image, it should work good enough or our needs. 10. Now the fun part -- Power on the cobalt, and hold down the Left/Right arrows. The LCD Panel should read "Netbooting...". After you see this message, you can release the buttons. 11. Keep an eye on the serial console. After several seconds, the cobalt bootloader should have, if everything was setup properly, negotiated with the server(s) to get it's NFS root mounted, and it will then boot the boot/vmlinux_raq-2800.gz kernel, which is really just a symlink to /boot/colo-chain.elf.gz. Provided it successfully boots the colo chain loader, you should see output similar to the following below: -=<[ "CoLo" Qube2/RaQ2 boot loader v1.8 (Apr 27 2004) ]>=- stage2: 88fb0000-89000000 pci: unit type "RaQ2" tulip: {aa:bb:cc:dd:ee:ff} ide: resetting 12. As *soon* as you see this screen, hit the spacebar, and you should get dropped off at a '> ' style prompt. You have to be quick about it, there's only about a 1 second delay before the chain loader looks for the first bootable harddrive partition. 13. At the colo prompt, type "net" as a command and press enter. This will invoke the network detection, and the DHCP server you setup will (for the second time) provide the machine with its assigned IP address. You will see output similar to below: > net net: interface up dhcp: DISCOVER dhcp: OFFER 192.168.x.x <-- 192.168.x.y dhcp: REQUEST arp: sent request for 192.168.x.y arp: resolved 192.168.x.y dhcp: ACK net: interface down net: interface up dhcp: address 192.168.x.x netmask 255.255.255.0 gateway 0.0.0.0 14. You will likely see other chatter from your network appear as well. Any windows machines or samba-enabled machines on the network typically broadcast udp packets on the broadcast IP to port 137/138, and with the current revision of the colo bootloader, these broadcasts will be visible. Just ignore them. 15. Next, type "tftp cobalt-netboot-.img.gz". This will invoke the tftp client built into colo to fetch the kernel image to boot from the tftp server. Since colo just got this support, this part isn't automatic, and must be supplied by the user. Future versions of colo will be able to obtain this information from the DHCP server. Provided the tftp server is working, you will see output similar to the below: > tftp 192.168.x.y cobalt-netboot-20040428.img.gz 4651KB loaded 0048ad8e 4763022t 16. The output is just the size of the file downloaded, and the load address of the file in memory (I think...). At this point, simply type "execute", and the kernel image will be decompressed and booted. 17. The kernel should boot, and it will discover a compressed ramdisk, which is the embedded root filesystem. It will load this, display some onscreen instructions for enabling the network, and allow you to start a busybox shell. Since a DHCP server is already running, for a quick network setup, start a shell and run "net-setup dhcp telnet". This will use DHCP to discover the IP, and then it'll load a telnet daemon for easier interaction with the system (the telnet daemon will eventually be replaced with an sshd daemon (dropbear) once I get it working). 18. From this point on, simply follow the Gentoo/MIPS install guide after the netbooting section, and skip over the parts relating to SGI stuff. I will be updating the guide in due time to reflect installation on SGI or Cobalt, but this may take awhile because it will require some reorganization of the install guide. Just keep in mind that the Cobalt uses an MS-DOS partition table, and IF you plan on using the old bootloader and chain loading colo, that /dev/hda1 MUST be an ext2 revision 0 (linux 2.0.x era) file system. If you plan on replacing the old bootloader with the newer bootloader, you will not have to worry about this limitation. But I must stress, that chain-loading is the safer method for now. If you really plan on replacing the old bootloader, please fully read and understand the documentation provided inside the colo source before doing so. Reference Information: colo and cobalt-linux patchsets: http://www.colonel-panic.org/cobalt-mips/ Gentoo/MIPS Home page: http://mips.gentoo.org Linux-MIPS Homepage: http://www.linux-mips.org