To calculate the offset, you also need to know the sector size.
![qemu images qemu images](https://www.file.net/img/screenshot/taskman-qemu-system-i386-exe.png)
To determine the offset of the C: drive, you need to know the starting sector of that partition. Here, the C: drive is the first and only partition on the virtual drive, listed as image.img1. I/O size (minimum/optimal): 512 bytes / 512 bytesĭevice Boot Start End Sectors Size Id Type Sector size (logical/physical): 512 bytes / 512 bytes Using the -l option will list the partitions on the virtual disk: $ fdisk -l image.imgĭisk image.img: 100 MiB, 104857600 bytes, 204800 sectors Let’s look at output from the Linux fdisk program. The virtual disk can contain multiple partitions, but for most legacy operating system installations like DOS, you probably only have one partition. Linux can mount QEMU’s raw disk image format, assuming it knows where to find the start of the C: drive partition on the virtual disk. You can mount a QEMU disk image using two basic methods: using an offset to mount the image directly, or using the libguestfs-tools package.
![qemu images qemu images](https://www.eve-ng.net/images/eve-icons/Logo_EVE_Color.png)
QEMU IMAGES INSTALL
But having installed FreeDOS, how do you then install and run the legacy program in QEMU? You can follow our instructions to install and boot FreeDOS using the QEMU virtual machine.
![qemu images qemu images](https://wiki.gentoo.org/images/b/ba/Qemu_network_diag.png)
If the legacy program originally ran on DOS, you might boot a copy of FreeDOS, and install the legacy program there to extract or export the data to a common file format, like a comma-separated CSV file. Let’s say you discover critical business data in a legacy DOS spreadsheet file, and Excel can’t read the file.