Gentoo Wiki


Please improve it in any way that you see fit, and remove this notice {{Cleanup}} from the article. For tips on cleaning and formatting see Cleanup process

This article is still a Stub. You can help Gentoo-Wiki by expanding it.




Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms. It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently, bochs can be compiled to emulate a 386, 486, Pentium, Pentium Pro or AMD64 CPU, including optional MMX, SSE, SSE2 and 3DNow instructions. Similar emulators are Qemu (free/libre and cost-free) and vmware (commercial and proprietary)

What can I do with Bochs?

Bochs is capable of running most Operating Systems inside the emulation including Linux, Windows 95, DOS, and Windows NT 4 (maybe Windows XP/2k/2k3).

Install Bochs

To install bochs on a gentoo machine all you have to do is emerge it

Code: Install bochs
emerge bochs

Configure Bochs

Bochs is very configurable, and has a very simple way to do that.

How is it configured

1. Through the command line

bochs 'option1: value1' 'option2: value2'

2. Through the ~/.bochsrc file

File: ~/.bochsrc file
option1: value1
option2: value2

Bios Images

As a normal PC, Bochs needs to have a bios and a vga bios. Bochs does NOT come with fixed ones, so you MUST define a Bios image and a VGA Bios Image, otherwise emulated PC will not start. When you emerge bochs, it installs all the available Bios images at /usr/share/bochs

Code: List all the available bios
$ ls -la /usr/share/bochs/
total 367
drwxr-xr-x    4 root root   464 Feb  8 22:14 .
drwxr-xr-x  124 root root  3328 Feb  8 22:14 ..
-rw-r--r--    1 root root 65536 Feb  8 22:14 BIOS-bochs-2-processors
-rw-r--r--    1 root root 65536 Feb  8 22:14 BIOS-bochs-4-processors
-rw-r--r--    1 root root 65536 Feb  8 22:14 BIOS-bochs-8-processors
-rw-r--r--    1 root root 65536 Feb  8 22:14 BIOS-bochs-latest
-rw-r--r--    1 root root 32768 Feb  8 22:14 VGABIOS-elpin-2.40
-rw-r--r--    1 root root   454 Feb  8 22:14 VGABIOS-elpin-LICENSE
-rw-r--r--    1 root root  5856 Feb  8 22:14 VGABIOS-lgpl-README
-rw-r--r--    1 root root 29664 Feb  8 22:14 VGABIOS-lgpl-latest
-rw-r--r--    1 root root 30845 Feb  8 22:14 VGABIOS-lgpl-latest-debug
drwxr-xr-x    2 root root   176 Feb  8 22:14 dlxlinux
drwxr-xr-x    2 root root   432 Feb  8 22:14 keymaps

To specify the Bios image you must do it with romimage option and for the VGA Bios image, the option is vgaromimage. To start bochs with BIOS-bochs-latest and VGABIOS-lgpl-latest you have to run:

Code: Start Bochs with BIOS-bochs-latest Bios image and VGABIOS-lgpl-latest VGA Bios image
bochs 'romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000' 'vgaromimage: /usr/share/bochs/VGABIOS-lgpl-latest'

Yeah, bochs started, but what's that? You are now at the options menu, here you can just press 5 (Start emulation) and ENTER. But a windows pops up and dissapears, this is because nothing is selected to boot up. (be patient..)

Ok now we know how to select the Bios image and VGA Bios image, but isn't very annoying to add those arguments everytime you want to run bochs? So what we can do is, add those parameters at ~/.bochsrc.

Open your favorite editor and edit/create the ~/.bochsrc file.

File: ~/.bochsrc with the bios images configuration
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latest

As a normal pc, bochs needs to know where to boot from (cdrom, floppy, hard-disk). be continued.


Offical Website

Retrieved from ""

Last modified: Wed, 01 Oct 2008 09:02:00 +0000 Hits: 12,456