8.17. Disk Image Modes

Bochs can handle independent disk image format for each disk present on the ata interfaces. The disk image type is selected in the configuration file by the "mode" option of the ataX-xxx directives. Example:

ata0-master: type=disk, mode=flat, path=10M.sample, cylinders=306, heads=4, spt=17

Note

If unspecified, the default "mode" is flat.

Table 8-3. Supported Disk Modes

NameDescriptionFeatures
flat one file, flat layout accessible with mtools or winimage-like tools
concat multiple files, concatenated mappable to contained partitions
external accessed through an external C++ class developer specific, needs a C++ class at compile time
dll accessed through a DLL developer specific, windows only
sparse up to 10 layers stackable files commitable, rollbackable, growing
vmware3 vmware3 disk support vmware3 compatibility
undoable flat file with a commitable redolog commitable, rollbackable
growing one growing file growing
volatile flat file with a volatile redolog always rollbacked

8.17.1. flat

8.17.2. concat

text from old enable-split-hd option, to be completed

      When enabled, this allows a series of partial hard disk image files to be
      treated as if it was one large file.  The .bochsrc specifies the first
      partial HD image (example win95-1) and then bochs searches for the other
      partial images in as a sequence (win95-2, win95-3, etc.) and opens them
      all.  Then, it treats the series as if there was a single large file
      created by "cat win95-1 win95-2 win95-3".  
      All files must be a multiple of 512 bytes.
// This option enables "split hard drive" support, which means
// that a series of partial hard disk images can be treated
// as a single large image.  If you set up the partition sizes and
// file sizes correctly, this allows you to store each partition
// in a separate file, which is very convenient if you want to operate
// on a single partition (e.g. mount with loopback, create filesystem,
// fsck, etc.).
// [[Provide example of partitioning]]

8.17.3. external/dll

8.17.4. sparse

8.17.4.2. image creation

Sparse disk images must be created with the bximage utility (see Section 8.18 for more information). Be sure to enter "sparse" when selecting the image type.

8.17.4.5. typical use

8.17.5. vmware3

8.17.6. undoable

8.17.6.1. description

Undoable disks are commitable/rollbackable disk images. An undoable disk is based on a read-only flat image (see Section 8.17.1), associated with a growing redolog, that contains all changes (writes) made to the flat image content.

This redolog is dynamically created at runtime, if it does not previously exists.

All writes go to the redolog, reads are done from the redolog if previously written, or from the flat file otherwise.

If unspecified with the "journal" option of the ataX-xxx directive, the redolog file name is created by adding a ".redolog" suffix to the flat image name.

File size of the redolog can grow up to the total disk size plus a small overhead due to internal data managment (about 3% for a 32MiB disk, less than 0.5% for a 2GiB disk).

After a run, the redolog will still be present, so the changes are still visible the next time you run Bochs with this disk image.

After a run, the redolog can be committed (merged) to the flat image with the bxcommit utility.

After a run, the redolog can be rollbacked (discarded) by simply deleting the redolog file.

Note

In this mode, the flat file is always open in read-only mode, so it can safely be stored on a read-only medium (for example on a cdrom).

8.17.6.2. image creation

The flat disk images must be created with the bximage utility (see Section 8.18 for more information). The growing redolog is created automatically if needed.

8.17.6.4. external tools

See Section 8.17.1.4 for tools to access the flat disk image content.

Note

The up-to-date content can only be seen after you commit the redolog to the flat file with the bxcommit utility.

8.17.7. growing

8.17.7.2. image creation

Growing disk images must be created with the bximage utility (see Section 8.18 for more information). Be sure to enter "growing" when selecting the image type.

8.17.8. volatile

8.17.8.1. description

Volatile disks are always-rollbacked disk images. An volatile disk is based on a read-only flat image (see Section 8.17.1), associated with a growing temporary redolog, that contains all changes (writes) made to the flat image content. All data written to the disk image are lost at the end of the Bochs session.

The redolog is dynamically created at runtime, when Bochs starts, and is deleted when Bochs closes (win32) or just after it has been created (unix).

All writes go to the redolog, reads are done from the redolog if previously written, or from the flat file otherwise.

If unspecified with the "journal" option of the ataX-xxx directive, the redolog file name is created by adding a ".redolog" suffix to the flat image name.

File size of the redolog can grow up to the total disk size plus a small overhead due to internal data managment (about 3% for a 32MiB disk, less than 0.5% for a 2GiB disk).

After a run, the redolog is not any more present, so the changes are discarded.

Note

In this mode, the flat file is always open in read-only mode, so it can safely be stored on a read-only medium (for example on a cdrom).

8.17.8.2. image creation

The flat disk images must be created with the bximage utility (see Section 8.18 for more information). The growing redolog is created automatically.

8.17.8.4. external tools

See Section 8.17.1.4 for tools to access the flat disk image content.