*BSD News Article 94735


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!howland.erols.net!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.openbsd.misc,comp.unix.bsd.freebsd.misc
Subject: Re: Booting Sparc 1
Followup-To: comp.unix.bsd.openbsd.misc,comp.unix.bsd.freebsd.misc
Date: 28 Apr 1997 22:01:53 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 78
Message-ID: <5k36oh$h0e$2@sol.ctr.columbia.edu>
References: <5jmv42$49@darkstar.ucsc.edu>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.openbsd.misc:68 comp.unix.bsd.freebsd.misc:39974


Daring to challenge the will of the almighty Leviam00se,
Thomas Gunnar Sparks (tgs@cats.ucsc.edu) had the courage to say:

: I've got two machines
: 1) Intel i386 Arch running FreeBSD
: 2) Sun Sparcstation 1 (running nothing)

: I'm trying to get the sun to boot over the net, into an OpenBSD bootfile.
: When I break into the rom monitor on the sun, and type boot net, it sits 
: and waits and then gives me messages about how its getting a timeout 
: waiting for an arp/rarp reply. I have rarpd going, but it doesn't seem to be 
: answering the sun's requests.

If this is FreeBSD 2.1.x, then rarpd is probably at fault. What you can
do if you don't want to upgrade to 2.2.x is this:

- Get the rarpd source and Makefile from the 2.2.1 distribution (or from
  FreeBSD-current; it hasn't changed in a while)
- Add -DBROKEN_BPF to the CFLAGS in the Makefile
- make; make install

The BROKEN_BPF is necessary because the 2.1.x BPF support in the kernel
incorrectly byte-swaps the ethernet frame type before transmitting. To
work around this, rarpd byte-swaps the frame type itself so that it ends
up correct when BOF byte-swaps it back. Yes this is stupid. 2.2.1's BPF
works correctly, so the -DBROKEN_BPF is not needed there. You can start
rarpd with debug and verbose flags to make sure it replies correctly to
the Sun's rarp requests.

: When I run rarpd /dev/ed0 I get "BIOCSETIF : Device not configured"

Network interfaces don't have /dev entries in BSD.

: When I run rarpd -a it seems to work just fine...

You mean it starts fine. That doesn't mean it works fine. :)

: I'm guessing its possibly a problem with rarpd, so is there a way to tell 
: the sun to hit my machine specifically?

No.

: If anyone has a similar setup to what I want to do, please let me know :)

To make rarpd work, you need to:

- mkdir /tftpboot
- Figure out the hexadecimal equivalent of the Sun's IP address. For example,
  if the address is 123.45.67.89 then the hex equivalent is: 7B2D4359.
- touch /tftpboot/7B2D4359

To actually get the Sun to boot from the machine, you also have to:

- copy the OpenBSD sun4c boot block to /tftpboot. For this example, we'll
  call it /tftpboot/boot.sun4c
- cd tftpbiit; ln -s boot.sun4c 7B2D4359.SUN4C
- Turn on tftpd in /etc/inetd.conf (make sure you specify /tftpboot as
  the directory to search)
- Turn on bootparamd
- Create an /etc/bootparams entry for the Sun

After here it gets a little tricky. You need to have NFS running on
the FreeBSD machine and export the rootfs to the Sun. You also need to
export the swap file. This gets messy because the Sun will try to mount
the swap file directly rather than mounting the directory in which the
file resides. The FreeBSD 2.1.x mountd may balk at this if you don't
set it up correctly. Check the mountd man page for details on this.

-Bill

--
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
  "Now, that's "Open" as used in the sentence "Open your wallet", right?"
=============================================================================