Running Debian GNU/Linux on Old Alpha Workstations

Tim Fraser
tfraser@alum.wpi.edu
17 December 2001

This article appeared on debianPlanet on 19 February 2002.

This article describes how to have fun and impress your friends by obtaining old Alpha workstations and installing Debian GNU/Linux on them. I'll be installing "potato" (2.2.R3) on my AlphaStation 250. This is a 1995-vintage workstation with an Alpha CPU. It's the main application/DNS/NFS/DHCP server on my home network, and is presently my favorite machine. I had been running RedHat on it, but after seeing "apt-get dist-upgrade" run for the first time earlier this year, I've been upgrading all my boxes to Debian.

Getting into old hardware

It's fun to play with old hardware. I especially like old UNIX workstations. In addition to the AlphaStation, I own several Digital Multia "Universal Desktop Boxes" with Alpha CPUs, a Hewlett/Packard Apollo 720 (Hurray for HPPA support in "woody"!), and a NeXTstation N1100 - and I'm always looking for more. Why are these machines fun? Part of the appeal is obtaining the unobtainable: when these machines were new, they were the stuff of my dreams - I could never have afforded them. Part of the appeal is being different - anyone can own a PC, not everyone runs an AlphaStation. But the biggest part of the appeal is cost: many people don't want these machines anymore; you can often get them cheap, or even free!

It's not difficult to acquire your own 90's-era UNIX workstations. Sellam Ismail has an excellent primer on finding old computers on the Vintage Computer Festival website. He lists many potential sources of machines. I've found machines on Internet auction and for-sale sites. Some turn up on local LUG mailing lists. I often see SPARCs, SGIs, and DECstations at Hamfests. (Hamfests are flea markets for Amateur Radio and computer users.) If you spread the word that you collect old hardware, people that want to get rid of old machines may actually come to you. I've gotten about half of my machines for free in this manner.

Note that old computers have often been raided for spare parts; it's not unusual to see machines for sale without RAM and disk drives. So, make sure you know what's missing before you buy a machine, and keep in mind that you'll have to fix it before you can get the machine up and running.

Alphas are a good place to start

The early 90's had many UNIX workstation vendors. There are plenty of models to choose from, many of which are supported by Debian GNU/Linux. Alpha machines represent a good place to start exploring the world of old computers, for two reasons: First, there is good documentation available for them, and second, they are compatible with many kinds of common PC hardware.

Documentation:
There is plenty of documentation for old Alpha workstations on the Net. Many operating systems support the Alpha architecture, so there is no shortage of support pages, mailing lists, and HOWTOs. The Alpha Linux page is a particularly good resource. Furthermore, you can still download the original manuals for many Alpha workstations from the old Digital FTP site. This documentation can help you overcome both hardware and software problems.

Compatibility:
Alpha workstations are compatible with many kinds of inexpensive PC hardware. For example, my Alpha workstations use VGA, 10BaseT Ethernet, and PCI cards, just like the average PC. My Multia workstations even have two PCMCIA card slots.

Being able to use standard PC monitors and cards on my Alphas has been a considerable convenience. However, there are limits to this compatibility: all my Alphas require full-parity 72-pin SIMMs - an unusual kind of RAM that seldom can be obtained as cheaply as more common PC-oriented flavors. Also, Multia workstations won't operate without a live Rayovac 840 clock battery (or a superior modern replacement model), requiring a trip to a store that sells batteries for old Macs.

Installing Debian GNU/Linux

I'm going to be installing Debian GNU/Linux 2.2R3 "potato" on my AlphaStation 250. The machine has a 3.5" floppy drive, a SCSI CD-ROM reader, and an 8 GB SCSI hard disk. It also has an SVGA monitor and a keyboard to act as a console. I've got the Binary-1 CD-ROM for installation media.

The instructions provided on the Binary-1 CD-ROM for this kind of install are quite good. Although there's little I'll be able to add to them here, this account will at least demonstrate that installing on Alphas is not significantly harder than installing on a typical PC.

I've already backed up all the data from the AlphaStation on which I'm going to install. You should make backups too, because, although it's intended to be accurate and helpful, this account of my install my contain errors, and is provided without warranty.

FYI, there's a great deal of useful hardware support information in Chapter 2 "System Requirements" in the Debian installation manual, including a reference to the Linux Alpha HOWTO. Reading through this material is a good way to become an educated consumer before buying Alpha hardware.

