Running Linux on JavaStations
Remember those old funny-shaped purple-grey boxes from Sun? You might be
suprised to learn that they can run Linux. There again, you might not.
JavaStations are MicroSPARC based machines, and SPARC-Linux has been around for
years. Recently some bright spark (no pun intended!) had the idea to run Linux
on one. Now it seems the whole world is at it...
I have two JavaStations, one is a Krups (looks a
bit like a kettle) and the other an older Mr. Coffee
(looks like a brick, it's actually a Sun drive case). I recently picked up
on the JavaStation HOWTO
and had a go at making them boot. Unfortunately the piggyback utility used in
the HOWTO is designed for SPARC-based machines, and I only have x86-based
machines at home, so I took the liberty of porting it to i386-Linux.
Modified piggyback source + i386 binary (40Kb)
Using Linux-i386 as a boot server
Once you have got hold of the kernel and rootfs images described in the HOWTO,
you will need to modify the rootfs image to have the right IP addresses in it.
This is easy, as ext2fs is the same on SPARC as it is on i386. The modified
piggyback is used to tack this onto the kernel. DHCP, TFTP and RARP (if
needed) are setup as per the HOWTO. And Bob's your uncle - up she comes.
Using Windows as a boot server
If you dual-boot your machine, or simply only have Windows, you can still boot
JavaStations from a Windows box using Cygwin.
You will need a suitable DHCP server (NOT Weird Solutions' DHCP Turbo,
as this truncates BOOTP packets) - I am using a modified version of
ISC DHCP under Cygwin - this is
configured as per the HOWTO. Cygwin provides a version of tftpd and this
can be used after a couple of minor configuration changes. Firstly tftpd runs
as 'nobody', so you need to add entries to /etc/passwd and
/etc/group with uid 99 and gid 99 - on NT/XP these also need to
have valid ids in the description field e.g.:
## /etc/passwd
nobody:*:99:99:Nobody,S-1-5-21-299502267-854245398-1846087971-1003:/:/sbin/nologin
## /etc/group
nobody:S-1-1-0:99:
Secondly, you also need to modify the entry in /etc/inetd.conf
to specify a root directory:
tftp dgram udp wait nobody /usr/sbin/in.tftpd in.tftpd -l /tftpboot
In this case the root is /tftpboot . I added the -l
(lowercase "L") to turn on logging (to the Windows Event Log) of the files that
are being transferred. tftpd is run from inetd , which lives in
/usr/sbin , so start this rather than trying to start tftpd
directly.
If you have a Mr.Coffee, you will also need a RARP daemon. I have only
found one suitable RARP daemon for Windows, which is written by Lew Perin
and available from his website.
This is suitable for NT/XP only. I have written an
awk script
which converts
/etc/ethers into the format needed by Lew's rarpd. Note that
there is no RARP daemon for Cygwin, as the required level of access to sockets
is not available.
There is currently no way of creating ext2 filing systems under Windows, nor
is there any way of running NFS, so you will have to use a pre-built initrd
image, such as one from the HOWTO, or build one on a Linux box.
Troubleshooting
Most problems are caused by missing something obvious in the HOWTO, but if you
are using an untested setup, particularly different DHCP servers, then here are
some tips:
Use tcpdump on Linux or
WinDump on Windows to monitor the
conversation between the JavaStation and the boot server. If you want to
decode packets fully, us -s 0 to capture the full packet, and
-w file to write the packets to a file. You can the
use -w file to play them back and filter and display
them at leisure. A good filter might be rarp or port 67 or arp or
tftp , which will show most interesting boot stuff.
The details of the Mr.Coffee boot sequence are here.
The details of the Krups boot sequence are here.
If your machine tries to mount a NFS root, even if you are using the
piggybacked initrd method, then try an earlier release of PROLL such as
ID13. I found that ID18 was reading arguments from somewhere that I
didn't necessarily want.
If your Krups doesn't boot, or boots JavaOS, then one word of warning, the
Krups contains a Flash EEPROM. It much prefers what's in the flash to
what's on the boot server, so you need to carefully remove the flash
before trying to boot a Krups. See the HOWTO for more information.
|