Installing a Binary

This section is divided up by platform, since installing a binary package is different on different platforms.

Windows

Someone needs to write this.

Linux RPM

RPM stands for "RedHat Package Manager." An RPM is a compressed file containing files to be installed on your system. Many Linux distributions, not just RedHat ones, can install files from an RPM. First, download the Bochs RPM for your architecture to your computer. For example, if you have an Intel-compatible computer, be sure to get the RPM that says "for Linux x86 distributions" or "i386". Once you have the package on your local disk, you should become the root user and install it as follows[1]:

  user$ su
  Password: 
  root# ls -l bochs-1.2.1.i386.rpm
  -rw-rw-r--    1 user     user      1877515 Sep 14 09:02 bochs-1.2.1.i386.rpm
  root# rpm -i bochs-1.2.1.i386.rpm
  Looking for fonts to install... /usr/local/bochs/latest/
  Looking for X11 Font Path... /usr/lib/X11/fonts
  Installing vga.pcf... ok    (it was already there)
  Running mkfontdir...
  Done installing Bochs fonts for X11.
  root# exit
  user$ _

Figure 2. Installing an RPM in Linux

All RPM installations are done as the root user because they require permission to update system files and directories. If you do not have root access you need to compile Bochs in your home directory.

RPM installation can fail for a few reasons. It will fail if you already have a Bochs package installed. In this case, try upgrading the old package to the new package with rpm --upgrade NAME.i386.rpm. Another potential problem is missing RPM dependencies. If you are getting errors about missing files or RPMs, then first you should try to install the RPMs that provide the missing pieces. If that cannot be done, download the source RPM and build a new binary RPM that is appropriate for your platform. The command is rpmbuild --rebuild NAME.src.rpm. As a last resort, you can run rpm with the --nodeps option to ignore dependencies and install it anyway, but if it is missing important pieces it may not run properly.

The RPM installation is supposed to install the VGA font for you, if necessary. But if you are seeing errors like "Could not open vga font", then please read the Section called Installing the VGA font (X windows only).

The Bochs RPM installs three new commands and associated manual pages: bochs, bochs-dlx, and bximage. First, let's try out the DLX Linux demo by typing bochs-dlx.

  user$ bochs-dlx
  ---------------------------------------------------------------
	      DLX Linux Demo, for Bochs x86 Emulator
  ---------------------------------------------------------------
  Checking for bochs binary...ok
  Checking for DLX linux directory...ok
  Checking for /bin/gzip...ok
  Checking for /usr/users/bryce/.bochsdlx directory...
  ---------------------------------------------------------------
  To run the DLX Linux demo, I need to create a directory called
  /usr/users/bryce/.bochsdlx, and copy some configuration files
  and a 10 megabyte disk image into the directory.
  ---------------------------------------------------------------
  Is that okay? [y/n]
  y
  Copying /usr/share/bochs/dlxlinux/bochsrc.txt -> /usr/users/bryce/.bochsdlx/.
  Copying /usr/share/bochs/dlxlinux/README -> /usr/users/bryce/.bochsdlx/.
  Copying /usr/share/bochs/dlxlinux/testform.txt -> /usr/users/bryce/.bochsdlx/.
  Uncompressing /usr/share/bochs/dlxlinux/hd10meg.img.gz -> /usr/users/bryce/.bochsdlx/hd10meg.img
  Entering /usr/users/bryce/.bochsdlx
  Running bochs
  ========================================================================
			Bochs x86 Emulator 2.0.pre3
		Build from CVS snapshot on December 4, 2002
  ========================================================================
Then you get a new X11 window containing the VGA display of the simulated machine. First you see the VGA BIOS screen, then Linux uncompresses and boots, and you get a login prompt. Type "root" and ENTER to log in to DLX linux.

Figure 3. Screenshot of Bochs running DLX Linux

Booting is complete when you see "dlx login:" and a cursor. At this login prompt, type "root". On UNIX systems, root is the system admin user. There is no password for root on this sample disk image, so it lets you log in without typing any password. Now you should see a UNIX prompt, and you can begin to type UNIX commands.

  Welcome to DLX V1.0 (C) 1995-96 Erich Boehm
                      (C) 1995    Hannes Boehm

  dlx login: root
  Linux 1.3.89.
  dlx:~# pwd
  /root
  dlx:~# cd /
  dlx:~# ls
  bin/       etc/       lost+found/       root/       usr/
  boot/      fd/        mnt/              sbin/       var/
  dev/       lib/       proc/             tmp/        zip/
  dlx:/# df
  Filesystem    1024-blocks   Used  Available Capacity Mounted on
  /dev/hda1        10060      2736      6005     29%   /
  dlx:/# _

When you get tired of playing with DLX Linux, just type "reboot" in the Bochs window to shut down the DLX Linux operating system, and when it starts to reboot again press the "Power" button at the top of the Bochs display to end the application.

Here is a list of the files that are installed by the RPM, and a brief description of each one.

Table 3. Files in RPM package

FileDescription
/usr/share/doc/bochs/README the read-me file from the source distribution.
/usr/share/doc/bochs/CHANGES what has changed between versions
/usr/share/doc/bochs/COPYING copy of the LGPL license
/usr/bin/bochs the main Bochs executable
/usr/bin/bximage tool for making new disk images
/usr/share/doc/bochs/bochsrc-sample.txt sample Bochs configuration file
/usr/share/man/man1/* man pages for bochs, bochs-dlx and bximage
/usr/share/man/man5/* man page for bochsrc
/usr/share/doc/bochs/index.html a local copy of all Bochs documentation ( Online copy )
/usr/share/bochs/BIOS-* ROM BIOS images for Bochs. Normally you would only use BIOS-bochs-latest unless you are simulating multiple processors.
/usr/share/bochs/VGABIOS-elpin-* VGA BIOS image for Bochs
/usr/share/bochs/VGABIOS-elpin-LICENSE license for VGA BIOS
/usr/share/bochs/VGABIOS-lgpl-latest LGPL'd VGA BIOS image for Bochs
/usr/share/bochs/VGABIOS-lgpl-README readme for the LGPL'd VGA BIOS
/usr/bin/bochs-dlx run this script to try out DLX Linux inside Bochs!
/usr/share/bochs/dlxlinux/ directory containing DLX linux sample disk image and configuration files
/usr/share/bochs/dlxlinux/README description of DLX linux

Notes

[1]

Many distributions have their own RPM installer program, often graphical, and they should work ok. It is helpful to be able to see the text output from RPM, so if you use a fancy RPM installer, be sure to find the text output and check that it looks correct.