I am getting to the serial console via a network to usb to serial relay using a derelict Raspberry Pi.
For some stupid reason the people who designed rarpd made it check for a file with such a name in the /tftpboot directory. This violates the principle of having a program do one thing well and simply and introduces a needless interdependence. A bad decision we are now stuck with.
This bad decision is compounded by Fedora making the tftpd program work from the /var/lib/tftpboot directory by default (what was wrong with /tftpboot?) This change is no big deal (once you know about it), but it would only make sense to also make rarpd look into this directory. My tips are probably the simplest way to deal with all of this.
Note that if you just want to get this working, you can make C0A8001E be any rubbish file (for now). The rom will load and try to run it, but you can get this process set up and tested and then worry about proper content.
EEPROM: Using RS232 A port. Selftest Completed. Sun Workstation, Model Sun-3/200 Series. ROM Rev 3.0, 16MB memory installed, Serial #13355. Ethernet address 8:0:20:0:4:B1, Host ID 1300342B. Testing 8 Megabytes of Memory ... Completed. Auto-boot in progress... EEPROM boot device...Boot: ie(0,0,0) Requesting Internet address for 8:0:20:0:4:B1The last message indicates that it is trying to get an IP number for itself using the ancient RARP protocol.
su dnf -y install rarpdThat took all of 10 seconds. This expects a file /etc/ethers with a simple format:
08:00:20:00:04:B1 192.168.0.30I also add this entry to /etc/hosts
192.168.0.30 sunnyAnd now I try the usual sort of things to start the service:
vi ethers root@trona:/etc# systemctl start rarpd root@trona:/etc# systemctl enable rarpd Created symlink '/etc/systemd/system/multi-user.target.wants/rarpd.service' → '/usr/lib/systemd/system/rarpd.service'.And I see:
ps -alx | grep rarp 1 0 185771 1 20 0 2560 1532 do_pol Ss ? 0:00 /usr/sbin/rarpd
The rarp protocol does not use any UDP or TCP port. It works at the data link level. So firewall rules are not involved. I test this by stopping the firewall and then pressing the reset button on the sun 3/280. It still does not work.
systemctl stop firewalldI try running wireshark with the capture filter "rarp". This works! I see the Sun sending "who is" packets, and wireshark even associates them with the proper IP -- 192.168.0.30!!
The problem (I discover later) is that rarpd is looking for a proper file in /tftpboot, not finding it, and refusing to respond.
There is a man page for rarpd, and it talks about the default behavior being not to respond if there is not a bootable image in the /tftpboot directory. I decide to run rarpd by hand and give it some options:
systemctl stop rarpd cd /usr/sbin ./rarpd -v -eI should also have given the -d switch to get it to stay at the terminal. However with the -e switch (telling it not to check for a bootable image) it works:
EEPROM boot device...Boot: ie(0,0,0) Requesting Internet address for 8:0:20:0:4:B1 Using IP Address 192.168.0.30 = C0A8001E tftp: time-out.
Fedora runs tftpd using the directory /var/lib/tftpboot. Let's see what happens if I do this:
cd /var/lib/tftpboot cp /etc/hosts C0A8001EAnd to check the obvious:
ps -alx | grep tftp 4 0 187297 1 20 0 2836 1788 do_sel Ss ? 0:00 /usr/sbin/in.tftpd -s /var/lib/tftpbootWireshark shows that requests keep being sent to read this file, but my tftp server is not responding.
systemctl restart tftp.serviceNope.
I am starting a new page just for tftp setup.
Note that the "right thing" to do is to have the proper file waiting in the tftp directory (but rarpd must know what directory that is). So you don't really need to run it with the -e switch, just have the file ready.
I rebooted, and the sun fails to get a rarpd response. I am sure this is because rarpd is looking at the old /tftpboot location. I wish the -e switch behavior was the default.
We start this via "systemctl start rarp.service" -- two files may be significant:
/etc/systemd/system/multi-user.target.wants/rarpd.service /usr/lib/systemd/system/rarpd.serviceBut why two? And which one? The word is that the stuff in /etc is for customizations and the stuff in /usr/lib is the base standard and should not be fooled with. The recommended process is to use "systemctl edit rarpd.service" and add a "snippet".
This would generate /etc/systemd/system/rarpd.service.d/override.conf
This is all well and good, but just what do I put in here to add the -e option to rarpd?
ExecStart= ExecStart=/usr/sbin/rarpd -e $OPTIONS $INTERFACEAfter some searching, I used systemctl edit and typed in the above. When I exit their crazy editor I see:
Successfully installed edited file '/etc/systemd/system/rarpd.service.d/override.conf'.I restart the service, press reset on the sun, but it does not work.
/usr/lib/systemd/system/rarpd.serviceI add the "-e" option as follows:
ExecStart=/usr/sbin/rarpd -e $OPTIONS $INTERFACEThen I do:
systemctl daemon-reload systemctl restart rarpd.serviceAnd it works! So much for this fancy (but useless) systemctl edit business.
Yet, I may have to revisit this someday when and if someone updates rarpd, but I have these notes to help me then.
Much more of this and I'll just go find rarpd source, build and run it myself. Then I can make it look in /var/lib or just make -e the default.
Tom's Computer Info / tom@mmto.org