Date: Sat, 30 Mar 1996 02:38:58 +0100 (MET) From: Philippe Regnauld <regnauld@tetard.frmug.fr.net> To: hackers@freebsd.org (hackers) Subject: Howto: Sun 3's as X Terminal Message-ID: <199603300138.CAA07829@tetard.frmug.fr.net>
next in thread | raw e-mail | index | archive | help
In the spirit of what Jerry Kendall wrote some time ago (Diskless FreeBSD), here's another setup: ============= FILE: HOWTO TITLE: Installing a Sun 3/3x as an X Terminal. DATE: March 29th, 1996 After a little bit of experimenting, I have managed to convert a Sun 3/80 into a diskless X terminal. I had the setup working since last year, but have made a few changes relative to Jerry Kendall's howto (jerry@kcis.com). Many thanks to him for the original document. USING A SUN 3/3x AS AN X Terminal Nowadays, Sun 3's (3/50, 3/60, 3/80) are somewhat obsolete, but plenty of them still lie around, unused. They have a great display (19" mono / gray) and a nifty optical mouse. There is a corresponding package (XKernel) which was released just for this: it consists of a minimal Sun 3/3x kernel with no swap configured, and a dedicated X server. XKernel was put together by Seth Robertson (seth@ctr.columbia.edu). I won't go through the installation instructions of XKernel -- the READMEs are clear enough. This document is rather aimed at clarifying the FreeBSD aspects of such a setup. There are 5 steps to getting the Sun Xterminal up and running: I - configuring rarpd II - configuring tftp so the terminal can retrieve its files (kernel & co.) III - configuring bootpd IV - configuring NFS (yes, NFS is needed) V - configuring Xdm & Xfs HOW DOES THE SUN BOOT ? When you start up the Sun, by default the PROM configuration tells it to boot on le0 (lance ethernet). The Sun emits a Reverse ARP query to find out its IP address. The server (FreeBSD) looks up the ethernet address in /etc/ethers and uses /etc/hosts to determine the IP address to assign. Once this is done, the Sun tftp's its bootfile (in /tftpboot/) which contains minimal services (NFS, bootstrap, etc...). Using NFS (cf. /etc/exports), the Sun loads its kernel and starts operation. CONFIGURATION NOTE: Since Sun 3's use old 4.2BSD networking code, they have the bad habit of broadcasting on .0, not .255 -- this forces you to declare your ethernet configuration as follows: % ifconfig ed0 inet 192.168.1.42 broadcast 192.168.1.0 (Replacing the previous addresses with yours :-) Normally, broadcast should be .255 I. Configuring RARPD The first step, as indicated above, is to setup rarpd to enable Reverse Address Resolution. Do the following: - Edit the file /etc/ethers. It should look like this: # /etc/ethers 10:a5:7a:2b:3:5c myterminal.mydomain.net Where the first field is the ETHERNET address of the Sun -- how do you find out ? It says it at the top of the screen when you power up the Sun. The second field is the fully qualified domain name (FQDN) of the Sun terminal: it must have a corresponding entry in /etc/hosts, which enables the server to map the ethernet address to the IP address: # /etc/hosts 192.168.1.10 myterminal.mydomain.net myterminal The IP address is up to you: if you are connected to other machines on the network, respect the subnet addressing which is yours, and give your X terminal a valid address. Otherwise, just use one of the non-routed (192.168.x.x) addresses. You should then have /etc/rc.local start rarpd on bootup: # /etc/rc.local if [ -x /usr/sbin/rarpd ]; then /usr/sbin/rarpd ed0 fi echo -n ' rarpd' Where ed0 is the name of you ethernet interface. NOTE: Berkeley Packet Filter (BPF) must be configured for RARPD to work. It is also required to use tcpdump(1) -- which will prove very useful during the installation ! II. Configurinf TFTP Then comes the configuration of tftp. To do this, you must make sure that the tftp service is available -- check /etc/inetd.conf for the line: # /etc/inetd.conf tftp dgram udp wait nobody /usr/libexec/tftpd tftpd TFTPBOOTDIR The last parameter, TFTPBOOTDIR, is optional and is used to indicate the default directory from which tftp gets the requested files. I personally use /tftpboot. If this not already done, uncomment or add the line, and restart inetd: % ps ax | grep inetd 103 ?? Is 0:00.60 inetd % kill -1 103 Make sure that TFTPBOOTDIR exists, and that it contains the Sun's bootfile: % ls -l /tftpboot -rwxr-xr-x 1 root staff 104048 Nov 14 23:17 C0A8010A.SUN3X* -rw-r--r-- 1 root staff 83 Mar 25 23:26 cfg.192.168.1.10 The first file is the Sun bootfile provided with XKernel, which should be renamed as IPADDRESS.ARCH, where IPADDRESS is the IP address assigned to the X terminal, in hexadecimal notation. The cfg file should contain something equivalent: # /tftpboot/cfg.192.168.1.10 rootfs 192.168.1.42:/usr2/export/root/Xkernel hostname myterminal.mydomaine.net The first line tells where the NFS root filesystem of the terminal lies on the server (specified by its IP address and the absolute path). The file system will be mounted Read Only. The second line tells the terminal its hostname. III. Configuring bootparamd Make sure that the following line exists in /etc/inetd.conf: # /etc/inetd.conf bootps dgram udp wait root /usr/libexec/bootpd bootpd /etc/bootptab Like tftp, you have to restart inetd. The file bootptab should look like this: # /etc/bootptab myterminal:\ :ht=ether:\ :ha=10a57a2b35c:\ :sm=255.255.255.0:\ :hn:\ :ds=192.168.1.42:\ :ip=192.168.1.10:\ :gw=192.168.1.42:\ :vm=rfc1048: The lines are as follows: 'myterminal' The terminal's name without the domain name. 'ht=ether' The hardware type of 'ethernet'. 'ha=004001432666' The hardware address (the number noted above). 'sm=255.255.255.0' The subnet mask. 'hn' Tells server to send client's hostname to the client. 'ds=192.168.1.42' Tells the client who the domain server is. 'ip=192.168.1.10' Tells the client what it's IP address is. 'gw=192.168.1.42' Tells the client what the default gateway is. 'vm=...' Just leave it there... IV. NFS setup The NFS configuration is pretty straightforward: - Make sure you have NFS configured in the kernel :-) (or that you have the corresponding LKM available in /lkm) - Edit /etc/sysconfig: # /etc/sysconfig # Set to YES if this machine will be an NFS server nfs_server=YES - Edit or create /etc/exports: # /etc/exports /usr2/export/root/Xkernel -maproot=0:0 myterminal.mydomain.net This is to specify that /usr2/export/root/Xkernel is the filesystem to be exported via NFS, for myterminal.mydomain.net. As the XKernel package indicates, this directory should contain all the files needed for the Sun to run. Here is a typical installation: % ls -lg /usr2/export/root/Xkernel lrwxr-xr-x 1 root bin 10 Mar 30 02:01 Xsun@ -> Xsuns/Xsun drwxr-sr-x 2 root wheel 512 Nov 16 23:49 Xsuns/ drwxr-xr-x 2 root wheel 1536 Nov 16 23:49 dev/ drwxr-xr-x 2 root wheel 512 Nov 16 23:49 etc/ drwxr-xr-x 2 root wheel 512 Nov 16 23:49 sbin/ -rwxr-xr-x 1 root bin 86 Nov 18 17:50 startx* drwxr-xr-x 3 root wheel 512 Nov 16 23:49 usr/ -rw-r--r-- 1 root wheel 279 Oct 17 1993 version lrwxr-xr-x 1 root bin 12 Mar 30 02:01 vmunix@ -> vmunix.sun3x -rw-r--r-- 1 root bin 587078 Nov 16 22:32 vmunix.sun3x -rw-r--r-- 1 root staff 659816 Nov 14 23:08 vmunix.sun3x.all V. Configuring Xdm and Xfs. This is pretty much explained in the XKernel documentation -- remember to READ THE MAN PAGES ! RELATED FILES, by section: MANPAGES: FILES: tcpdump(1) xdm(1) /usr/X11R6/lib/X11/xdm/... xfs(1) ethers(5) /etc/ethers exports(5) /etc/exports hosts(5) /etc/hosts rarpd(8) /tftpboot /etc/ethers /etc/hosts tftpd(8) bootpd(8) /usr/libexec/bootpd ADDITIONAL FILES: /etc/inetd.conf /etc/services Okay, from here on, most of the stuff you need is in the XKernel documentation. Hopefully in the near future, I'll write up some installation scripts for everything, and make a package. <regnauld@freenix.fr> -- - [ regnauld@tetard.frmug.fr.net / +48.8N+2.3E / +33 1 4507 9391 / Sol 3 ] - - [ regnauld@freenix.fr / FreeBSD 2.x / ] - "Le schtroumpf est à l'homme ce que le bleu est au billard" - F.Berjon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603300138.CAA07829>