What it is

You want to run your favorite Linux-installation with the Bochs-Emulator (see but you think it is too tedious to install it from within Bochs? Bochs-Tools are the solution for your problem. With Bochs-Tools, cloning an existing OS-installation to a Bochs-image is only a matter of a few commands.

Bochs-Tools are a collection of scripts and programs to be used together with the Bochs-emulator. The main goal was to provide a Unix-like interface to the emulator and to enable access to Bochs disk-images from outside of Bochs.

The tools were developed under Linux. They might also work on other operating-systems. Feedback on this issue is appreciated.

Note that most of the Bochs-Tools are obsolete now. Bochs supports additional container-formats, e.g. you could use the concat-type, put each partition in a seperate file and access individual partitions using normal loop-mounts.


Let's assume we have installed the Debian bootstrap installation of Woody on /dev/sdb3 (about 110MB). We want to put this distribution on a disk-image and start the emulator afterwards. The following commands will create the image (two partitions, swap-size is 32 MB), install lilo on it and start it:

# mount /dev/sdb3 /mnt                # mount Woody-installation
# bxtclone /mnt hda.img               # create, copy, install lilo
# umount /mnt                         # umount source
# bxtstart -b disk -1 hda.img         # start the emulator and boot from disk

If you need a more fine-grained control over what is done, you can use some of the other bochs-tools. A suite of commands could look like this:

# bxtcreate -1 200m -2 128m hda.img   # create the image
# bxtmkfs -t ext2 hda.img:1           # make ext2-fs on first partition
# bxtmkfs -t swap hda.img:2           # make swap-space on second partition
# mount /dev/sdb3 /mnt                # mount Woody-installation
# bxtcopy /mnt hda.img:1              # copy Woody-tree to first partition
# umount /mnt                         # umount source
# bxtmount hda.img:1 /mnt             # mount first partition (the copy!)
# vi /mnt/etc/fstab                   # change mountpoint of / to /dev/hda1
                                      # and swap to /dev/hda2
# ln -fs hdc /mnt/dev/cdrom           # make sure that /dev/cdrom points to
                                      # /dev/hdc
# umount /mnt
# bxtlilo hda.img                     # install the lilo boot-loader
# bxtstart -b disk -1 hda.img         # start the emulator and boot from disk

Note that with the current release of Bochs (2.0.2), Woody with a 2.2-kernel hangs, as soon as it accesses the hardware-clock.


The current stable source-distribution is bochstools-1.7.1.tar.bz2 (about 38 KB). You either need the bunzip2-utility to unpack the archive, or a current version of GNU tar. In the latter case, you can use a command like

tar -xvjf bochstools-1.7.1.tar.bz2
to untar the archive.

You can also download a binary-only rpm: bochstools-1.7.1-1.i386.rpm

Be sure to download the archives in binary mode. The md5 checksums are:

9c39e092c40046aadf497f0a192d9912  bochstools-1.7.1-1.i586.rpm
359529f9da17e0de49322e5f90da005d  bochstools-1.7.1.tar.bz2


Important recent changes:

For a complete list of changes, see the files NEWS and ChangeLog in the distribution.

My Homepage
Bernhard Bablok (mail @