Installing Ubuntu 7.10 on a Sun Ultra-10 (UltraSparc IIi)
Table of Contents
Installing Ubuntu on a Sparc Ultra 10 is a great way to put some old hardware back to constructive use.
Ubuntu 7.10 comes as a server release only for Sparc (which by is console only), but it is possible to upgrade it to full GUI environment using the aptitude command.
The UltraSparc IIi on the Ultra-10 (typically at 440MHz) doesn't really have the grunt to run as a desktop environment with Gnome, but Xfce is usable enough to provide a console for graphical configuration of the system.
When I initially tried to upgrade the Sparc, SILO (which is the Sparc equivalent of LILO, or grub) crashed out. You will need to upgrade the OpenBoot Firmware on your Ultra-10 to 3.31 if you see the following error:
Allocated 8 Megs of memory at 0x40000000 for kernel
Loaded kernel version 2.6.15
Loading initial ramdisk (4821666 bytes at 0x10400000 phys, 0x40C00000 virt)...
Pretty decent documentation and instructions on reprogramming the flash (including internal jumper settings) are available at SunSolve.
Note that the image available on this website requires you to install the flash upgrade from within a Solaris environment.
An alternative way of doing this without a Solaris partition is to use netboot, as described here:
sudo aptitude upgrade
Adding server packages
The aptitude command is a front-end for the more powerful, but more arcane, Debian package management (apt, and dpkg) commands.
I needed to install an SSH server, so that I could remotely log into the box.
sudo aptitude install openssh-server
sudo aptitude install dhcp3-server
sudo aptitude install squid
Adding support for sound
By default, Ubuntu server for Sparc does not support the onboard sound module. This is pretty easy to resolve. Just add add the following to /etc/modules:
Installing 64-bit library support
The UltraSparc IIi is a 64-bit processor. The Ubuntu kernel is a 64-bit kernel, but the userland is 32-bit, i.e. most of the applications are 32-bit. This is due to the fact that there is little benefit in having all applications incur the overhead (cache, memory, disk space) of 64-bit when it doesn't bring any benefit to them.
For those that really would benefit from being in 64-bit mode (such as those requiring more than 4GB of addressible memory, for instance to memory map an extremely large file), installing the 64-bit development tools is accomplished by:
sudo aptitude install libc-dev-sparc64 libc6-sparc64
Test it with:
printf("sizeof(int) is %d\n", sizeof(int));
printf("sizeof(long) is %d\n", sizeof(long));
gcc -o foo32 foo.c
gcc -o foo64 foo.c -m64
Installing a C++ compiler (GNU g++)
sudo aptitude install g++
Installing an NFS server
sudo aptitude install nfs-kernel-server
sudo aptitude install zlib1g zlib1g-dev
sudo aptitude install libpcre3 libpcre3-dev libpcrecpp0
Since the UltraSparc IIi on the Ultra-10 is quite underpowered (typically at 440MHz), it is advisable to skip Gnome or KDE, and go for the much lighter-weight yet impressively powerful XFCE desktop:
sudo aptitude install xubuntu-desktop
XFCE is an amazing desktop for the amount of resources it consumes. Even on such low end hardware, it still manages to be featureful and responsive.
Running X on a Creator3D card
The Ultra-10 makes a fine headless server, and by default Ubuntu supports the Sparc platform in server mode. However, it is possible to install desktop components such as an X Window server and desktop productivity applications.
A common issue with Ubuntu 7.10 is where you boot with a monitor connected to the Creator3D card, whereas the sparc64 Linux kernel itself defaults to the ATI Rage-II card installed.
The solution to this problem is to add parameters on the SILO line to disable the ATI card:
SILO: install append = "video=atyfb:off"
You can add this to /etc/silo.conf once your system is fully installed.
append="quiet splash video=atyfb:off"
Replace the Buggy X server
The X server in 6.10 had some bugs where it locked up the bus. In the xorg log this is the error displayed before the crash :
xf86MapPciMem: Could not mmap PCI memory
Inappropiate ioctl for device
At this time (2007-4-2), there isn't an update from Ubuntu that resolves this problem. The workaround instead is to change the /usr/bin/Xorg binary yourself, by getting the update from the Debian SPARC project:
ar x xserver-xorg-core_1.1.1-15_sparc.deb
tar zxvf data.tar.gz
sudo mv /usr/bin/Xorg /usr/bin/Xorg.broken
mv Xorg /usr/bin/Xorg
Tweaking /etc/X11/xorg.conf to support Creator3D
Change section "Device":
Identifier "Sun Creator3D"
Option "UseFBDev" "true"
Change section "Screen":
Device "Sun Creator3D"
Ensure that you are using generic PS/2 keyboard and mouse. Yes, I know you have a Sun mouse - it looks like PS/2 to X, thanks to some software jiggery-pokery.
Using the ATI Mach64
The following code will switch to the ATI Mach64 for console output:
First of all, find the ATI device
In my case, it is
/pci@1f,0/pci@1,1/SUNW,m64B@2. To select this,
nvalias mach64 /pci@1f,0/pci@1,1/SUNW,m64B@2
setenv output-device mach64
To switch back to Creator3D:
nvalias creator3d /SUNW,ffb@1e,0
setenv output-device creator3d
To configure X11 to use the ATI rather than Creator3D:
I found that as of the latest 7.10 updates (which I installed on 2008-3-27, having had the machine off the net for a while), gdm wasn't working. I could run startx from the command line, but if I started gdm, the server would die after a second or so. After some googling of the issue, the solution appears to be modifying
and adding +xinerama to the end of the
command=/usr/bin/X -br -audit 0
[server-Standard] stanza. For some reason, gdm seems to be proving for Xinerama support.