bochsrc(5)
π bochsrc π
okay bestie, welcome to the manual page for bochsrc, from the Bochs Project β it's a section 5 (file formats) page, so it's all about a configuration file, not a command. sit down, grab a strawberry drink π, we're doing this.
β¨ NAME β¨
bochsrc β the configuration file for Bochs. that's it, that's the name, slay π
πΈ DESCRIPTION πΈ
so bochsrc is the config file that tells Bochs where to go looking for disk images, how the Bochs emulation layer should behave, and honestly just... everything else. it's giving "mission control but make it a text file" π°οΈ
and here's the cute part: the syntax you use in bochsrc can also be used as command line arguments for Bochs. same energy, two delivery methods π
where does it live? your .bochsrc file should be placed either in the current directory before you run Bochs, or in your home directory. pick your fighter.
Starting with Bochs 1.3, you can use environment variables inside the bochsrc file, like:
floppya: 1_44="$IMAGES/bootdisk.img", status=inserted
Starting with version 2.0, two environment variables got a built-in default value that's set at compile time:
$BXSHAREβ points to the "share" directory, which is typically/usr/share/bochson UNIX machines. check the$(sharedir)variable in the Makefile for the exact value.$BXSHAREis used by disk images to locate the directory where the BIOS images and keymaps can be found. if$BXSHAREisn't defined, Bochs will supply the default value. no stress π«Ά$LTDL_LIBRARY_PATHβ points to a list of directories to search in for Bochs plugins (separated by colons if there's more than one). a compile-time default is provided if this variable isn't defined by the user.
π OPTIONS π
#include
this option includes another configuration file. yes bestie, config files can have config files, it's very nesting-coded. it's possible to put installation defaults in a global config file (e.g. location of rom images).
Example:
#include /etc/bochsrc
plugin_ctrl:
controls the presence of optional device plugins. these plugins are loaded directly with this option, and some of them install a config option that is only available when the plugin device is loaded. the value 1 means load the plugin, and 0 will unload it (if it was loaded before). binary behaviour, very demure.
these plugins will be loaded by default (if present): biosdev, gameport, iodebug, parallel, serial, speaker and unmapped.
these plugins are also supported, but they're usually loaded directly with their bochsrc option: e1000, es1370, ne2k, pcidev, pcipnic, sb16, usb_ehci, usb_ohci, usb_uhci, usb_xhci and voodoo.
Example:
plugin_ctrl: unmapped=0, e1000=1 # unload 'unmapped' and load 'e1000'
config_interface:
the configuration interface is a series of menus or dialog boxes that lets you change all the settings controlling Bochs's behavior. depending on the platform there are up to 3 choices of configuration interface: a text mode version called textconfig and two graphical versions called win32config and wx.
- the text mode version uses stdin/stdout or gui console (if available / runtime config) and is always compiled in, unless Bochs is compiled for wx only.
- the choice
win32configis only available on win32/win64 and it is the default on these platforms. - the choice
wxis only available when Bochs is compiled with wxWidgets support.
if you do not write a config_interface line, Bochs will choose a default for you. it's got you π
NOTE: if you use thewxconfiguration interface, you must also use thewxdisplay library. they're a package deal, iykyk.
Example:
config_interface: textconfig
display_library:
the display library is the code that displays the Bochs VGA screen. Bochs has a selection of about 10 different display library implementations for different platforms. if you run configure with multiple --with-* options, the display_library command lets you choose which one you want to run with. if you do not write a display_library line, Bochs will choose a default for you.
the choices are:
xβ X windows interface, cross platformwin32β native win32 librariescarbonβ Carbon library (for MacOS X)macintoshβ MacOS pre-10amigaosβ native AmigaOS librariessdlβ SDL 1.2.x library, cross platformsdl2β SDL 2.x library, cross platformtermβ text only, uses curses/ncurses library, cross platformrfbβ provides an interface to AT&T's VNC viewer, cross platformvncsrvβ use LibVNCServer for extended RFB(VNC) supportwxβ wxWidgets library, cross platformnoguiβ no display at all
NOTE: if you use thewxconfiguration interface, you must also use thewxdisplay library. (yes, again. it's a whole thing.)
Specific options: some display libraries now support specific options to control their behaviour. these options are supported by more than one display library:
"cmdmode"β call a headerbar button handler after pressing F7 (x,sdl,sdl2)"fullscreen"β startup in fullscreen mode (sdl,sdl2)"hideIPS"β disable IPS output in status bar (nogui,rfb,sdl,sdl2,term,vncsrv,wx,x)"nokeyrepeat"β turn off host keyboard repeat (sdl,sdl2,x)"no_gui_console"β use system console instead of builtin gui console (rfb,sdl,sdl2,vncsrv,x)"timeout"β time (in seconds) to wait for client (rfb,vncsrv)"gui_debug"β β οΈ This option is DEPRECATED, use command line option-dbg_guiinstead. It also supports the'globalini'extension
NOTE: setting up options without specifying display library is also supported. icon behaviour honestly.
Examples:
display_library: x
display_library: sdl2, options=fullscreen,hideIPS
display_library: options=cmdmode
cpu:
this defines cpu-related parameters inside Bochs. strap in, there's a whole list π§
model:
selects CPU configuration to emulate from a pre-defined list of all supported configurations. see the bochsrc sample for supported values.
add_features:
enable one of more CPU feature in the CPU configuration selected by MODEL. could be useful for testing CPU with newer imaginary configurations by adding a specific feature or set of features to an existing MODEL. the list of features to add is supplied through a space or comma separated string.
exclude_features:
disable one of more CPU feature from the CPU configuration selected by MODEL. could be useful for testing CPU without a specific feature or set of features. when experiencing issues booting a modern OS it could be useful to disable CPU feature(s) to see if they're responsible for the failures. the list of features to exclude is supplied through a space or comma separated string.
count:
set the number of processors:cores per processor:threads per core when Bochs is compiled for SMP emulation. Bochs currently supports up to 14 threads (legacy APIC) or 254 threads (xAPIC or higher) running simultaneously. if Bochs is compiled without SMP support, it won't accept values different from 1.
quantum:
maximum amount of instructions allowed to execute by processor before returning control to another cpu. this option exists only in a Bochs binary compiled with SMP support.
reset_on_triple_fault:
reset the CPU when a triple fault occurs (highly recommended) rather than PANIC. remember that if you're trying to continue after a triple fault the simulation will be completely bogus! π no cap.
cpuid_limit_winnt:
determine whether to limit maximum CPUID function to 2. this mode is required to workaround WinNT installation and boot issues.
force_ignne:
always act like if the #IGNNE pin was asserted on CPU input. avoid potential deadlock after unmasked x87 exception handling and FERR# assertion.
cpuid_freq:
select how the CPUID frequency leaves 0x15/0x16 are reported by CPU models that implement them (hardware/none/ips). with 'hardware' (default) the values dumped from the modeled hardware are reported, but modern guest kernels trust these leaves for TSC calibration while the emulated TSC actually advances at the IPS rate. with 'none' the frequencies are reported as not enumerated, with 'ips' the leaves report the emulated tick rate.
mwait_is_nop:
when this option is enabled MWAIT will not put the CPU into a sleep state. this option exists only if Bochs was compiled with --enable-monitor-mwait.
brand_string:
set the CPUID brand string returned by CPUID(0x80000002 .. 0x80000004). this should be at most a forty-eight-character ASCII string. keep it empty to use the original CPUID brand string.
msrs:
define path to user CPU Model Specific Registers (MSRs) specification. see example in msrs.def.
ignore_bad_msrs:
ignore MSR references that Bochs does not understand; print a warning message instead of generating a #GP exception. this option is enabled by default but will not be available if configurable MSRs are enabled.
ips:
emulated Instructions Per Second. this is the number of IPS that Bochs is capable of running on your machine. you can recompile Bochs with the --enable-show-ips option enabled, to find your workstation's capability. the measured IPS value will then be logged into your log file or status bar (if supported by the gui).
IPS is used to calibrate many time-dependent events within the bochs simulation. for example, changing IPS affects the frequency of VGA updates, the duration of time before a key starts to autorepeat, and the measurement of BogoMips and other benchmarks.
Example Specifications[1]
Bochs Machine/Compiler Mips
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2.4.6 3.4Ghz Core i7 2600 w/ Win7x64/g++ 4.5.2 85-95 Mips
2.3.7 3.2Ghz Core 2 Q9770 w/ WinXP/g++ 3.4 50-55 Mips
2.3.7 2.6Ghz Core 2 Duo w/ WinXP/g++ 3.4 38-43 Mips
2.2.6 2.6Ghz Core 2 Duo w/ WinXP/g++ 3.4 21-25 Mips
2.2.6 2.1Ghz Athlon XP w/ Linux 2.6/g++ 3.4 12-15 Mips
[1] IPS measurements depend on OS and compiler configuration in addition to processor clock speed. so don't @ me about the numbers, it's not just the clock speed bestie π¦
cpu:... and here's a lil example of it living its best life:
cpu: count=2, ips=10000000, msrs="msrs.def"
memory:β bestie, this one sets how much physical memory you wanna emulate. β¨ Two flavours:guest:β the amount of guest physical memory to emulate. Default is 32MB, and the max is literally only limited by physical address space limitations. sky's the limit fr.host:β the amount of host memory you want to actually allocate for guest RAM emulation. Here's the tea: you can allocate less memory than you want to emulate in the guest system, and Bochs will fake the guest into seeing that non-existing memory. The moment the guest touches a new memory block, it gets dynamically grabbed from the memory pool. π But if the guest already used up all the allocated host memory and wants more? You get a FATAL PANIC. not the cute kind of panic. π
Example moment:
memory: guest=512, host=256
megs:β this sets theguestandhostmemory parameters to the same value. In literally every other case, use thememoryoption instead, ok? π«Ά
Example:
megs: 32
romimage:β the ROM BIOS controls what the PC does the second it powers on. Normally you'd use a precompiled BIOS from the source or binary distribution calledBIOS-bochs-latest. The default ROM BIOS usually loads starting at address0xfffe0000and it's exactly 128k long. The legacy Bochs BIOS version usually loads starting at address0xffff0000and it's exactly 64k long. Using external large BIOS images (up to 512k) at memory top is supported now, but ngl we still recommend using the BIOS distributed with Bochs. πfile:β name of the BIOS image file. You can use the environment variable$BXSHAREto specify where the BIOS lives. ποΈaddress:β the start address is optional, since it can be calculated from the image size. math is mathing. β¨options:β the Bochs BIOS currently only supports the option"fastboot"to skip the boot menu delay. yes bestie, skip it.flash_data:β this defines the file name for the flash BIOS config space, loaded at startup if it exists and saved on exit if it was modified. The Bochs BIOS doesn't use this feature yet. π
NOTE: if you use a SeaBIOS binary in the romimage BIOS option, you must use a VGA compatible PCI graphics adapter (ISA and AGP are not supported).
Examples, served fresh:
romimage: file=bios/BIOS-bochs-latest, options=fastboot
romimage: file=$BXSHARE/BIOS-bochs-legacy
romimage: file=$BXSHARE/i440fx.bin, flash_data=escd.bin
romimage: file=asus_p6np5.bin, flash_data=escd.bin
romimage: file=mybios.bin, address=0xfff80000
fw_cfg:β UEFI Firmware Support time!! π Bochs supports UEFI boot using OVMF (Open Virtual Machine Firmware) from the TianoCore EDK2 project. UEFI boot requires thefw_cfgdevice, which provides system configuration to the firmware via I/O ports0x510-0x51B. That includes the E820 memory map, ACPI tables, RAM size, and CPU count. See the user doc for more info. π
Example:
romimage: file=OVMF.fd, address=0xffc00000
fw_cfg: enabled=1
vgaromimage:β you also need to load a VGA ROM BIOS into0xC0000. can't forget the glow-up for your graphics, bestie. π
Examples:
vgaromimage: file=bios/VGABIOS-elpin/VGABIOS-elpin-2.40
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest.bin
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest-cirrus.bin
optromimage1:,optromimage2:,optromimage3:oroptromimage4:β you may now load up to 4 optional ROM images!! π Make sure you use a read-only area, typically betweenC8000andEFFFF. These optional ROM images should not overwrite the rombios (located atF0000-FFFFF) or the videobios (located atC0000-C7FFF). Those ROM images get initialized by the bios if they contain the right signature (0x55AA). It can also be a convenient way to upload some arbitrary code/data into the simulation that the boot loader can retrieve. iconic behavior honestly.
Example:
optromimage1: file=optionalrom.bin, address=0xd0000
vga:β this defines parameters related to the VGA display. π₯οΈβ¨extension:β here you specify the display extension to use. With the value'none'you get standard VGA with no extension. Other supported values are'vbe'for Bochs VBE,'cirrus'for Cirrus SVGA support,'voodoo'for Voodoo Graphics support (peep the'voodoo'option) and'geforce'for experimental GeForce support (peep the'geforce'option).update_freq:β the number of display updates per second. The VGA update timer by default uses the realtime engine with a value of 10 (valid: 1 to 75). This parameter can be changed at runtime. The special value 0 enables support for using the frame rate of the emulated graphics device. no cap.realtime:β if set to 1 (default), the VGA timer is based on realtime; otherwise it's driven by the cpu and depends on theipssetting. If your host is slow (lowips,update_freq) and the guest uses HLT appropriately, setting this to 0 and"clock: sync=none"may improve the responsiveness of the guest GUI when the guest is otherwise idle. lowkey a life hack. π§ddc:β this defines the behaviour of the DDC emulation that returns the monitor EDID data. By default the'builtin'values for'Bochs Screen'are used. Other choices are'builtin_gui'(limit builtin values based on gui capabilities),'disabled'(no DDC emulation) and'file'(read monitor EDID from file / path name separated with a colon).vbe_memsize:β with this you can define the size of the memory for the Bochs VBE extension. Valid values are 4, 8, 16 and 32 MB (default is 16 MB).
Examples:
vga: extension=none, update_freq=10, realtime=0, ddc=disabled
vga: extension=cirrus, update_freq=30, ddc=file:monitor.bin
vga: extension=vbe
voodoo:β this defines the Voodoo Graphics emulation. Currently supported models are'voodoo1','voodoo2','banshee'and'voodoo3'. These 2D/3D cards require the'banshee'version of the LGPL'd VGABIOS or an external VGA BIOS, plus thevgaextension option set to'voodoo'. If the i440BX PCI chipset is selected, they can be assigned to AGP (slot #5). The gui screen update timing for all models is controlled by the related'vga'options. π₯
Example:
voodoo: enabled=1, model=voodoo1
geforce:β this defines the experimental GeForce emulation. Currently supported models are'geforce2','geforce3','geforcefx5900'and'geforce6800'. These 2D/3D AGP cards require an external VGA BIOS, thevgaextension option set to'geforce'and the i440BX PCI/AGP chipset with the'geforce'device assigned to AGP (slot #5). The gui screen update timing for all models is controlled by the related'vga'options.
Example:
geforce: model=geforce3
keyboard:β this defines parameters related to the emulated keyboard. β¨οΈπtype:β the type of keyboard returned by an"identify keyboard"command to the keyboard controller. It must be one of"xt","at"or"mf". Defaults to"mf". It should be ok for almost everybody β a known exception is french macs, which do have an"at"-like keyboard. π«π·serial_delay:β approximate time in microseconds it takes for one character to be transferred from the keyboard to the controller over the serial path.paste_delay:β approximate time in microseconds between attempts to paste characters to the keyboard controller. This leaves time for the guest os to deal with the flow of characters. The ideal setting depends on how your operating system processes characters. The default of 100000 usec (.1 seconds) was chosen because it works consistently in Windows. If your OS is losing characters during a paste, increase the paste delay until it stops losing characters. we love a troubleshooting queen. πkeymap:β this enables a remap of a physical localized keyboard to a virtualized us keyboard, as the PC architecture expects. Using a language specifier instead of a file name is also supported. A keymap is also required by the paste feature.user_shortcut:β this defines the keyboard shortcut sent when you press the"user"button in the header bar. The shortcut string is a combination of a maximum of 3 key names (listed below) separated with a'-'character.
Valid key names:
"alt", "bksl", "bksp", "ctrl", "del", "down", "end", "enter", "esc", "f1", ... "f12", "home", "ins", "left", "menu", "minus", "pgdwn", "pgup", "plus", "power", "print", "right", "scrlck", "shift", "space", "tab", "up" and "win".
Examples:
keyboard: type=mf, serial_delay=150, paste_delay=100000
keyboard: keymap=gui/keymaps/x11-pc-de.map
keyboard: user_shortcut=ctrl-alt-del
mouse:β this defines parameters for the emulated mouse type, the initial status of the mouse capture and the runtime method to toggle it. πβ¨typeβ with the mouse type option you can select the type of mouse to emulate. The default value is'ps2'. The other choices are'imps2'(wheel mouse on PS/2),'serial','serial_wheel','serial_msys'(one com port requires setting'mode=mouse'),'inport'and'bus'(if present). To connect a mouse to a USB port, see the'usb_uhci','usb_ohci','usb_ehci'or'usb_xhci'option (requires PCI and USB support).enabledβ the Bochs gui creates mouse"events"unless the'enabled'option is set to 0. The hardware emulation itself is not disabled by this. Unless you have a particular reason for enabling the mouse by default, it's recommended that you leave it off. You can also toggle the mouse usage at runtime (RFB, SDL, Win32, wxWidgets and X11 β see below).toggleβ the default method to toggle the mouse capture at runtime is to press the CTRL key and the middle mouse button ('ctrl+mbutton'). This option allows you to change the method to'ctrl+f10'(like DOSBox),'ctrl+alt'(legacy QEMU),
Okay so, picking up right where we were β the mouse vibes, in example form:
mouse: enabled=1
mouse: type=imps2, enabled=1
mouse: type=serial, enabled=1
mouse: enabled=0, toggle=ctrl+f10
pciβ this one sets up all the Bochs PCI emulation, bestie, it's giving motherboard energy β¨enabledβ if Bochs got compiled with PCI support, this is on by default. No extra work needed, she's already slaying.chipsetβ right now the supported chipsets arei430FX,i440FXandi440BX(limited, poor thing), and the default isi440FX.slotXβ here's where you tell Bochs which devices are plugged into which PCI slots. You get up to 5 slots. For the combined PCI/ISA devices, assigning a slot is mandatory if you actually want the PCI model emulated (cirrus,ne2kandpcivga). Setting up a slot for PCI-only devices is also a thing you can do, but they get auto-assigned if you don't bother (e1000,es1370,pcidev,pcipnic,usb_ehci,usb_ohci,usb_xhci,voodoo). Heads up though β every device model except the network devicesne2kande1000can only be used once in the slot config. And if you're on thei440BXchipset, slot #5 is the AGP slot, and currently only thevoodoodevice can go in AGP. Iconic but exclusive πadvoptsβ the advanced PCI options, for when you want to control how the PCI chipset behaves. These go in as comma-separated values. By default the"Bochs i440FX"chipset enables the ACPI and HPET devices, but original i440FX doesn't support them, sonoacpiandnohpetlet you turn those off.noagpdisables the incomplete AGP subsystem of the i440BX chipset. And if PCI is enabled,nofdcdisables the FDC when no floppy drive is configured.
Example:
pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k,
advopts=noacpi
clockβ this defines the parameters of the clock inside Bochs. Timekeeping, but make it fashion π°οΈsyncβ how Bochs synchronizes its internal time with realtime. Withnone, Bochs time relies on the IPS value and no host time synchronization is used at all. Theslowdownmethod sacrifices performance to preserve reproducibility while still allowing host time correlation. Therealtimemethod does the opposite β sacrifices reproducibility to preserve performance and host-time correlation. And yes, you can enable both synchronization methods at once. Multitasking queen.rtc_syncβ if you enable this together with the realtime synchronization, the RTC runs at realtime speed. Disabled by default.time0β the start (boot) time of the virtual machine, your little time capsule π. Use a time value as returned by thetime(2)system call, or a string as returned by thectime(3)system call. If notime0value is set, or iftime0equals1(special case), or iftime0equals'local', the simulation starts at the current local host time. Iftime0equals2(special case) or'utc', the simulation starts at the current utc time.
Syntax:
clock: sync=[none|slowdown|realtime|both],
time0=[timeValue|local|utc]
Default values are sync=none, rtc_sync=0, time0=local.
Example:
clock: sync=realtime, time0=938581955 # Wed Sep 29 07:12:35 1999
clock: sync=realtime, time0="Sat Jan 1 00:00:00 2000" # 946681200
cmosimageβ this defines a binary image file with size 128 bytes that can be loaded into the CMOS RAM at startup. Thertc_initparameter controls whether to initialize the RTC with the values stored in the image. By default thetime0argument given to theclockoption is used instead. Withrtc_init=imagethe image becomes the source for the initial time. Fr fr, 128 bytes and she's carrying the whole timeline π
Example:
cmosimage: file=cmos.img, rtc_init=time0
private_colormapβ this requests that the GUI create and use its own non-shared colormap. That colormap gets used when you're in the bochs window. If it's not enabled, a shared colormap scheme may be used instead. And once again βenabled=1turns this feature on,0turns it off.
Example:
private_colormap: enabled=1
floppyaorfloppybβ point this at the pathname of a floppy image file or device.floppyais the first drive,floppybis the second drive. If you're booting from a floppy,floppyashould point to a bootable disk. π
You can set the initial status of the media to 'ejected' or 'inserted'. Usually you'll want 'inserted'.
The parameter type can be used to enable the floppy drive without media and status specified. Usually the drive type gets set up based on the media type.
The optional parameter write_protected controls the media write protect switch. By default it's turned off.
Example:
2.88M 3.5" media:
floppya: 2_88=path, status=ejected
1.44M 3.5" media (write protected):
floppya: 1_44=path, status=inserted, write_protected=1
1.2M 5.25" media:
floppyb: 1_2=path, status=ejected
720K 3.5" media:
floppya: 720k=path, status=inserted
360K 5.25" media:
floppya: 360k=path, status=inserted
Autodetect floppy media type:
floppya: image=path, status=inserted
Use directory as 1.44M VFAT media:
floppya: 1_44=vvfat:path, status=inserted
1.44M 3.5" floppy drive, no media:
floppya: type=1_44
ata0:,ata1:,ata2:orata3:β these options enable up to 4 ata channels. For each channel you have to specify the two base io addresses and the irq.ata0andata1are enabled by default, with the values shown below. These settings are required if PCI IDE is present.
Examples:
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=1, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=1, ioaddr1=0x168, ioaddr2=0x360, irq=9
ata[0-3]-master:orata[0-3]-slave:β this defines the type and characteristics of all attached ata devices. Bestie, this is the whole menu:
type= type of attached device [disk|cdrom]
path= path of the image
mode= image mode [flat|concat|sparse|vmware3|vmware4|vhdx|undoable|growing|volatile|vpc|vbox|vvfat], only valid for disks
cylinders= only valid for disks
heads= only valid for disks
spt= only valid for disks
status= only valid for cdroms [inserted|ejected]
biosdetect= type of biosdetection [auto|cmos|none]
translation=type of translation of the bios, only for disks [none|lba|large|rechs|auto]
model= string returned by identify device command
journal= optional filename of the redolog for undoable, volatile and vvfat disks
Point this at a hard disk image file, cdrom iso file, or a physical cdrom device. To create a hard disk image, try running bximage β it'll help you choose the size and then suggest a line that works with it. So helpful of her π«Ά
In UNIX it is possible to use a raw device as a Bochs hard disk, but WE DON'T RECOMMEND IT. Like, do not. π
The path is mandatory for hard disks. Disk geometry autodetection works with images created by bximage if CHS is set to 0/0/0 (cylinders are calculated using heads=16 and spt=63). For other hard disk images and modes, cylinders, heads, and spt are mandatory. In all cases the disk size reported from the image must be exactly C*H*S*512.
The mode option defines how the disk image is handled. Disks can be defined as:
flat: one file flat layoutconcat: multiple files layoutsparse: stackable, commitable, rollbackablevmware3: vmware3 disk supportvmware4: vmware4 disk support (aka VMDK)vhdx: VHDX disk supportundoable: flat file with commitable redologgrowing: growing filevolatile: flat file with volatile redologvpc: fixed / dynamic size VirtualPC imagevbox: fixed / dynamic size Oracle(tm) VM VirtualBox image (VDI version 1.1)vvfat: local directory appears as read-only VFAT disk (with volatile redolog)
The disk translation scheme (implemented in legacy int13 bios functions, and used by older operating systems like MS-DOS), can be defined as:
none: no translation, for disks up to528MB(1032192sectors)large: a standard bitshift algorithm, for disks up to4.2GB(8257536sectors)rechs: a revised bitshift algorithm, using a 15 heads fake physical geometry, for disks up to7.9GB(15482880sectors). (don't use this unless you understand what you're doing)lba: a standard lba-assisted algorithm, for disks up to8.4GB(16450560sectors)auto: autoselection of best translation scheme. (it should be changed if system does not boot)
Default values are:
mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"
The biosdetect option has currently no effect on the bios. Noted π
Examples:
ata0-master: type=disk, path=10M.sample, cylinders=306, heads=4, spt=17
ata0-slave: type=disk, path=20M.sample, cylinders=615, heads=4, spt=17
ata1-master: type=disk, path=30M.sample, cylinders=615, heads=6, spt=17
ata1-slave: type=disk, path=46M.sample, cylinders=940, heads=6, spt=17
ata2-master: type=disk, path=62M.sample, cylinders=940, heads=8, spt=17
ata2-slave: type=disk, path=112M.sample, cylinders=900, heads=15, spt=17
ata3-master: type=disk, path=483M.sample, cylinders=1024, heads=15, spt=63
ata3-slave: type=cdrom, path=iso.sample, status=inserted
bootβ this defines the boot sequence. Now you can specify up to 3 boot drives, which can be'floppy','disk','cdrom'or'network'(boot ROM). Legacy'a'and'c'are also supported. And the new boot choice'usb'is only supported by thei440fx.binBIOS. π
boot: network, usb, disk
boot: cdrom, floppy, disk
πΎ floppy_bootsig_check:
This one turns off the 0xaa55 signature check on boot floppies. Bestie, it's on by default β so if you want it gone, you gotta say so.
Example:
floppy_bootsig_check: disabled=1
π log:
Drop the path of the log file where you want Bochs to dump its debug + misc. yapping. If you genuinely do not want that energy in your life, just point it at /dev/null and let it scream into the void. π³οΈ
Example:
log: bochs.out
log: /dev/tty (unix only)
log: /dev/null (unix only)
π·οΈ logprefix:
This bad boy controls the format of the little string that gets slapped onto the front of every single log line. You get these special tokens, and they are iconic:
%tβ 11 decimal digits timer tick%iβ 8 hexadecimal digits of cpu0 current eip%eβ 1 character event type ('i'nfo,'d'ebug,'p'anic,'e'rror)%dβ 5 characters string of the device, between brackets
Default: %t%e%d
Examples:
logprefix: %t-%e-@%i-%d
logprefix: %i%e%d
π± panic:
So when Bochs hits a condition where it literally cannot emulate correctly, it does a panic. Could be a config problem (like a typo'd bochsrc line, we've all been there) or an emulation problem (like an unsupported video mode). The "panic" setting tells Bochs how to react:
fatalβ terminate the sessionaskβ ask user how to proceedreportβ print information to the log file
The safest setting is action=fatal or action=ask. If you're getting panics, you can try action=report instead.
β οΈ If you let Bochs continue after a panic, do not be surprised when you get strange behavior or crashes if a panic occurs. That's on you, bestie. π
Please report panic messages unless it's just a configuration problem like "could not find hard drive image."
Examples:
panic: action=fatal
panic: action=ask
π¨ error:
Bochs throws an error message when it finds a condition that really shouldn't happen, but doesn't endanger the simulation. Classic example: the emulated software produces an illegal disk command. Rude.
The "error" setting tells Bochs how to respond. Your options:
fatalβ terminate the sessionaskβ ask user how to proceedwarnβ show dialog with message and continuereportβ print information to the log fileignoreβ do nothing
Example:
error: action=report
error: action=warn
β οΈ warn:
This level is for showing important messages to the user. By default it brings up a message box. The reason for this condition can be different β it can originally be caused by a bug or missing feature in the emulation, but other reasons are also possible. No cap.
Example:
warn: action=report
π¬ info:
Tells Bochs what to do when an event occurs that generates informational messages. You can set this to:
reportβ print information to the log fileignoreβ do nothing
For general usage, the "report" option is probably a good choice. β¨
Example:
info: action=report
π debug:
Tells Bochs what to do with messages meant to assist in debugging. Your choices:
reportβ print information to the log fileignoreβ do nothing
You should generally set this to ignore, unless you are trying to diagnose a particular problem. Fr fr, leave it alone.
π NOTE: When action=report, Bochs may spit out thousands of debug messages per second, which can impact performance and fill up your disk. The way that it will absolutely eat your storage... not cute.
Example:
debug: action=ignore
π debugger:
This defines the parameters of the Bochs internal debugger. Two lil settings live in here:
logβ Give the path of the log file you'd like Bochs to log debugger output. If you really don't want it, make it/dev/nullor'-'.guiβ If this parameter is set to'true'or'1'the debugger gui is used instead of the command line version. The special value'globalini'enables the gui and forces the usage of an ini file fromBXSHAREpath. Theguiparameter is available only if Bochs is built with debugger gui support and the debugger is activated with the command line option'-dbg'.
Examples:
debugger: log=debugger.out, gui=true
debugger: log=/dev/null (unix only)
debugger: log=-
π com1: , com2: , com3: or com4:
This defines a serial port (UART type 16550A). Slay.
In the 'term' mode you can specify a device to use as com1. This can be a real serial line, or a pty. To use a pty (under X/Unix), create two windows (xterms, usually). One of them will run bochs, and the other will act as com1. Find out the tty the com1 window using the tty command, and use that as the dev parameter. Then do sleep 1000000 in the com1 window to keep the shell from messing with things, and run bochs in the other window. Serial I/O to com1 (port 0x3f8) will all go to the other window. πͺ
In socket* and pipe* (win32 only) modes Bochs becomes either socket/named pipe client or server. In client mode it connects to an already running server (if connection fails Bochs treats com port as not connected). In server mode it opens socket/named pipe and waits until a client application connects to it before starting simulation. This mode is useful for remote debugging (e.g. with gdb's "target remote host:port" command or windbg's command line option -k com:pipe,port=\.ipeipename). Socket modes use simple TCP communication, pipe modes use duplex byte mode pipes.
Other serial modes are:
'null'β no input/output'file'β output to a file specified as the'dev'parameter and changeable at runtime'raw'β use the real serial port (partly implemented on win32)'mouse'β standard serial mouse β requires mouse option setting'type=serial','type=serial_wheel'or'type=serial_msys'
Examples:
com1: enabled=1, mode=term, dev=/dev/ttyp7
com2: enabled=1, mode=file, dev=serial.out
com1: enabled=1, mode=mouse
π¨οΈ parport1: or parport2:
This defines a parallel (printer) port. When it's turned on and an output file is defined, the emulated printer port sends characters printed by the guest OS into the output file. On some platforms a device filename can be used to send the data to the real parallel port (e.g. "/dev/lp0" on Linux). The output file can be changed at runtime. So flexible, we love that. π
Examples:
parport1: enabled=1, file=parport.out
parport2: enabled=1, file="/dev/lp0"
parport1: enabled=0
π sound:
This defines the lowlevel sound driver(s) for the wave (PCM) input / output and the MIDI output feature and (if necessary) the devices to be used. It can have several of the following properties. All properties are in the format sound: property=value
waveoutdrv:β This defines the driver to be used for the waveout feature. Possible values are'file'(all wave data sent to file),'dummy'(no output) and the platform-dependant drivers'alsa','oss','osx','sdl'and'win'.waveout:β This defines the device to be used for wave output (if necessary) or the output file for the'file'driver.waveindrv:β This defines the driver to be used for the wavein feature. Possible values are'dummy'(recording silence) and platform-dependent drivers'alsa','oss','sdl'and'win'.wavein:β This defines the device to be used for wave input (if necessary).midioutdrv:β This defines the driver to be used for the MIDI output feature. Possible values are'file'(all MIDI data sent to file),'dummy'(no output) and platform-dependent drivers'alsa','oss','osx'and'win'.midiout:β This defines the device to be used for MIDI output (if necessary).driver:β This defines the driver to be used for all sound features with one property. Possible values are'default'(platform default) and all other choices described above. Overriding one or more settings with the specific driver parameter is possible.
Example for one driver (uses platform-default):
sound: driver=default, waveout=/dev/dsp
Example for different drivers:
sound: waveoutdrv=sdl, waveindrv=alsa, midioutdrv=dummy
π’ speaker:
This defines the PC speaker output mode. In the 'sound' mode the beep is generated by the square wave generator which is a part of the lowlevel sound support. In this mode the 'volume' parameter can be used to set the output volume (0 - 15). The 'system' mode is only available on Linux and Windows. On Linux /dev/console is used for output and on Windows the Beep() function. The 'gui' mode forwards the beep to the related gui methods (currently only used by the Carbon gui).
Example:
speaker: enabled=1, mode=sound, volume=15
πΉ sb16:
This defines the SB16 sound emulation. It can have several of the following properties. All properties are in this format:
sb16: property=value
PROPERTIES FOR sb16:
enabled:β This optional property controls the presence of the SB16 emulation. The emulation is turned on unless this property is used and set to0.midimode:β This parameter specifies what to do with the MIDI output.0= no output1= output to device specified with the sound option (system dependent)2= MIDI or raw data output to file (depends on file name extension)3= dual output (mode 1 and 2 at the same time)
midifile:β This is the file where the midi output is stored (midimode2or3).wavemode:β This parameter specifies what to do with the PCM output.
okay bestie we're picking right back up inside the sb16 block, mid-list, no big deal π
so the wavemode values are:
0= no output1= output to device specified with thesoundoption (system dependent)2= VOC, WAV or raw data output to file (depends on file name extension)3= dual output (mode 1 and 2 at the same time)
and then the rest of the sb16 parameters, which are giving very much "configure me, I'm cute" energy β¨
wavefileβ this is the file where the wave output is stored (so, whenwavemodeis2or3).logβ the file you write the sb16 emulator messages to.loglevelβ how chatty the logs are, and the levels are:0= No log.1= Resource changes, midi program and bank changes.2= Severe errors.3= All errors.4= All errors plus all port accesses.5= All errors and port accesses plus a lot of extra information.
oh and you can change the loglevel at runtime, iconic π
dmatimerβ Microseconds per second for a DMA cycle. Make it smaller to fix non-continuous sound.1000000is usually a good value. This needs a reasonably correct setting for theIPSparameter of theCPUoption and also depends on theclock syncsetting. You can also adjust thedmatimervalue at runtime. π
Examples for output modes:
sb16: midimode=2, midifile="output.mid", wavemode=1 # MIDI to file
sb16: midimode=1, wavemode=3, wavefile="output.wav" # wave to file and device
π es1370 π
This one defines the ES1370 sound emulation (recording and playback β except DAC1+DAC2 output at the same time). The parameter enabled controls the presence of the device. The wave and MIDI output can be sent to device, file or both using the parameters wavemode, wavefile, midimode and midifile. Go read the description of those parameters up at the SB16 directive, iykyk π«Ά
Example for using sound parameters:
es1370: enabled=1, wavemode=1
Example for sending output to file:
es1370: enabled=1, wavemode=2, wavefile=output.voc
π ne2k π
Defines the characteristics of an attached ne2000 isa card :
card=CARD,
type=TYPE,
ioaddr=IOADDR,
irq=IRQ,
mac=MACADDR,
ethmod=MODULE,
ethdev=DEVICE,
script=SCRIPT,
bootrom=BOOTROM
β¨ PROPERTIES FOR ne2k β¨
CARDβ this is the zero-based card number to configure with this ne2k config line. Up to 4 devices are supported now (0...3). If you don't specify it, the following parameters apply to card #0.TYPEβ this is the card type to emulate ('isa'or'pci'). If not specified, card #0 defaults to'pci'if assigned to a pci slot. For the additional cards the type parameter should be set up.IOADDR,IRQβ you probably won't need to changeioaddrandirq, unless there are IRQ conflicts. These parameters are ignored if the NE2000 is assigned to a PCI slot.MACβ the MAC address MUST NOT match the address of any machine on the net. Also, the first byte must be an even number (bit 0 set means a multicast address), and you cannot useff:ff:ff:ff:ff:ffbecause that's the broadcast address. For theethertapmodule, you must usefe:fd:00:00:00:01. There may be other restrictions too. To be safe, just use theb0:c4...address. πETHMODβ theethmodvalue defines which low level OS specific module to be used to access physical ethernet interface. Current implemented values includefbsd: ethernet on freebsd and openbsdlinux: ethernet on linuxwin32: ethernet on win32tap: ethernet through a linux tap interfacetuntap: ethernet through a linux tuntap interfaceslirp: built-in Slirp support with DHCP / TFTP servers
If you don't want to make connections to any physical networks, you can use the following ethmod's to simulate a virtual network.
null: All packets are discarded, but logged to a few filesvde: Virtual Distributed Ethernetvnet: ARP, ICMP-echo(ping), DHCP, DNS, FTP and TFTP are simulated- The virtual host uses
192.168.10.1 - DHCP assigns
192.168.10.15to the guest - The FTP and TFTP servers use
ethdevfor the root directory - TFTP doesn't overwrite files, DNS for server and client only
- The virtual host uses
socket: Connect up to 6 Bochs instances with external programbxhub(simulating an ethernet hub). It provides the same services as thevnetmodule and assigns IP addresses likeslirp(10.0.2.x).
ETHDEVβ theethdevvalue is the name of the network interface on your host platform. On UNIX machines, you can get the name by runningifconfig. On Windows machines, you must runniclistto get the name of the ethdev. Niclist source code is inmisc/niclist.cand it is included in Windows binary releases. The'socket'module uses this parameter to specify the UDP port for receiving packets and (optional) the host to connect. π¦SCRIPTβ the script value is optional, and is the name of a script that is executed after bochs initialize the network interface. You can use this script to configure this network interface, or enable masquerading. This is mainly useful for the tun/tap devices that only exist during Bochs execution. The network interface name is supplied to the script as first parameter. The'slirp'module uses this parameter to specify a config file for setting up an alternative IP configuration or additional features. The'vnet'module also uses this parameter to specify a config file similar to slirp, but with only a few settings.BOOTROMβ the bootrom value is optional, and is the name of the ROM image to load. Note that this feature is only implemented for the PCI version of the NE2000. For the ISA version using one of the'optromimage[1-4]'options must be used instead of this one.
Examples:
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=fbsd, ethdev=xlo
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tap, ethdev=tap0
ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun0, script=./tunconfig
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vde, ethdev="/tmp/vde.ctl"
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vnet, ethdev="c:/temp"
ne2k: mac=b0:c4:20:00:00:01, ethmod=socket, ethdev=40000 # use localhost
ne2k: card=0, mac=b0:c4:20:00:00:01, ethmod=socket, ethdev=mymachine:40000
ne2k: mac=b0:c4:20:00:00:01, ethmod=slirp, script=slirp.conf, bootrom=ne2k_pci.rom
π pcipnic π
To support the Bochs/Etherboot pseudo-NIC, Bochs must be compiled with the --enable-pnic configure option. It accepts the same syntax (for mac, ethmod, ethdev, script, bootrom) and supports the same networking modules as the NE2000 adapter.
Example:
pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
β e1000 β
To support the Intel(R) 82540EM Gigabit Ethernet adapter, Bochs must be compiled with the --eanble-e1000 configure option. The E1000 accepts the same syntax (for card, mac, ethmod, ethdev, script, bootrom) and supports the same networking modules as the NE2000 adapter.
Example:
e1000: card=0, enabled=1, mac=52:54:00:12:34:56, ethmod=slirp, script=slirp.conf
π§ usb_uhci π§
This option controls the presence of the USB root hub which is a part of the i440FX PCI chipset. With the portX parameter you can connect devices to the hub (currently supported: 'mouse', 'tablet', 'keypad', 'keyboard', 'disk', 'cdrom', 'floppy', 'hub' and 'printer'). π«Ά
If you connect the mouse or tablet to one of the ports, Bochs forwards the mouse movement data to the USB device instead of the selected mouse type. When connecting the keypad to one of the ports, Bochs forwards the input of the numeric keypad to the USB device instead of the PS/2 keyboard. If the keyboard is selected, all key events are sent to the USB device.
To connect a disk image as a USB hardisk you can use the 'disk' device. Use the 'path' option in the optionsX parameter to specify the path to the image separated with a colon. To use other disk image modes similar to ATA disks the syntax 'path:mode:filename' must be used (see below).
To emulate a USB cdrom you can use the 'cdrom' device and the path to an ISO image or raw device name can be set with the 'path' option in the optionsX parameter also separated with a colon. An option to insert/eject media is available in the runtime configuration.
To emulate a USB floppy you can use the 'floppy' device and the path to a floppy image can be set with the 'path' option in the optionsX parameter separated with a colon. To use the VVFAT image mode similar to the legacy floppy the syntax 'path:vvfat:directory' must be used (see below). An option to insert/eject media is available in the runtime configuration.
The device name 'hub' connects an external hub with max. 8 ports (default: 4) to the root hub. To specify the number of ports you have to use the 'ports' option in the optionsX parameter with the value separated with a colon. Connecting devices to the external hub ports is only available in the runtime configuration.
The device 'printer' emulates the HP Deskjet 920C printer. The PCL data is sent to a file specified in the 'file' option with the optionsX parameter. The current code appends the PCL code to the file if the file already existed. The output file can be changed at runtime. π
The optionsX parameter can be used to assign specific options to the device connected to the corresponding USB port. It's giving personal assistant for your USB port, fr fr. π
- The option
'speed'can be used to set the speed reported by device ('low','full','high'or'super'). The available speed choices depend on both HC and device. vibe check: depends on HC AND device, iykyk - The option
'debug'turns on debug output for the device at connection time. debug girlies rise π₯ - The option
'pcap'turns on packet logging in PCAP format. packet tea, logged π
For the USB 'disk' device the optionsX parameter can be used to specify an alternative redolog file (journal) of some image modes. For 'vvfat' mode USB disks the optionsX parameter can be used to specify the disk size (range 128M ... 128G). If the size is not specified, it defaults to 504M. For the USB 'floppy' device the optionsX parameter can be used to specify an alternative device ID to be reported. Currently only the model "teac" is supported (can fix hw detection in some guest OS). The USB floppy also accepts the parameter "write_protected" with valid values 0 and 1 to select the access mode (default is 0).
Examples: copy these exactly, no autocorrect energy π
usb_uhci: port1=mouse, port2=disk, options2="path:usbstick.img"
usb_uhci: port1=hub, options1="ports:6"
usb_uhci: port2=disk, options2="path:undoable:usbdisk.img, journal:u.redolog"
usb_uhci: port2=disk, options2=""path:usbdisk2.img, sect_size:1024"
usb_uhci: port2=disk, options2="path:vvfat:vvfat, debug, speed:full"
usb_uhci: port2=cdrom, options2="path:image.iso"
usb_uhci: port1=printer, options1="file:printdata.bin"
usb_uhci: port2=floppy, options2="path:vvfat:diskette, model:teac"
usb_ohci:
This option controls the presence of the USB OHCI host controller with a 2-port hub. The portX parameter accepts the same device types with the same syntax as the UHCI controller (see above). The optionsX parameter is also available on OHCI. 2-port hub, cute π
Example:
usb_ohci: enabled=1
usb_ehci:
This option controls the presence of the USB EHCI host controller with a 6-port hub. The portX parameter accepts the same device types with the same syntax as the UHCI controller (see above). The optionsX parameter is also available on EHCI. six ports, highkey generous π
Example:
usb_ehci: enabled=1, port1=tablet, options1="speed:high"
usb_xhci:
This option controls the presence of the USB xHCI host controller with a 4-port hub. The portX parameter accepts the same device types with the same syntax as the UHCI controller (see above). The optionsX parameter is also available on xHCI. NOTE: port 1 and 2 are USB3 and only support super-speed devices, but port 3 and 4 are USB2 and support speed settings low, full and high. important note, bestie β port 1 & 2 are USB3 super-speed only, port 3 & 4 are USB2 with low/full/high β οΈ
Example:
usb_xhci: enabled=1
pcidev:
Enables the mapping of a host PCI hardware device within the PCI subsystem of the Bochs x86 emulator. This feature requires Linux as a host OS. Linux girlies only, no cap π§
Example:
pcidev: vendor=0x1234, device=0x5678
The vendor and device arguments should contain the vendor ID respectively the device ID of the PCI device you want to map within Bochs. The PCI mapping is still very experimental and not maintained yet. very experimental, not maintained β proceed with caution, bestie π
LICENSE
This program is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. See the LICENSE and COPYING files located in /usr/share/doc/bochs/ for details on the license and the lack of warranty. legal tea, but make it open source π
AVAILABILITY
The latest version of this program can be found at:
https://bochs.sourceforge.io/getcurrent.html
go get the freshest version, bestie β¨
SEE ALSO
The Bochs IA-32 Emulator site on the World Wide Web:
https://bochs.sourceforge.io
Online Bochs Documentation
https://bochs.sourceforge.io/doc/docbook
iykyk, more docs more vibes π¦
AUTHORS
The Bochs emulator was created by Kevin Lawton (kevin@mandrakesoft.com), and is currently maintained by the members of the Bochs x86 Emulator Project. You can see a current roster of members at:
https://bochs.sourceforge.io/getinvolved.html
shoutout to Kevin Lawton and the whole Bochs x86 Emulator Project β iconic behavior π
BUGS
Please report all bugs to the bug tracker on our web site. Just go to https://bochs.sourceforge.io, and click "Bug Reports" on the sidebar under "Feedback". do NOT suffer in silence, bestie π
Provide a detailed description of the bug, the version of the program you are running, the operating system you are running the program on and the operating system you are running in the emulator. the more deets, the faster the fix, fr fr π
and that's a wrap on bochsrc(5), bestie β source/version vibe: bochsrc(5), dated 22 Aug 2026. slay, periodt π
β¨
π¦ where this page comes from
- fedora 43: bochs 3.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: bochs 3.1-1.fc44 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms