diversions, a useful netbsd system on a vax 3100 in 80mb disk space.

A USEFUL NETBSD SYSTEM ON A VAX 3100 WITH ONLY AN 80MB HARD DRIVE

0. TAKE INVENTORY
1. A FIRST TEST
2. INSTALL NETBSD
3. FIRST BOOT
4. FREEING SPACE
5. INSTALL STANDARD PACKAGES
6. SYSTEM TUNING
7. ADDITIONAL SOFTWARE
8. REFERENCES


0. TAKE INVENTORY

Depending on where you dug your VAX out of, you might not have everything you need to get it going. In my case, it arrived sans hard drive, and the only thing I could dig up laying around the house that wasn't already in use and that had the correct 50-pin SCSI pinout was an 80G drive out of a disassembled Emax II and a Sony CD-ROM drive that I have five of for some reason. I believe looking at the system boards that this has both the mono and the 8-bit color framebuffer hardware, but I don't have the odd SPX/GPX connector or a VR260 / VR290 to hook it up to. I should probably build an adapter one of these days...
Anyway, here's the specs:

VAXstation 3100 Model 30 "PVAX" KA-42-A V1.6 CVAX 11.12MHz 16MB RAM 80MB HD CD-ROM Thin ethernet (10MBit) 9600-8-N-1 console on printer port


1. A FIRST TEST

You'll need some way to get console on the machine; the easiest way is to hook up a reasonably VT-compatible terminal (or your PC with a suitable emulator) to the MMJ 'printer' port @ 9600-8-N-1. I have both a VT420 and VT220 so I just used the closest one to the machine (the VT420).

You really want to make sure all your connections work and all your devices are recognized before you go any further. Make sure your machine can power up and get to the 'chevron' >>> firmware prompt on your console -- you might need to hit the halt button on the back if it's set to autoboot off of anything but the CD-ROM - particularly if you're trying to boot off an ethernet device without anything connected ;)

Type SHOW DEV to ensure your hard drive, CD-ROM, etc. are recognized -

>>> show dev VMS/VMB ULTRIX ADDR DEVTYP NUMBYTES RM/FX WP DEVNAM REV ------- ------ -------- ------ -------- ----- -- ------ --- ESA0 SE0 08-00-2B-16-31-4C DKA100 RZ1 A/1/0/0 DISK 84.0MB FX LP80S DKA400 RZ4 A/4/0/00 RODISK 106MB RM CD-ROM ...HostID... A/6 INITR >>>

You should run at least two diagnostics at this point: TEST B to check the system memory and TEST 50 to show the machine's configuration and any errors.

>>> test b B... >>> test 50 KA42-A V1.6 ID 08-00-2B-16-31-4C MONO 0000.0001 CLK 0000.0001 NVR 0000.0001 ? DZ 0000.4001 00000001 00000001 00000001 00004001 00000000 00000000 MEM 0010.0001 01000000 MM 0000.0001 FP 0000.0001 IT 0000.0001 STRG-1 7777.0001 V1.30 00000000 00000000 00000000 00000000 SCSI-A 1212.0001 V1.30 FFFFFF05 00000001 FFFFFF05 FFFFFF05 05000001 FFFFFF05 FFFFFF03 FFFFFF05 SYS 0000.0001 8PLN 0000.0001 V1.3 NI 0100.0001 >>>

We can see from the above that:

B...

Memory is good

? DZ 0000.4001 00000001 00000001 00000001 00004001 00000000 00000000

The serial line controller doesn't have the keyboard/mouse connected

MEM 0010.0001 01000000

There is 16MB installed in the system

STRG-1 7777.0001 V1.30 00000000 00000000 00000000 00000000

Nothing is hooked to the ST506/MFM connector

SCSI-A 1212.0001 V1.30 FFFFFF05 00000001 FFFFFF05 FFFFFF05 05000001 FFFFFF05 FFFFFF03 FFFFFF05

Two devices are hooked to the SCSI-A bus, a fixed disk at #1 and a CD-ROM at #4

NI 0100.0001

Ethernet AUI port is connected properly

MONO 0000.0001 8PLN 0000.0001 V1.3

Both the monochrome and 8-plane graphics options are installed

Obviously if you had some problems here, particularly with the memory or the disks, you'd want to replace them before going any further...


2. INSTALL NETBSD

You'll need the NetBSD 2.0 CD - ftp://ftp.netbsd.org/pub/NetBSD-archive/iso/2.0/vaxcd.iso

I used the stock 2.0 release, but presumably the 2.0.2 release would work as well. Don't bother with 3.1 or anything newer unless you've got a substantially bigger hard drive (say 500MB or so). I would have actually liked to use the 1.6.2 release since it's got plenty of pre-made pkgsrc packages for VAX, but booting off the CD hung the system.

1. At the chevron prompt, Boot off the CD-ROM. This device will be in the device table above.

>>> boot DKA400

2. NetBSD 2.0 will start up, and hopefully after a few minutes, you'll get the standard installation screen. Pick your language and then choose

a: Install NetBSD to hard disk b: Yes Hit enter to continue b: Custom Installation

You'll want to chose to install ONLY the kernel, base, System (/etc). This works out to

3M kernel 45M base 1M etc

and will leave about 26M free on the first boot before we trim stuff down.

x: Install selected sets a: Set sizes of NetBSD partitions

Doesn't make sense to split things up on such a small disk; just put a single partition with / on it. For some reason, the partition editor wants to make my 80MB disk a 102MB disk, so I have to resize it. You might want to switch the units to sectors to make sure you're getting the entire disk. Don't make a swap partition, we'll turn on a swapfile as needed

x: Partition sizes ok Please enter a name for your NetBSD disk: b: Yes

The disk will be formatted, etc. and then you'll be prompted to press ENTER to continue. Note that this doesn't make the disk bootable, we'll do that in another step.

a: Progress bar (recommended) c: CD-ROM / DVD c: Continue

The drive will be mounted and you'll be asked to hit ENTER to continue again. Now the packages will start extracting. This will take ~ 20 minutes.

Hit enter to continue

MAKEDEV will then take a few minutes to run.

Hit enter to continue Choose timezone Password Cipher (DES is fine) Set root password Hit enter to continue Choose Shell (you probably want ksh rather than the default csh, for history, etc.) Hit enter to continue

We need to do a few more things before rebooting so that the system will boot off the hard drive and the network will come up correctly, etc.

