Chapter 5. Using Bochs

After starting Bochs either from the command prompt or the OS shell, the following steps are done before the simulation is running.

  1. parse command line (except bochsrc options)

  2. load selected config file (bochsrc) or search for the default one

  3. parse remaining command line options (bochsrc syntax)

  4. initialize configuration interface

  5. enter start menu / dialog (unless quick start mode is enabled)

  6. initialize all parts of the simulator

  7. enter debugger prompt / dialog (if present)

  8. enter the simulation loop

During simulation, Bochs usually generates more or less log output. By default, it is sent to the console, otherwise to the specified log file. The amount of output can be controlled with the log options in bochsrc, the start menu and the runtime configuration.

Under certain conditions Bochs can cause a panic and usually asks the user what to do. If such a panic happens during startup, it is mostly a configuration or permission problem and we recommend to quit Bochs and to review the bochsrc options used.

To quit the simulation, the "power" button in the Bochs headerbar should be used, unless the guest OS has the capability to turn off the computer (APM or ACPI).

If a Bochs runtime issue cannot be fixed by configuration changes and it has not yet been reported in the bochs-developers mailing list or the SF trackers for Bochs, it should be reported in the mailing list or the SF bug tracker for the Bochs project.

5.1. Command line arguments

The following table shows the arguments that can be used on the command line. For other arguments, see section bochsrc.

Table 5-1. command line arguments

ArgumentDescription
-qquick start (skip configuration interface)
-f filenamespecify configuration file
-log filenamespecify Bochs log file
-dbglog filenamespecify Bochs internal debugger log file
-ndon't try to load a configuration file
-benchmark Nrun Bochs in benchmark mode for N millions of emulated ticks
-dumpstats Ndump Bochs stats every N millions of emulated ticks
-r pathspecify path for restoring state
-unlockunlock Bochs images leftover from previous session
-noconsoledisable console window (Windows only)
--helpdisplay help message and exit
--help featuresdisplay available features / devices and exit
--help cpudisplay supported CPU models and exit (CPU level > 4 only)

These arguments are handled directly after starting Bochs. The next step is to load a default or specified configuration file (unless disabled with -n). Then the rest of the command line (bochsrc options) is parsed. This is done after reading the configuration file so that the command line arguments can override the settings from the file.