I suggest simple steps for running ubuntu inside bochs emulator and my processor is Pentium(R) Dual-Core CPU T4500 @ 2.30GHz running debian distro.

Installation is simple,

$ sudo apt-get install bochs

This package contains an X11 GUI plugin for Bochs,

$ sudo apt-get install bochs-x

Another way of installation…

In order, to boot up a Operating system inside bochs we need

1) iso image of respective OS

2) disk image

3) bochsrc file


For downloading iso image of ubuntu click here

For creating disk image

$ mkdir test

$ cd test/

$ bximage

It will drop to

                                            Disk Image Creation Tool for Bochs
                         $Id: bximage.c,v 1.34 2009/04/14 09:45:22 sshwarts Exp $

Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd]<press ENTER>

What kind of image should I create?
Please type flat, sparse or growing. [flat]<press ENTER>

Enter the hard disk size in megabytes, between 1 and 129023
[10] <How much MB of disk image>10240<press ENTER>

I will create a ‘flat’ hard disk image with

sectors per track=63
total sectors=20971440
total size=10239.96 megabytes

What should I name the image?
[c.img]<give any name>dummy.img<press ENTER>

Writing: [] Done.

I wrote 10737377280 bytes to dummy.img.

The following line should appear in your bochsrc:
ata0-master: type=disk, path=”dummy.img”, mode=flat, cylinders=20805, heads=16, spt=63

As a result you created a hard disk image dummy.img of size 10G inside present working directory. Be aware of including last line of previous output inside bochsrc file.


Creation of bochsrc file

$ vim bochsrc

My simple bochsrc file is

# bochsrc
megs: 1024
mouse: enabled=1
ata0-master: type=disk, path=”ubuntu.img”, mode=flat, cylinders=20805, heads=16, spt=63
ata1-master: type=cdrom, path=./ubuntu-12.10-desktop-i386.iso, status=inserted
log: ubuntuop.txt
boot: cdrom


megs: 1024 – I allocated 1024MB of RAM for my emulator

mouse: enabled=1 – I enabled mouse inside my emulator

ata0-master: type=disk, path=”ubuntu.img”, mode=flat, cylinders=20805, heads=16, spt=63 – Inclusion of hard disk image specification

ata1-master: type=cdrom, path=./ubuntu-12.10-desktop-i386.iso, status=inserted – Inclusion of OS iso image

log: ubuntuop.txt – It is normally a log file, which keeps tracking of emulator execution, can be referred at anytime for debugging purpose

boot: cdrom – boot my OS from cdrom(iso image of ubuntu) inside emulator

Be sure, that iso image file(ubuntu) + hard disk image file + bochsrc all at same directory.

To run ubuntu inside bochs,

$ bochs 

A new window will pop up and ubuntu will start booting inside of it.

Since it is Emulator, process of booting ubuntu may be slow, be patience to see how it is booting.




3 thoughts on “How to boot and run Ubuntu inside bochs emulator and make a virtual machine

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s