Installing Debian Squeeze on the Sheevaplug
The Sheevaplug is an embedded computer system using a 1.2 GHz Marvell Kirkwood 6281 ARM-compatible CPU (aka Feroceon) with 512MB RAM, a USB 2.0 port, an SD card slot, USB serial terminal, and an ethernet jack. You can get one from Globalscale (for $99 at the time of writing). Unfortunately, by the time I recieved one of these lovely devices, the default installation of Ubuntu 9.04 had elapsed its support life, and further, Ubuntu seems to have dropped arm support all together. Unfortunate, as I could not update or install software from apt.
ESIA is the Enhanced Sheevaplug Installer Application and is available here. It is free software. ESIA is a GUI for installing linux distros to the sheevaplug.
This tutorial aims to solve that by installing Debian and a few other software packages to make this sweet little computer sing.
This tutorial assumes that you have the JTAG driver installed on your host platform. Without the right driver, your computer won’t be able to see the USB serial connection the Sheevaplug makes available. That is a simple enough matter to sort out that I’m not going to explain it here.
- gitolite to host git repos
- samba to share files
- Low power: sheevaplug uses ~5W, that’s why I like it!
- Sheevaplug comes pre-loaded with out-of-date Ubuntu: Use ESIA project to flash Debian Squeeze
- Sheevaplug has limited disk space: Mount external USB disks at boot.
- Debian Squeeze implementation of gitolite makes user’s home directory at
/var/lib/gitolite. Change the gitolite user’s directory to the external drive.
- Write system glue in bash to check if the external drive (check for existence of file on external drive) is mounted; remount if not mounted.
btrfssupport so I can mirror disks on my multi-disk (but not RAID) external drive. (Didn’t seem well supported on Debain squeeze arm at the time of writing)
- Download the application from the sourceforge page.
- Install ESIA. I’m on Debian, so I do
sudo dpkg -i esia.deb
putty: sudo aptitude install putty
Accessing the Sheevaplug via USB-Serial
- Plug in the Sheevaplug
- Connect your PC to the Sheevaplug via the supplied USB cable.
- In the putty configuration window, select the
- Set the Serial Line to
- Set the Speed to
- Save the settings as a session, as you will need to access the plug via serial connection later.
- Click open. You should see a command prompt. You are now connected.
Using ESIA to Flash a New Boot Loader
- Connect to the Sheevaplug via USB-Serial.
- Reboot the Sheevaplug.
- After reboot, press any key to interrupt the U-boot process. You should see the U-boot prompt:
- Open ESIA with root permission.
- Click on the Sheevaplug. Click Reflash Bootloader. ESIA 2.0.5 has a default bootloader for the sheevaplug, version x.x.19 (ESIA told me the flash failed, but I waited 10 minutes, closed ESIA, re-connected via USB-Serial, and everything was fine). You may also enter a MAC address at this time. There is a MAC address listed on the device label of your sheevaplug.
- Close ESIA.
- Reconnect via USB-Serial.
- Boot into U-boot.
- At the U-boot prompt enter
The system will reboot. (I was getting an error after flashing the new uboot, and it took me forever to track down the
- Interrupt the U-boot process. You’ve successfully flashed a new version of uboot.
Preparing the USB Disk-on-Key
- Obtain a USB flash drive. Out of my many, many (apparently cheap) flash drives, only one worked. Your milage may vary.
- Format the USB drive to fat32
- Download a distribution from the ESIA home page (I choose Debian, there are several other distros one the home page).
- Untar the distro to the USB.
Using ESIA to install Debian
- Open ESIA
- Choose the MAC address of your sheevaplug in the GUI
- Highlight Debian in the Applications list, then click Select.
- Remove the USB DOK from your computer and put it in the Sheevaplug.
- Click Install to NAND to install Debian to the internal flash memory of the Sheevaplug.
- Click Install and get a cup of coffee while it installs.
Quick Debian Essentials Setup
These are not requisite, but I recommend using a static IP address if you want to have any success running gitolite (described later).
- Set a static IP by editing
- Set the hostname by editing
- Install SSH and rsync:
sudo apt-get install openssh-sever rsync
- Probably not a bad idea to update the system now:
sudo apt-get update && sudo apt-get upgrade
Adding External Drives at boot
I am running into the problem described here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583954 to get around it either re-tool the initramfs described here http://ubuntuforums.org/archive/index.php/t-1021719.html (I can’t find the initramfs script in the ESIA debian application) or add
mount -a somewhere near the end of the init boot sequence.
- Gain root permissions.
- Get the UUID of the disks to mount. ls /dev/disk/by-uuid
UUID=< uuid of disk > <mount point> <file system type> nosuid,auto,nofail 1 3 ## Need to find a way around nofail option
- Add command
mount -aat the proper place (near the end) of the init boot script to mount disk (this is the problem related to the
Installing and Configuring samba for LAN File Sharing
- Gain root permission:
su -Enter the root password
- Install Samba
apt-get install samba smbfs
/etc/samba/smb.confand share the desired folders.
Installing and Configuring gitolite for GIT Hosting
- Gain root permission:
su -Enter the root password
- Install gitolite
apt-get install gitolite
- Put an RSA pub key on your server, at
- To initialize gitolite, enter:
sudo -H -u gitolite gl-setup /tmp/id_dsa.pub
- To test the installation, clone the admin repo:
git clone gitolite@ip-addres:gitolite-admin.gitIf the repo clones over, your installation is successful.
The debian package for gitolite creates a user, gitolite, with a home directory of
/var/lib/gitolite. Since the sheevaplug only has 512 mb of system space,
/var/lib/gitolite does not have enough space to hold all of the desired git repos. To solve this problem, change the gitolite user’s home directory to the external drive mounted earlier.
usermod -m --home /path/to/gitolite gitolite
where -m moves the files currently in the home directory.
Now you should be ready to enjoy your sheevaplug with some up-to-date software! I know I am. Since I decomissioned my old file sever in favor of the sheevaplug, my electricity bill has gone down about $10/month!