Software Freedom Law Center

Using the Loblaw Test QEMU Image

loblaw-test is a QEMU image that always has the latest-and-greatest configuration of the Loblaw environment. This page describes how to use it.

Download the Image

The primary disk image for loblaw-test is loblaw.img.bz2. In order to be sure we're complying with all Open Source and Free Software licenses, we also offer loblaw-source.img.bz2, which gives you all the source code for things that are binary-only in loblaw.img. However, note that loblaw.img contains all sources for most things you might need to modify to contribute to the Loblaw project itself.

Running the Image

To run the image, use a command like this:

/usr/bin/qemu -m 256 -boot c \
  -redir tcp:2222::22 tcp:8080::80 \
  -hda loblaw.img -hdb loblaw-source.img

Or, if you prefer to use kvm:

/usr/bin/kvm -hda loblaw.img -hdb loblaw-source.img \
  -m 256 -boot c -redir tcp:2222::22 -redir tcp:8080::80

You can safely leave off the -hdb loblaw-source.img part if you don't download the source image.

Note that running it this way requires that you have TCP ports 2222 and 8080 available on your system. If you do this, once the system is booted, you can log into it with commands like:

ssh -p 2222 localhost -l root

and you view the the loblaw web environment via http://localhost:8080.

Accounts and Passwords

A number of accounts exist on the Loblaw Test Image. We try to keep this section updated with all the relevant passwords you need:

  • Login passwords:
    • root: root
    • bkuhn: bkuhn
    • svn: svn
    • ca: ca
  • Passphrase for Certificate Authority in /home/ca: certificate
  • slapd administration password (root dn): slapd

Note that BradleyMKuhn has that bkuhn account which he uses

Updating Your Image

Once you've downloaded the rather large image, you'll find that you don't want to do that again. Fortunately, you can avoid it indefinitely, since the Loblaw Test image is maintained in Mercurial.

You'll find that the directory /.hg is a Mercurial tree for most of the system (save /usr/src, which when mounted with mount /usr/src has its own /usr/src/.hg.

You can update your version to the latest-and-greatest from on loblaw-test with:

cd /
hg pull http://code.softwarefreedom.org/hg/loblaw-test

To update the source for the non-Loblaw packages, once you've done mount /usr/src, you can do:

cd /usr/src
hg pull http://code.softwarefreedom.org/hg/loblaw-test-source

BradleyMKuhn finds that it's sometimes faster and easier to actually mount the loblaw-test drive outside the Qemu to allow access from his own local user account. To do this (if you have fuser and sshfs installed):

mkdir ~/loblaw-test
sshfs -p 2222 root@localhost:/ ~/loblaw-test

Then, you can do Mercurial and other operations on the loblaw-test filesystem from outside of the running QEMU.

If You Need Swap

Sometimes, you need a little extra RAM on the test image but don't want to feed it more of your system's RAM. To make a swap partition:

qemu-img -f qcow swap.img 20G

And then boot with:

/usr/bin/qemu -m 256 -boot c \
  -redir tcp:2222::22 tcp:8080::80 \
  -hda loblaw.img -hdb loblaw-source.img -hdc swap.img

And then, on loblaw-test itself, do:

fdisk /dev/hdc
# Make a swap partition 1 of type 83
swapon /dev/hdc1

SFLC Main Page

[frdm] Support SFLC