Tuesday, November 29, 2011

Booting an old VIA EPIA-5000L motherboard

I purchased an old VIA fanless mini-ITX motherboard on eBay, including CPU and RAM and shipping, for a reasonable price ($43). I want to play with it and see what I can get it to do. Maybe build a cool case for it...

MB attached to ordinary ATX power supply, VGA monitor, and PS/2 Mouse.
Tiny black rectangle on the right is the on/off jumper.
Step 1: Hook it up

Happily, I have an old PS/2 keyboard, VGA monitor, and ATX power supply handy.
Hook them all up...and nothing.

Of course, the power switch.
Get the manual, read the manual, find the jumper, and use a spare jumper to connect them for a moment.

Hooray! Fans on the power supply start to spin! Beep! Splash appears on the monitor!

I made the following BIOS changes:
  • Always restart upon power loss (since I don't have a power switch!)
  • Enable fast startup (skip memtest, faster boot)
  • Skip splash (annoying)
  • Skip BIOS summary (annoying)
  • Change the boot device to USB-ZIP (not USB-FDD, essential for USB-boot later)


Step 2: Create a Debian Boot USB drive.

This is a pretty old motherboard, so the standard USB-HDD booting option is missing. That means Live-USB (hybrid USB/CD) .iso files won't work without some tweaking. The available USB options are USB-ZIP and USB-FDD. A quick web search turns up this page of instructions, but it doesn't work. Further digging reveals this page, a version of which does work.

  1. Select a USB Drive (small). Everything on it will be erased, so backup if needed.
  2. On a different (working) Debian or Ubuntu system, as root (use 'sudo su' to get a root prompt on Ubuntu). Not all commands will work with sudo alone.
  3. Plugin the USB drive. If your system automatically mounts it, then unmount (not eject) it.
  4. Use dmesg to find the USB drive's /dev/sd* node. For example, mine was sdz and sdz3.
  5. Format the USB drive to a bootable configuration. This will limit the accessible size to 250MB (the old ZIP-format maximum), so CD-sized live .isos won't work. See this page for mkdiskimage commands for other-size drives.
    mkdiskimage -4 /dev/sdz 0 64 32   # 1GB and below USB drives only
  6. Install the MBR:
    cat /usr/lib/syslinux/mbr.bin > /dev/sdz
  7. Get and install the boot image:
    wget -O /tmp/boot.img.gz http://ftp.debian.org/debian/dists/squeeze/main/installer-i386/current/images/hd-media/boot.img.gz
    zcat /tmp/boot.img.gz > /dev/sdz1
  8. Download the Live Session image. In this case, I used a Debian businesscard installer simply because it was a very small download:
    wget -O /tmp/debian-6.0.3-i386-businesscard.iso http://cdimage.debian.org/debian-cd/6.0.3/i386/iso-cd/debian-6.0.3-i386-businesscard.iso
    md5sums /tmp/debian-6.0.3-i386-businesscard.iso
    Compare the md5sum result to http://cdimage.debian.org/debian-cd/6.0.3/i386/iso-cd/MD5SUMS
  9. Mount the USB drive, and install the Live Session image:
    mkdir /tmp/usbmountpoint
    mount /dev/sdz3 /tmp/usbmountpoint
    cp /tmp/debian-6.0.3-i386-businesscard.iso /tmp/usbmountpoint/
    umount /tmp/usbmountpoint
  10. Check the resulting filesystem, and correct any errors (there may be a couple!)
    fsck.msdos -r /dev/sdz3
    My resulting filesystem is about 214MB, below the 250MB limit.
  11. Clean-up is optional, since all working files are in /tmp and will be deleted upon reboot anyway.
  12. Unplug the USB drive (it should already be unmounted)


Step 3: Boot Debian

The BIOS should be set to a startup device of USB-ZIP (step 1), and you should have a Debian USB drive (step 2). Put them together - try to boot the new motherboard from it. In my case, success!

I don't have a hard drive installed yet, so I'm not ready to actually install. But this was a successful power-on and boot.


UPDATE #1: For Xmas, one of the kids got a toy butterly-in-a-jar. It has a "Try Me" feature for in the store, a button that detached after opening the package. The button's connector looked just right to fit the power jumper, and indeed now I have a real power button for the motherboard. This turns out to be handy, because a stable system needs better power control than flipping the switch on the power supply...and my new silent power supply has no switch!

UPDATE #2: A chainloader can be used to bypass the USB-ZIP 250MB boot limit. I did a successful USB-ZIP boot to a complete Debian 6 system.

No comments: