SPARC and netboot. I have never used a SPARC system before tonight. I attempted to install my favorite distro Gentoo onto an old Sun Netra X1 server. This server has no disk drives nor does it have video or keyboard (serial only). My usual mode of installation is via PXE boot, so I set off to perform a network boot install on this machine. Well right off I went awry. Sun uses OpenBoot, which does not perform PXE, it does a different type of netboot involving RARP. Here is a run-down of how to get it working. 1. Install RARPD, it is part of iputils, or rarpd. iputils is part of the base system, so you likely already have it. # emerge -av iputils 2. RARPD works by listening for ARP request from a MAC address specified in /etc/ethers. /etc/ethers has a mac address/host name combo one per line. It then answers the ARP request with an IP address configured in /etc/hosts corresponding to the host name. This lets the client know that someone is listening (and cares). The Sun box assumes this special someone is the boot server, and attempts to download a bootable image via tftp from them. You configure and execute RARPD as follows. # echo "00:00:00:00:00:00 myhostname" >> /etc/ethers # echo "192.168.1.148 myhostname" >> /etc/hosts # rarpd -ve eth0 3. Now you need tftpd listening ready to deliver a bootable image. This is where I had the most difficulty. I tried various images with little or no success. a. I tried the official Gentoo image, I could not use chroot as the kernel was apparently too old. b. I tried an unofficial Gentoo image, this one did not setup the kernel to use the serial console, thus, no output. c. I finally settled on the ubuntu 6.10 image. I booted it, ran the installer to the point that I had configured the network and partitioned my disks, then I backed out and ran a shell. This dropped me into busybox, where I then did a Gentoo install :-). Once you have an image, place it into your tftpd root. Start tftpd. You the have two options for finding what to name your image. a. Do what I did and boot your client, tail /var/log/messages for the file name. b. Convert the IP address you put into /etc/hosts for your client into the hex equivalent. Link your boot image to the proper name: # mv boot.img ubuntu-6.10.boot.img # ln -sf ubuntu-6.10.boot.img C0A8FE02 4. Now to boot the client. This was tricky since I had never used Sun gear before. This box has a serial interface, which hooks to the LOM. This is the Lights Out Management interface. It is a simple command line interface. It allows you to do some very basic stuff like power the box up or down. Once the system powers up, you enter the system console. You can get back to the LOM using an escape sequence “#.” while the system is running. Further if the system is running, you can send a break to the LOM to enter an ok prompt. This is where you can manage the boot settings. I used the following commands to get my net boot working. lom> poweron console> #. lom> ^C ok> printenv ok> set boot-device net ok> set diag-switch? false ok> boot net * ^C is a break, I used minicom to send a break: cntrl+a Z F
Tuesday, August 27, 2013
sparc & netboot
from: http://ben.timby.com/?p=46
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment