QEMU is well-known as a free replacement for VMware, allowing users to run a PC within a PC. What isn't so well known about QEMU is that, in addition to emulating x86 architectures, it can emulate AMD64, Sparc, MIPS, PPC and ARM CPUs.
In the case of the ARM architecture, QEMU provides a convenient, if slow, environment in which development can be done for embedded systems.
This article describes the process involved in building a Debian/ARM server running under QEMU. It assumes that Debian is also being used as the host server.
Since QEMU's arm emulator has no ability to emulate either IDE or SCSI disks, it will be necessary to install the server on an NFS exported partition.
Configuring the guest server
Now, start the new arm server in single user mode - from your user account, since it does not need to be run as root:
host$ /usr/local/bin/start-qemu-arm single
The emulated guest server should start up and boot into a bash prompt. The filesystem will be mounted read-only, and it will be necessary to remount it read-write before any further work can be done on it:
guest# mount -n -o remount,rw /
guest# mount /proc
Now run the second stage of debootstrap, within the guest system, to finalise the installation:
guest# cd /
guest# ./debootstrap/debootstrap --second-stage
This will probably take a while to run; the emulator isn't particularly fast. When it's finished, adjust a few remaining files, such as /etc/hostname and
/etc/resolv.conf; also install ssh:
guest# apt-get install ssh
Once this is done, you can shut the server down. It's safe to just kill the qemu process from the host machine - since its filesystem is mounted from an NFS server, there's no need to shut it down cleanly.
Now you can start it up completely:
host$ /usr/local/bin/start-qemu-arm
When it finishes booting, you should be able to ssh into it on 10.1.6.50, and you'll have a working Debian installation running on an emulated ARM processor.
If you found this article helpful, consider making a donation to offset the costs of running this server, to one of these addresses:
Dogecoin: DBu2vJEKBE8QzZgp7nuSHXhAeyUn9vXpCS
Bitcoin: 16oaJfmt8ARXibVuKBmAtU833BLDVoPY7r
Litecoin: LerLMqzbtXyjMG2vKt8Hg6Wq1RjSmC9MZj