divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb
Log | Files | Refs | README | LICENSE

commit 604b571668575773e754033790fdc9b45b68b60f
parent ee29d743829fd431432c6367cb6b629df937f491
Author: lostd <lostd@2f30.org>
Date:   Tue, 11 Mar 2014 21:28:00 +0200

Booting Sun UltraSPARC machines

Diffstat:
MMakefile | 5+++--
Mguides.md | 1+
Aguides/sunsparc.md | 105+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 109 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,7 @@ NAME = divzero TARG = /var/www/$(NAME) BASE = "/" -#BASE = "$(PWD)/" # uncomment for devel only +BASE = "$(PWD)/" # uncomment for devel only MENUPAGES = home.html lectures.html guides.html radio.html PAGES = $(MENUPAGES) \ @@ -10,7 +10,8 @@ PAGES = $(MENUPAGES) \ lectures/lecture2.html \ guides/openvpn.html \ guides/icecast.html \ - guides/git.html + guides/git.html \ + guides/sunsparc.html EXTRA = css divzerokey.png favicon.ico index.html \ lectures/resources diff --git a/guides.md b/guides.md @@ -3,3 +3,4 @@ Just some notes on various useful tasks. * [openvpn](guides/openvpn.html): Configuring an OpenVPN proxy on OpenBSD * [icecast](guides/icecast.html): Using icecast and mpd for web radio on OpenBSD * [git](guides/git.html): Simple git guide for CVS users + * [sunsparc](guides/sunsparc.html): Booting Sun UltraSPARC machines diff --git a/guides/sunsparc.md b/guides/sunsparc.md @@ -0,0 +1,105 @@ +### How I installed Debian on a Sun Ultra 10 from the network + +First of all, the first thing I tried is to replace the long-dead CD-ROM +drive with a newer IDE DVD-RW and install the latest OpenBSD release. +This worked as expected. I need, however, to also run Linux on an +UltraSPARC processor for development and the choice was Debian stable. +The bootable CD installer from Debian always hangs at a seemingly random +phase of the package installation process. The system has 256 MB of +memory and a 10 GB Western Digital disk. After many tries, and not +having identified the problem, I decided to try the network boot +installer and see what happens. This also failed, but I will document +the process of booting the installer from the network here. + +I connected back-to-back the Ultra 10 with my laptop that is running OpenBSD. +The laptop will host the boot image on its TFTP server. Downloaded the +`boot.img` for SPARC from the Debian website and put it into my +TFTP server root: + + # mkdir /srv + # cp boot.img /srv/ + # echo 'tftpd_flags="/srv"' >> /etc/rc.conf.local + # /etc/rc.d/tftpd start + +Next found out the MAC address the Ultra 10 has (it is written on the +top on the OpenBoot initial screen), and configured an IP address +mapping for RevARP: + + # echo 'de:ad:ba:be:de:ad snoopy' >> /etc/ethers + # echo '192.168.1.2 snoopy' >> /etc/hosts + # /etc/rc.d/rarpd start + +By default the machine will ask for a file named after the hex +representation of its IP address: + + # echo 192.168.1.2 | awk -F . \ + '{ printf "%02X%02X%02X%02X\n", $1, $2, $3, $4 }' + # cd /srv + # ln -s boot.img C0A80102 + +Now boot the Ultra 10 and press <kbd>Stop-A</kbd> to get to the `ok ` +prompt; here type `boot net`. I also used `tcpdump` on my wired +interface to monitor all requests this whole time, and kept PF disabled +while offline. When the installer loaded, I plugged "the other" network +cable to do DHCP business as usual. + + +### Installing OpenBSD on a Sun Blade 100 using network boot + +Edit the following configuration files to enable RevARP, BOOTP, and NFS +services on the server. + +/etc/rc.conf.local: + + tftpd_flags="/srv" + rarpd_flags= + bootparamd_flags= + portmap_flags= + mountd_flags= + nfsd_flags="-tun 4" + +/etc/ethers: + + de:ad:ba:be:be:ef blade + +/etc/hosts: + + 192.168.1.3 blade + +/etc/bootparams: + + blade root=192.168.1.1:/export + +/etc/exports: + + /export -alldirs -ro -network 192.168.1 -mask 255.255.255.0 + + +Get the bootloader and ramdisk files. Again, create a symlink named +after the hex representation of the IP address `192.168.1.3`. + + # mkdir /srv + # cd /srv + # ftp $MIRROR/OpenBSD/5.4/sparc64/ofwboot.net + # ln -s ofwboot.net C0A80103 + # cd /export + # ftp $MIRROR/OpenBSD/5.4/sparc64/bsd.rd + + +Connect the machines back-to-back and configure the network. + + # ifconfig em0 inet 192.168.1.1 + # /etc/rc.d/tftpd start + # /etc/rc.d/rarpd start + # /etc/rc.d/bootparamd start + # /etc/rc.d/portmap start + # /etc/rc.d/mountd start + # /etc/rc.d/nfsd start + +Boot the client machine and on the `ok ` prompt write `boot net bsd.rd`. +To get to the `ok ` prompt press <kbd>Stop-A</kbd>. If you do not have a Sun +keyboard press the power button two times while booting OpenBoot. + +Get cracking! + +lostd@