Section 6.6 "Alpha Console Firmware" is also a good source of information for those new to Alpha machines. The Alpha console firmware is much more powerful than the BIOS on most PCs. As a rule, this firmware implements two complete interactive console shells: a command-line-oriented one called "SRM" designed to support UNIX and VMS, and a menu-oriented one called "ARC" designed to support Windows NT. You can use either console shell to boot Linux off of a floppy or hard disk. However, the SRM console shell is more powerful than ARC: for example, SRM can boot Linux from an Ethernet device. The Debian installation instructions suggest SRM over ARC. Although I've had good luck with ARC in the past, I'm going to use SRM this time.

  1. Boot to the SRM console shell.

    The first step is to power-on the machine and boot to the SRM console shell. The SRM console shell prompt looks like ">>>". If, instead of this prompt, your Alpha boots to a blue screen with menus, that's ARC. If you wind up in ARC, navigate the menu tree until you find the option to switch to the SRM console shell. The proper series of choices should be something like:

    Once you select the "Switch to Digital UNIX" item, power cycle the machine and it should come up in the SRM console shell.

    An amusing fact: all you'd need to do to switch back to ARC from SRM would be to type "arc" and hit return. Who says command line interfaces are harder to use? The original manuals from the Digital FTP site cited above contain complete reference information for both console shells, if you want it.

  2. Boot Linux from the CD-ROM.

    Stick the Binary-1 CD-ROM in the reader. At the ">>>" SRM prompt type

    show dev

    The show command will show you all the devices. For example, my floppy drive shows up as dva0, my SCSI hard disk shows up as dka200, and my SCSI CD-ROM reader shows up as dka600. So, I'll ask the SRM console to boot the Linux kernel from my CD-ROM like this:

    boot dka600 -file boot/linux

    The boot command boots the Linux kernel, which should start the Debian install program automatically.

  3. (Re)partition the hard disk.

    The SRM console shell uses a bootloader called "aboot" to boot the Linux kernel. The aboot bootloader is the equivalent of lilo or grub on PCs. The aboot bootloader requires your hard disk partition table to use a BSD-style disklabel. Most PC bootloaders do not require BSD-style disklabels, so if you've partitioned your hard disk with a PC before, the disklabel is probably not there. So, you should execute the "partition your hard disk" installation step, even if your disk is already partitioned. This will allow the fdisk program to create the proper disklabel for you, automatically.

    Unfortunately, the default cfdisk disk partitioning program can't handle BSD-style disklabels. We'll be forced to use the more-powerful alternate fdisk program, which is harder to use. A transcript of my session with fdisk follows, as an example. My input and some comments (delimited with /* and */) are shown in bold.

    Command (m for help): b   /* Give me BSD-style disklabel */
    /dev/sda contains no disklabel.
    Do you want to create a disklabel? (y/n) y
    

    At this point, fdisk displays an empty partition table. The automatically-generated entry for "c:" just shows the geometry of the drive; it's not a partition that takes up space, it's not a partition you can put data in. I'll just pretend it's not there, and I won't use the label "c:" for any of my partitions.

    Fdisk also shows some information about the drive geometry here, including the number of bytes in each sector, and the number of sectors in each cylinder. My disk has 512 bytes per sector, and 2048 sectors per cylinder, so I know that each cylinder is 1MB in size. This is useful information, because I'll be choosing sizes for my partitions in units of cylinders in the next steps. Note that I start my first partition at cylinder 2 in order to leave room at the head of the drive for the "aboot" boot loader.

    BSD disklabel command (m for help): n   /* 1/2GB for root */
    Partition (a-h): a
    First cylinder (1-8347, default 1): 2
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): 511
    
    BSD disklabel command (m for help): n   /* 1/2GB for swap */
    Partition (a-h): b
    First cylinder (512-8347, default 512): (enter)
    Using default value 512
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): 1023
    
    BSD disklabel command (m for help): n   /* usr */
    Partition (a-h): d
    First cylinder (1024-8347, default 1024): (enter)
    Using default value 1024
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): 2047
    
    BSD disklabel command (m for help): n   /* var */
    Partition (a-h): e
    First cylinder (1024-8347, default 1024): 2048
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): 3071
    
    BSD disklabel command (m for help): n   /* home */
    Partition (a-h): f
    First cylinder (1024-8347, default 1024): 3072
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): 6143
    
    BSD disklabel command (m for help): n   /* extra partition */
    Partition (a-h): g
    First cylinder (1024-8347, default 1024): 6144
    Last cylinder or +size or +sizeM of +sizeK (2-8347, default 8347): (enter)
    Using default value 8347
    
    BSD disklabel command (m for help): t   /* set swap FS type */
    Partition (a-g): b
    Hex code (type L to list codes): L
    

    Fdisk prints a list of known codes at this point. The code for swap is 1.

    Hex code (type L to list codes): 1
    
    BSD disklabel command (m for help): p   /* print the table */
    
    7 partitions:
    #      start     end    size   fstype
    a:         2     511     510     ext2  /* root, start at cyl 2 for aboot! */
    b:       512    1023     512     swap  /* swap */
    c:         1    8347    8347   unused  /* just ignore this */
    d:      1024    2047    1024     ext2  /* /usr */
    e:      2048    3071    1024     ext2  /* /var */
    f:      3072    6143    3072     ext2  /* /home */
    g:      6144    8347    2204     ext2  /* extra partition for future use */
    
    BSD disklabel command (m for help): w   /* write the table to disk */
    Writing disklabel to /dev/sda
    Syncing disks.
    
    BSD disklabel command (m for help): q   /* quit fdisk */
    

    There, using fdisk wasn't so bad, was it?

  4. Reboot

    When the you execute the mid-install reboot, you should return to the ">>>" SRM prompt. If you wish, you can use "show dev" to show the device names again. I used

    boot dka200 -file vmlinuz

    to boot the newly-installed Linux kernel off of my SCSI hard disk and complete the installation.

    The SRM console shell and fdisk may take a little getting used to, but installing on Alphas isn't much more complicated than installing on the average PC.