e: Utility menu c: Configure network Network device: le0 DNS domain: host name: vax3100 IPv4: 192.168.1.220 (some static IP on your network) IPv4 netmask: 0xffffffff00 (whatever your netmask is) IPv4 gateway: 192.168.1.1 (your gateway) IPv4 name server: 205.152.37.23 (your nameserver here

Accept the settings, then pay attention to the tests - the pings should work. Now we need to drop to a shell and do some configuration

a: Run /bin/sh # make the disk bootable disklabel -B /sd0 # mount the hard drive so we can make changes mount /dev/sd0a /mnt # set up networking # turn off unused daemons as desired # start sshd on boot echo "hostname=vax3100" >> /mnt/etc/rc.conf echo "dhclient=yes" >> /mnt/etc/rc.conf echo "cron=no" >> /mnt/etc/rc.conf echo "sendmail=no" >> /mnt/etc/rc.conf echo "inetd=no" >> /mnt/etc/rc.conf echo "sshd=yes" >> /mnt/etc/rc.conf echo "savecore=no" >> /mnt/etc/rc.conf # Allow root logins over SSH: echo "PermitRootLogin yes" >> /mnt/etc/ssh/sshd_config # Set the console type so it doesn't ask every time - note that even though I # actually have a VT420, I use the vt320-w so I can have 132 columns on the # system console. echo "if [ `tty` == \"/dev/console\" ]" >> /mnt/root/.profile echo "then" >> /mnt/root/.profile echo " export TERM=vt320-w" >> /mnt/root/.profile echo "else" >> /mnt/root/.profile echo " export TERM=vt102" >> /mnt/root/.profile echo "fi" >> /mnt/root/.profile # keybindings delete-char-forward beginning-of-line end-of-line bind '^[['=prefix-2 bind '^[[3~'=delete-char-forward # If you want home, try these: bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line # And end is like this: bind '^[[4'=prefix-2 bind '^[[4~'=end-of-line # I prefer 'less' to 'more': echo "export PAGER=/usr/bin/less" >> /mnt/root/.profile # This is a environment variable used by the joe editor to determine scrolling # mechanism, etc. Works a lot better with it turned on: echo "export BAUD=9600" >> /mnt/root/.profile # Everyone wants a fortune cookie when they log in: echo "/usr/games/fortune" >> /mnt/root/.profile ### umount the drive umount /mnt exit

Now you can halt the system from the menu; this will return you back to the firmware, where you can do

>>> set boot DKA100 >>> boot

and with any luck NetBSD will crank up. You don't have to set the boot device in the firmware if you always want to system to give you the chevron on startup.


3. FIRST BOOT

On the first boot, it will need to generate the DSA/RSA keypairs needed for SSH so you may as well go take a nap, drive to the store, etc. My system took about 30 minutes to get through this part. Once it's done, you'll be able to log on to the console as root, or via an SSH session.

### check the date, and set it if necessary date date YYYYMMDDhhmm ### ensure networking started (you should have an ip address) ifconfig le0 ### ensure your desired daemons, etc. are running ps aux

If everything looks ok, you can start trimming away the stuff you don't need.


4. FREEING SPACE

This should be more or less what we're starting with:

df -h /dev/sd0a Filesystem Size Used Avail Capacity Mounted on /dev/sd0a 78M 47M 26M 64% /

This minimal install will need to be a good deal smaller if we want to actually install a compiler or any other packages.

Since the disk is so tiny, even deleting unused directories can make a difference (if you delete enough of them). There's a lot of stuff I *won't* be using this server for - no printing, ftp, etc. daemons other than sshd and syslogd, no mail, no rsh and derived commands, etc.

I also pretty much only need LANG=C for localization/internationalization.

Obvously, your mileage may vary. Don't delete things you want to use!

First, we'll get rid of 8M or so of low-hanging fruit - the internationalization stuff and the rescue files:

rm -rf /usr/share/i18n rm -rf /usr/share/locale rm -rf /rescue rm -rf /altroot

And now to walk through the tree and yank out anything we don't need. Note that getting rid of the /etc/rc.d scripts will cause rcorder to complain at startup. I ignore complainy things, but if this bothers you, just change the dependencies in the scripts accordingly.

cd /bin rm domainname mt rcmd rcp rmail cd /etc rm -rf X11 bootptab cgd daily daily.conf dm.conf dumpdates floppytab rm -rf ftpchroot ftpusers hosts hosts.equiv hosts.lpd inetd.conf mail rm -rf mail.rc mailer.conf monthly monthly.conf mtree namedb ntp.conf rm -rf phones postfix postinstall powerd printcap racoon rbootd.conf rm -rf remote resolv.conf.save rmt security security.conf sliphome rm -rf uucp weekly weekly.conf changelist kerberosIV kerberosV fonts rm -rf mrouted.conf cd /etc/rc.d rm accounting altqd amd apmd cgd ccd dhcpd dhcrelay fixsb identd rm ifwatchd ipfilter ipfs ipmon ipnat ipsec isdnd kdc lpd mixerctl mopd rm moused mrouted named ndbootd nfsd nfslocking ntpd poffd postfix powerd rm ppp quota racoon raidframe raidframeparity rarpd rbootd route6d routed rm rpcbind rtadvd rtclocaltime rtsold rwho sendmail smmsp timed tpctl xdm rm xfs ypbind yppasswdd ypserv cd /sbin rm atactl brconfig ccdconfig cgdconfig clri dump dump_lfs rdump rdump_lfs rm fsirand ipf ipppctl lmcctl mount_ados mount_ntfs mount_smbfs ping6 rm pppoectl raidctl routed restore rrestore rtsol tbrconfig cd /usr rm -rf X11R6 cd /usr/bin rm at atq atrm audio* batch biff cdplay ci cksum co compile_et cu dc diff3 rm dig dnsquery expand fmt fold from fsplit hesinfo host hoststat id ident rm info innetgr jot kdump ktrace ktruss lam lastcomm leave lesskey locale rm lock look lp lpq lpr lprm machine mail Mail mailq mailx md2 md4 midiplay rm mixerctl mklocale more mset msgs netgroup nfsstat nslookup nsupdate od rm page pagesize paste pawd pgrep pkill pmap pr quota rcp rcs* rdist rev rm rlog rlogin rmd160 rpcinfo rs rsh rup ruptime rusers rwall rwho script rm sdiff send-pr sha1 shlock showmount skey skeyaudit skeyinfo skeyinit rm sum sysstat tcopy tftp tip tn3270 units unvis usb* uu* vacation vis rm vmstat what whatis whereis whois ypcat ypmatch yppasswd ypwhich zforce rm znew kdestroy kinit klist kpasswd cd /usr/sbin rm cnwctl daicctl dhcpd dhcrelay dtmfdecode faithd hlfsd ifmcstat ifwatchd rm ipfs ipfstat ipftest ipmon ipnat ippool ipresend ipsend iptest irdaattach rm isdn* mailstats mailwrapper map-mbone mlxctl mop* moused mrinfo mrouted rm mscdlabel named named* ndbootd ndc ndp nfsd ntpd ntpdc omshell pcictl rm post* pppd pppdump pppstats praliases pvcsif pvctxctl racoon rarpd rbootd rm rip6query rmt route6d rpc* rtadvd rtquery rtsold rwhod sendmail sliplogin rm slstats spray stdethers stdhosts sunlabel sup supfilesrv supscan sushi rm tcpdump timed timedc traceroute6 trpt trsp usbdevs uuchk vnconfig wiconfig rm yp* zdump zic amd amq kadmin kdc kstash ktutil cd /usr/share rm -rf sushi sendmail gnats calendar doc man dhcpd cd /usr/share/misc/ rm bsd-family-tree mail.help mail.tildehelp map3270 nslookup.help units.lib rm usb_hid_usages vgrindefs.db acronyms acronyms.comp cd /usr/libexec rm -rf atrun comsat fingerd ftpd identd lpr mail.local named-xfer postfix rm rlogind rexecd rmail rpc.rquotad rpc.rstatd rpc.rusersd rpc.rwalld rm -rf rpc.sprayd rshd sendmail sftp-server smrsh telnetd tftpd uucp uucpd cd /var rm -rf account at backups heimdal mail msgs quotas rwho yp rm cron/tabs/root rm -rf games/* cd /var/log rm -rf maillog rdist secure sendmail.st xferlog lpd-errs aculog cron cd /var/chroot rm -rf named ntpd cd /var/db rm -rf locate.database ns obsolete cd /var/spool rm -rf clientmqueue mqueue ftp postfix uucp uucppublic output/lpd

You can remove all the timezones that aren't yours, but you probably want to keep one around and symlink it to /etc/localtime so date conversions, etc. will work properly.

cd /usr/share mv zoneinfo/US/Eastern . rm -rf zoneinfo/* mkdir -p zoneinfo/US mv Eastern zoneinfo/US/ cd /etc ln -s /usr/share/zoneinfo/US/Eastern localtime

Trim down termcap to only the entries you need - in my case this was just vt100 vt102 vt102-w vt220 vt220-w vt320 vt320-w vt420

cd /usr/share/misc rm termcap.db vi termcap cap_mkdb termcap

And there are a few other things you can consider removing:

??? wscons - I really don't think it's used kerberos - I really don't think it's used pcs750.bin - I think this is microcode patches for 11/750s ??? Now, we can install some packages.


5. INSTALL STANDARD PACKAGES

This is how much space the additional NetBSD packages take up when uncompressed:

comp.tgz 58M these are the compilers games.tgz 7.4M games! man 35M man pages, some of which we might want later misc 11M miscellaneous stuff you don't need except possibly /usr/share/dict text 7.3M texinfo, groff, eqn, nroff stuff - useful

We don't really have enough space to uncompress anything big without pruning back the stuff we don't need as it uncompresses, so we certainly don't have the space to put the tarball on the same drive that we're decompressing to. This means we get it from the CD:

mount /dev/cd0a /mnt tar zxvf /mnt/vax/binary/sets/comp.tgz -C /

or over SSH:

ssh 192.168.1.41 'dd if=/mnt/tmp/vax/binary/sets/comp.tgz' | tar zxf - -C / ssh 192.168.1.41 'cd /tmp/netbsd-comp ; tar cf - *' | tar xf - -C /

comp.tgz

Primarily, I want to be able to use this machine to do native VAX compilations, so we'll get the big one out of the way first. With the NetBSD CD in the drive, do:

mount /dev/cd0a /mnt tar zxvf /mnt/vax/binary/sets/comp.tgz -C /

or from another machine:

ssh 192.168.1.41 'cat /mnt/tmp/vax/binary/sets/comp.tgz' | tar zxvf - -C /

We *almost* have enough space to unpack the entire thing, but much of it I don't need, like the FORTRAN or C++ compilers, static *_p.a and *_pic.a libraries, etc. I found it easiest to create a small script that I could run periodically in another SSH window whenever I found the disk space was getting too low (within 5MB of capacity or so) and once again at the end of the process to make sure I got them all.

#!/bin/sh rm /var/db/libc.tags rm -rf /usr/share/man rm -rf /usr/share/locale rm -rf /etc/mtree rm -rf /usr/libdata/lint rm -f /usr/libexec/cc1obj rm -f /usr/libexec/cc1plus rm -f /usr/libexec/f771 rm -f /usr/lib/libobjc* rm -f /usr/lib/librpc* rm -f /usr/share/mk cd /usr/bin rm asa c++ c++filt cvs cvsbug f77 fgen fort77 fpr g++ g77 rpcgen cd /usr/include rm -rf adosfs altq g++ kadm5 kerberosIV krb5 net80211 netatalk netccitt rm -rf netisdn nfs nsswitch.h ntfs objc rmt.h rmd160.h rpcsvc soundcard.h cd /usr/include/dev rm -rf apm ata ccdvar.h cgdvar.h ieee1394 ic ir isa ofw pci pcmcia raidframe rm -rf sun usb cd /usr/lib rm -f *_p.a *_pic.a i18n ... ldconfig

games.tgz

There's enough space to install these as-is, and trim them down after the fact.

tar zxvf /mnt/vax/binary/sets/games.tgz -C / rm -rf /etc/mtree rm -rf /usr/share/man/cat* cd /usr/share/man/man6/ rm morse.6 arithmetic.6 banner.6 bcd.6 ppt.6 rot13.6 hangman.6 caesar.6 rm canfield.6 atc.6 boggle.6 backgammon.6 countmail.6 dab.6 cribbage.6 rm factor.6 gomoku.6 fish.6 mille.6 number.6 monop.6 pom.6 pig.6 primes.6 rm robots.6 sail.6 snake.6 worm.6 trek.6 wargames.6 quiz.6 wtf.6 intro.6 cd /usr/games rm arithmetic atc backgammon banner bcd boggle caesar canfield countmail rm cribbage dab factor fish gomoku hangman mille monop morse number pig rm pom ppt primes quiz robots rot13 sail snake trek wargames worm wtf cd /usr/share/games rm -rf cribbage.instr quiz.db fish.instr cards.pck boggle atc ldconfig

text.tgz

There's enough space to install these as-is and trim them down after the fact.

tar zxvf /mnt/vax/binary/sets/text.tgz -C / rm -rf /etc/mtree rm -rf /usr/share/man/cat* cd /usr/share/groff_font rm -rf devcp1047 devdvi devkoi8-r devlatin1 devlbp devlj4 devps devX100 devX100-12 devX75 devX75-12 //// still need to prune this ////

man.tgz

Rather than install the entire 35MB package, we can just grab the manpage sources themselves for about 13MB to start with, and then trim them down a good bit by removing the ones we don't need.

mount /dev/cd0a /mnt tar zxvf /mnt/vax/binary/sets/man.tgz usr/share/man/* -C / cd /usr/share/man/man1 rm -rf altqstat.1 at.1 atari atq.1 atrm.1 audioctl.1 audioplay.1 audiorecord.1 rm -rf batch.1 biff.1 cdplay.1 ci.1 cksum.1 co.1 compile_et.1 crontab.1 cu.1 rm -rf daicctl.1 diff3.1 dig.1 dnskeygen.1 dnsquery.1 domainname.1 dtmfdecode.1 rm -rf fdformat.1 finger.1 fmt.1 fold.1 from.1 fsplit.1 grfinfo.1 hesinfo.1 rm -rf host.1 id.1 ident.1 info.1 innetgr.1 ipcrm.1 ipcs.1 ipftest.1 ipresend.1 rm -rf ipsend.1 iptest.1 kdestroy.1 kdump.1 kinit.1 klist.1 kpasswd.1 ktrace.1 rm -rf ktruss.1 lam.1 leave.1 lesskey.1 locale.1 locate.1 lock.1 look.1 lp.1 rm -rf lpq.1 lpr.1 lprm.1 lptest.1 mail.1 Mail.1 mailq.1 mailx.1 midiplay.1 rm -rf mixerctl.1 mklocale.1 mopchk.1 mopcopy.1 mopprobe.1 moptrace.1 mset.1 rm -rf msgs.1 mt.1 netgroup.1 newaliases.1 od.1 omshell.1 openssl_*.1 page.1 rm -rf pagesize.1 paste.1 pawd.1 pgrep.1 pkill.1 pmap.1 pmc.1 popd.1 post*.1 rm -rf pr.1 quota.1 rcmd.1 rcp.1 rcs*.1 rdist.1 rehash.1 repeat.1 rev.1 rlog.1 rm -rf rlogin.1 rmd160.1 rs.1 rsh.1 rtld.1 rup.1 ruptime.1 rusers.1 rwall.1 rm -rf rwho.1 script.1 sdiff.1 send-pr.1 sftp.1 shlock.1 skey*.1 source.1 rm -rf stop.1 sum.1 sup.1 suspend.1 tcopy.1 tftp.1 tip.1 tn3270.1 units.1 rm -rf unvis.1 uu*.1 vacation.1 vis.1 vmstat.1 what.1 whatis.1 whereis.1 rm -rf whois.1 x68k yp*.1 zforce.1 znew.1 //// still need to prune the ones below more cd /usr/share/man/man4 rm -rf acorn26 acorn32 alpha amiga atari cobalt dreamcast evbarm hp300 rm -rf hpcsh i386 mac68k macppc mvme68k pc532 pmax pmppc sgimips sparc rm -rf sparc64 sun2 sun3 x68k rm -rf faith.4 arc rm sequencer.4 audio.4 mpu.4 opl.4 umidi.4 cms.4 pcppi.4 sb.4 autri.4 clcs.4 eap.4 rm sequencer.* audio.* mpu.* opl.* umidi.* cms.* pcppi.* sb.* autri.* clcs.* eap.* midiplay(1), ioctl(2), ossaudio(3), audio(4), mpu(4), opl(4), umidi(4) For ports using the ISA bus: cms(4), pcppi(4), sb(4) For ports using the PCI bus: autri(4), clcs(4), eap(4) cd /usr/share/man/man5 rm uuencode.5 weekly.conf.5 rtadvd.conf.5 texinfo.5 rpc.5 rm route.conf.5 rhosts.5 remote.5 relocated.5 rcsfile.5 rm racoon.conf.5 printcap.5 phones.5 nsswitch.conf.5 netid.5 rm netgroup.5 named.conf.5 monthly.conf.5 mixerctl.conf.5 rm map3270.5 mailer.conf.5 isdn*.5 krb*.5 ip*.5 inetd.conf.5 rm hesiod.conf.5 ftpd.conf.5 ftpusers.5 dhcpd.conf.5 rm dhcpd.leases.5 daily.conf.5 crontab.5 ccd.conf.5 amd.conf.5 rm altq.conf.5 acct.5 access.5 cd /usr/share/man/man7 rm nls.7 mailaddr.7 cd /usr/share/man/man8 rm -rf acorn26 acorn32 alpha amiga atari cobalt dreamcast hp300 hpcmips i386 rm -rf mac68k macppc mvme68k pc532 pmax pmppc sparc sparc64 sun2 sun3 rm -rf yp*.8 sushi.8 rpc*.8 routed.8 route6d.8 rmt.8 rmail.8 rlogind.8 rm -rf rquotad.8 rshd.8 rstatd.8 rdump.8 rwalld.8 rwhod.8 rusersd.8 rm -rf raidctl.8 rarpd.8 rbootd.8 racoon.8 quota*.8 ppp*.8 ip*.8 isdn*.8 rm -rf irda*.8 uu*.8 next68k nfsd.8 nis.8 usbdevs.8 verify_krb5_conf.8 rm -rf timed.8 timedc.8 telnetd.8 tcpd*.8 traceroute6.8 sunlabel.8 sup*.8 rm -rf sushi.8 tftpd.8 slattach.8 slip*.8 slstats.8 smtpd.8 spray*.8 rm -rf rip6query.8 sftp-server.8 showq.8 moused.8 mrouted.8 mtrace.8 rm -rf mtree.8 named*.8 lockd.8 mail*.8 mld6query.8 mopd.8 kpasswdd.8 rm -rf kstash.8 ktutil.8 identd.8 inetd.8 kadmin.8 kadmind.8 kdc.8 rm -rf kerberos.8 dhcpd.8 dhcrelay.8 faithd.8 fingerd.8 accton.8 rm -rf ccdconfig.8 cgdconfig.8 cron.8 rtquery.8 rtsold.8 rtsol.8 rm -rf sendmail.8 atrun.8 rdump_lfs.8 rexecd.8 atactl.8 rtadvd.8 rm -rf rdump.8 ntptrace.8 ping6.8 rdisc.8 nis.8 nslookup.8 nsupdate.8 rm -rf ntpd.8 ntpq.8 next68k nfsd.8 zzz.8 apm.8 apmd.8

We can also save a ton of space by preformatting the man pages and then gzipping the preformatted files and deleting the sources; this will also cause man(1) to render the pages quite a bit faster. Here's a comparison:

6089 man.1 original man page 5329 man.0 preformatted man page 2531 man.1.gz original man page, gzipped 1870 man.0.gz preformatted man page, gzipped

Normally we'd use catman(1) to do this, but it also tries to build the whatis database, which takes a few years on this machine. So I created an alternate script 'zipman' that does the preformatting and gzipping for all the sources on the system:

#!/bin/sh # # zipman - preformat and compress man pages to save space # # # main loop - this gets the bulk of the pages for X in 1 4 5 6 7 8 do mkdir /usr/share/man/cat$X cd /usr/share/man/man$X for Y in * do Z=`basename $Y .$X` echo "nroff -msafer -man $Y > /usr/share/man/cat$X/$Z.0" nroff -msafer -man $Y > /usr/share/man/cat$X/$Z.0 gzip /usr/share/man/cat$X/$Z.0 gzip $Y done done # special handling for the architecture-dependent subdirs for X in 4 8 do mkdir /usr/share/man/cat$X/vax cd /usr/share/man/man$X/vax for Y in * do Z=`basename $Y .$X` echo "nroff -msafer -man $Y > /usr/share/man/cat$X/vax/$Z.0" nroff -msafer -man $Y > /usr/share/man/cat$X/vax/$Z.0 gzip /usr/share/man/cat$X/vax/$Z.0 gzip $Y done done

One additional nice bonus to this script is that the size of both of the zipped manpage source and preformatted files together is slightly less than the original uncompressed source. So you don't have to watch disk space like a hawk while it runs... which is good because it will take about 20 hours to run on all the manpages.

Once it's done, spot check a few of the preformatted pages to make sure they're working. When you're satisfied, you can eliminate the sources and gain about 6MB back:

# rm -rf man1/* man4/* man5/* man6/* man7/* man8/*


6. SYSTEM TUNING

This probably qualifies as a 'small memory' machine, so we apply this tuning:

vi /etc/sysctl.conf vm.anonmax=95

Normal operations (just editing/compiling single files and running the system) seem to do ok without any swap at all. However, compiles of medium to large codebases (lynx is about 104K LOC) will require some amount of swap. Since we don't want to dedicate a chunk of disk for swapping, we just create a temporary swapfile whenever needed:

dd if=/dev/zero bs=1m count=4 of=/swapfile chmod 600 /swapfile swapctl -a -p 0 /swapfile

and then remove it when done:

swapctl -d /swapfile rm /swapfile

If for whatever reason you need permanent swapspace, it can be added to fstab:

echo "/swapfile none swap sw,priority=0 0 0" >> /etc/fstab


7. ADDITIONAL SOFTWARE

joe

The traditional vi provided with NetBSD works, but it grates a bit at times when my hands accedentally hit vim keybindings all on their own... or the termcap isn't set up right and I have to remember the non-arrow navigation keys, etc. joe (jstar) uses the Wordstar keybindings I've been using since ~1980, and at 25K LOC is a reasonable medium-size project to attempt a first compilation for. The latest version of joe is 3.7 as of this writing, but it's twice the amount of code, and it compiles to a 900k executable -- so I used the lean and mean version 2.8 instead (which comes to 156k stripped).

Requirements: 1.3M for the unpacked source and transient .o files 4.0M of swap ~ 46 minutes to compile ~ 183 blocks disk space when installed # ftp ftp.ibiblio.org ftp> cd pub/linux/apps/editors/terminal ftp> get joe-2.8-src+bin.tar.gz ftp> bye # tar zxvf joe-2.8-src+bin.tar.gz # rm joe-2.8-src+bin.tar.gz # cd joe-2.8 # vi config.h /*long time();*/ # dd if=/dev/zero bs=1m count=4 of=/swapfile # chmod 600 /swapfile # swapctl -a -p 0 /swapfile # make # swapctl -d /swapfile # rm /swapfile # strip jstar -o /usr/bin/jstar # cp jstarrc ../.jstarrc # nroff -msafer -man joe.1 > /usr/share/man/cat1/joe.0 # gzip /usr/share/man/cat1/joe.0 # cd .. # rm -rf joe-2.8 # vi .jstarrc /// put jstarrc customization here ///

lynx

Possibly the best option for web browsing on this machine, even if we did have X running. By disabling most of the features I use other standalone programs for and stripping the binary, we can get it down to 700K.

Requirements: 16.0M for the unpacked source and transient .o files 8.0M of swap ~ 4.5 hours to compile ~ 853 blocks disk space when installed ftp ftp.cyf-kr.edu.pl ftp> cd pub/unix/lynx/current ftp> get lynx2.8.6rel.5.tar.gz ftp> bye # tar zxvf lynx2.8.6rel.5.tar.gz # rm lynx2.8.6rel.5.tar.gz # cd lynx2-8-6 # dd if=/dev/zero bs=1m count=8 of=/swapfile # chmod 600 /swapfile # swapctl -a -p 0 /swapfile # ./configure --disable-alt-bindings \ --disable-bibp-urls--disable-color-style --disable-config-info \ --disable-dired --disable-extended-dtd --disable-file-upload \ --disable-finger --disable-forms-options --disable-ftp --enable-full-paths \ --disable-gopher --disable-included-msgs --enable-justify-elts \ --disable-largefiles --disable-long-list --disable-menu-options \ --disable-news --enable-partial --disable-persistent-cookies \ --disable-prettysrc --disable-read-eta --disable-source-cache \ --disable-trace --disable-addrlist-page --disable-cgi-links \ --disable-change-exec --disable-charset-choice --disable-cjk \ --disable-debug \ --disable-default-colors --disable-exec-links --disable-exec-scripts \ --enable-externs --disable-find-leaks --disable-font-switch \ --enable-gzip-help --disable-htmlized-cfg --disable-internal-links \ --disable-ipv6 --disable-japanese-utf8 --disable-kbd-layout \ --disable-libjs \ --disable-locale-charset --enable-nested-tables --disable-nls \ --disable-nls-fork --disable-scrollbar --disable-syslog \ --enable-underlines \ --disable-vertrace --disable-widec --sysconfdir=/etc \ --with-screen=curses && make # swapctl -d /swapfile # rm /swapfile # strip lynx -o /usr/bin/lynx # mkdir -p /usr/local/etc # cp lynx.cfg /usr/local/etc/ # cp samples/lynx.lss /usr/local/etc/ # nroff -msafer -man lynx.man > /usr/share/man/cat1/lynx.0 # gzip /usr/share/man/cat1/lynx.0 # cd .. # rm -rf lynx2-8-6

mc

The Midnight Commander, for when you want to navigate a directory tree in a bit nicer fashion than pushd/popd.

Don't be fooled by the giant 1.3MB executable; if you run strip(1) on it you can reduce it to about 300K.

Requirements: 8.0M for the unpacked source and transient .o files 4.0M of swap while compiling ~ 1.5 hours to compile ~ 634 blocks disk space when installed # ftp ftp.gnu.org ftp> cd gnu/mc ftp> get mc-3.2.1.tar.gz ftp> bye # tar zxvf mc-3.2.1.tar.gz # rm mc-3.2.1.tar.gz # cd mc-3.2.1 # dd if=/dev/zero bs=1m count=4 of=/swapfile # chmod 600 /swapfile # swapctl -a -p 0 /swapfile # ./configure && make && make install # swapctl -d /swapfile # rm /swapfile # nroff -msafer -man /usr/local/man/man1/mc.1 > /usr/share/man/cat1/mc.0 # gzip /usr/share/man/cat1/mc.0 # nroff -msafer -man /usr/local/man/man8/mcserv.8 > /usr/share/man/cat8/mcserv.0 # gzip /usr/share/man/cat8/mcserv.0 # /usr/share/man/man8/ # rm -rf /usr/local/man # strip /usr/local/bin/mc # cd .. # rm -rf mc-3.2.1

slrn

screen

centericq

iptraf

links-2

links-2 http://links.twibright.com/download/links-2.2.tar.gz

htop


8. REFERENCES

http://www.mcmanis.com/chuck/computers/vaxen/buildvax.html
http://en.wikipedia.org/wiki/VAXstation#VAXstation_3100_Series
http://home.iae.nl/users/pb0aia/vax/dsvs3100.html
http://home.iae.nl/users/pb0aia/vax/vs3khw.html
http://www.people.vcu.edu/~agnew/MVAX/MVAX_FAQ.HTML
ftp://ftp.netbsd.org/pub/NetBSD-archive/iso/2.0/
ftp://ftp.netbsd.org/pub/NetBSD-archive/NetBSD-2.0/vax/INSTALL.txt
http://www-aix.gsi.de/~kraemer/COLLECTION/DEC/vax.html#vs3130
http://www.people.vcu.edu/~agnew/MVAX/SOC3100.HTML
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/vax/1.6.2/
http://poetry.freaknet.org/poetryminihowto/microvax-3100-console-hack_asbesto.txt
http://antinode.info/dec/vs3100_diag.html
http://antinode.info/dec/index.html#VAXstation_3100
http://mail-index.netbsd.org/tech-kern/2002/11/27/0005.html