Author: Mayank Sharma

What if you need to run your legacy Windows application on a Linux box, a Mac, or a Solaris-based workstation? To make the equation even more interesting throw in a few requirements — add transferring old legacy accounting data over the network, or using the backed-up data from a CD-ROM. And yes, you want to keep the costs to a minimum. An open source project called Bochs may be your best option.

VMware is a (costly) commercial application that lets you run a guest operating system on a Windows or a Linux installation. Wine, on the other hand, though free, supports a very limited number of applications, and the same can be said about CrossOver Office. WinLin does a little better, but it doesn’t support Windows NT, 2000, or XP. And none of these alternatives run on Macintosh or SPARC-based hardware.

Bochs-2.6.8.apk free download. Bochs x86 PC emulator Bochs is a portable x86 PC emulation software package that emulates enough of the x86 CPU, related A. Xda-developers Android Development and Hacking Android Apps and Games APP2.2+ BOCHS for Android (Pentium PC emulator) by korvs2003 XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.

Bochs, an open source project, may be a better answer. It emulates 286, 386, 486, Pentium, Pentium Pro, and AMD 64-bit CPUs, fooling the guest OS into thinking that it’s running on real hardware. Bochs (pronounced “box”) provides I/O emulation for a computer’s standard parallel port, serial port, VGA card, disk, CD-ROM, timer chip, and network card, along with a custom BIOS.

Emulating the x86 hardware is Bochs’s strongest point. Bochs enables you to install Windows on a SPARC workstation or Debian on a Mac. However, hardware emulation deals a massive blow to the performance of the non-native operating systems.

The Bochs Web site says that Bochs is an ideal operating system and application testing environment. Unfortunately, you need high-performance top-of-the-line hardware to use the emulated environment productively. But Bochs is an ideal teaching tool for operating system classes.

Installing Bochs

You can download the latest release of Bochs, 2.1.1, in various packages for various environment. For Linux, you can download either the source package (.tar.gz) or the RPM. The source package is a better option, as it allows you to specify various options during install.

Your

Change to the directory which houses the tarball, untar it, and run the configure script:

The configure command tells Bochs to prepare the make files, enabling the network card and the CD-ROM. After configure has finished checking and generating the make files, issue the make command. Then change to the super user (su) and issue the make install command.

Configuring Bochs

The Bochs operating environment is regulated by a single file, .bochsrc, which resides in the base directory.

Before you can install an operating system using the new emulated hardware, you need to create a virtual hard disk. From the base directory issue the following command:

In the session above I used bximage to create a 500MB drive named c.img.

Now edit the .bochsrc file in your favorite text editor. Scroll down to the ATA[0-3]-MASTER, ATA[0-3]-SLAVE section. Comment out everything below the example section by adding a # character in front of each line, then add the line as suggested by bximage above. Save the file, but don’t close it yet.

Android

Starting from the top of the file under the section ROMIMAGE, verify the location of the BIOS-bochs-latest file. This file resides in the bios/ directory which is under the installation directory.

Next, specify the MEGS (the amount of memory the virtual system should emulate) you want. The default is 32. If you want to run DOS that should be enough. In the section FLOPPYA: make sure floppya: points to the real diskette device. It’s probably /dev/fd0, but check your /etc/fstab file if you’re not sure. In the boot section specify the device you want to boot from. The default is floppy.

Save and exit the file. Now you’re ready to run the new virtual machine.

Next: Running Bochs

To start Bochs, issue this command from the command line:

This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate. Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found. When you are satisfied with the configuration, go
ahead and start the simulation.

You can also start bochs with the -q option to skip these menus.

You can begin the simulation by pressing Enter. After a lot of messages scroll across the screen, you’ll see the emulation window, which is like the monitor of your new machine. But since the drive the isn’t formatted, you will get an error. Time to get a disk image.

Installing a disk image

To format and partition the disk you just created, you need FreeDOS, which is a free version of DOS. The latest version of FreeDOS is beta9.

Edit the .bochsrc file and scroll down to the section where you specified the hard disk image. The c.img file is the ata0-master device. Add the following line:

ata0-slave: type=cdrom, path='/home/bodhi/freedos/fdbootcd.iso', status=inserted

Change the path to point to the location where the FreeDOS ISO resides. Save the file and exit.

Run Bochs. From the main menu press 3 to edit the options, then press 8 to change disk options. Finally press 16 to change the boot device. Typing cdrom will change the boot device for this session to CD-ROM. Press enter three times to return to the main menu and start the emulation. This time you’ll see Bochs boot into DOS. Use fdisk to create partitions and format to format them.

After you have formatted your disk, you need to re-edit your .bochsrc. Go to the disk section and comment out the ata0-slave line you added earlier. In its place add this line:

Download And Install Bochs For Your Android Phone

ata0-slave: type=cdrom, path=/dev/hdb, status=inserted

You can find the path to your CD-ROM drive from the /etc/fstab file.

Installing Windows

Download And Install Bochs For Your Android Phone

Now that your disk is partitioned it’s time to install an operating system on it. I installed a licensed copy of Windows 98 Second Edition.

Put the CD in the drive. Start bochs. Edit the Disk options to boot from the CD. Start the emulation. Windows will scan the disk first and then you’ll be taken to the GUI installation. Once you are done, start Bochs by pressing Enter on the main menu. Voila! There’s Windows right on your Linux desktop.

Mayank Sharma is a freelance technology writer and FLOSS migration consultant in New Delhi, India.