Performance

Don't expect old workstations to be powerhouses of performance. (There's a reason why people are willing to sell these things cheap.) I ran some informal BYTE Magazine UNIX benchmarks (UNIXBench 4.1.0) on a representative sample of my Alphas and PCs just to give some perspective. This is a general macro-benchmark originally developed long ago at BYTE magazine. It's now being maintained and improved by David C. Niemi. It combines a variety of computational and filesystem exercises, and spits out a "score" at the end. The more powerful your machine, the bigger your score.

I didn't put a great deal of effort into making these tests perfectly-controlled, so don't stake your life on their pinpoint accuracy. Your mileage may vary. All of the machines were running Linux kernels with versions between 2.2.17 and 2.2.19 using gcc versions between 2.91.66 and 2.95.4. I used the Intel-specific gcc optimization flags provided in the UNIXBench makefile when building the benchmark on PCs. After some experimentation with -mcpu=ev4, -mno-soft-float, and -mfp-regs (no improvement, perhaps these are defaults), I used only the makefile's default generic optimization flags when building the benchmark on the Alphas.

UNIXBench 4.1 Scores for Several Alphas and PCs
Year Machine CPU CLOCK RAM UNIXBench Score
1992? PC 80486 66MHz 32MB 11.1
1995 Multia Alpha 21066A 166MHz 64MB 12.8
1996? PC Pentium 100MHz 16MB 21.0
1995 AS 250 Alpha 21064A 266MHz 128MB 38.8
1998 PC Pentium II 450MHz 256MB 166.7
2001 PC Pentium III 750MHz 256MB 209.1

Conclusion

The benchmark shows that the Multia is slightly more powerful than a 486 PC - powerful enough to make a good firewall, DNS, or DHCP server, for example. The AlphaStation 250 (shown as AS 250 in the table) scores ahead of the Pentium PCs that were common in 1995. Neither old Alpha workstation achieved anywhere near the score of the Pentium III. Still, it's important to put the value of performance into perspective:

The PC market being what it is, the new PC you pull out of a shipping crate today will start to seem old and slow not long after you've gotten all the Styrofoam packing material cleaned up. Everyone has an old, slow PC. But an old, slow AlphaStation - that's something special.

So, now that it's running Debian GNU/Linux, the old AlphaStation 250 should be fine for my purposes... at least until someone tells me they want to get rid of a newer Alpha machine. Anyone have one of those multi-processor GS AlphaServers they want to throw out? Not yet? That's the upside to running old machines: sooner or later, the machine of your dreams will come to you. It's only a matter of time.


Tim Fraser's homepage at the WPI alumni site

$Id: alphalinux.html,v 1.4 2002/09/18 07:21:47 tim Exp $