Gentoo Linux on a Sun SparcStation 4

Skip to Navigation »

Any information on this page may be outdated or otherwise inaccurate. Links may be broken. It stays here for historical reasons.

Big warning: If you do not know what a SparcStation 4 or a LAN is: stop reading NOW. I'm not able to answer very customized questions in my spare time. This document is just for archiving how to install Linux on a SparcStation 4 for seasoned users.

Fortunately I was able to get a Sun SparcStation 4 from my friend René. I wanted to install Gentoo Linux because it is a very beautiful distribution. Gentoo Linux is available for Sparc.

My SparcStation 4 has only a builtin floppy and a harddisk, but no CD-ROM, thus I was forced to boot over the LAN using RARP and TFTP. I had the server for TFTP already running from another installation (installation of a HP PA-Risc-Workstation). You'll find much documentation about setting up a TFTP-server with your prefered search-engine.

Required config-files on the server

/etc/ethers

In this file you've to write the MAC- and IP-address of the client.

08:00:20:7D:94:C3 192.168.1.22

/etc/dhcp/dhcpd.conf

This is the configuration of the ISC-DHCP-Daemon. (remark: quokka ist the hostname of my client)

…
group
{
    …
    host quokka
    {   
        hardware ethernet 08:00:20:7D:94:C3;
        fixed-address 192.168.1.22;
    }
    …
}
…

/tftpboot/

This is the directory the tftpd looks in for files. If the SparcStation 4 requests its netboot-image, it looks for a file like "C0A80116.SUN4M" where C0A80116 is the hexadecimal form of its IP-address (in my case 192.168.1.22). More informations about this filename are available in the UltraLinux-FAQ.

Because the installation of Gentoo Linux requires a 2.4-kernel the default netboot-image from Debian aren't enough (they're using a 2.2-kernel). There is a Debian-netboot-image with a 2.4-kernel available at http://auric.debian.org/~bcollins/disks-sparc/current/sparc32/.

Unpacking the stage3-tarball

The BusyBox-tar (bb-tar) on the Debian-netboot-image does not support filenames longer than 100 chars. What a crap! :)

I had the same problem on another machine, a HP PA-Risc workstation, thus I've known how to solve it this time. You need to create a image with dd on another machine (a x86 in my case), create a filesystem on it, mount it and unpack the stage-tarball. After doing that, unmount the file, eventually packit using gzip and put it on a http-server. On the SparcStation 4 is a wget-binary available on the Debian-netboot-image, thus you're able to fetch the image over the network, mount it on the loopback-device and move all files over to the to-be /.

Useful commands (may be not complete!):

cd
dd if=/dev/zero of=stage3.img bs=1M count=400M # create a 400 MiB-Image
losetup /dev/loop0 stage3.img
mke2fs /dev/loop0
mkdir /mnt/temp
mount /dev/loop0 /mnt/temp
cd /mnt/temp
tar xvjpf /path/to/stage3-sparc-20030710.tar.bz2
cd
umount /mnt/temp

You have now a stage3.img with a ext2-filesystem and stage3 on it. Put it now on your SparcStation.

losetup /dev/loop0 stage3.img
mkdir /mnt/temp
mount /dev/loop0 /mnt/temp
mv /mnt/temp/* /mnt/gentoo
umount /mnt/temp

Continue using the Gentoo Linux-documentation: http://www.gentoo.org/doc/en/handbook/handbook-sparc.xml.