Bochs PC Emulation on MacOS X
I thought I would blog my Bochs 2.1 installation experience on MacOS X since there is no disk image available yet.
Bocsh is not dissimilar from VirtualPC et al. (don't talk to me about Microsoft) and provides Intel/AMD x86 processor and standard BIOS/VGA emulation. In otherwords a virtual PC ;) Bochs is opensource, fairly unpolished compared to VPC (come on, it's free!) and quite slow in comparison. From what I can tell it's a fairly pure emulator without the heinous caching, prediction, client OS drivers etc. required to make PC emulation zip.
Compilation on Panther (10.3) was really very easy. With the developer tools installed I kjust downloaded the bosch 2.1 source tarball, untarred it, did a ./compile --enable-cdrom ; make ; sudo make install dance and bob's your uncle - bosch.app !
I relocated it before I tried launching it and discovered that a buch of support files (like the bios) are required. The easiest thing to do is to do a make clean and just leave the whole source tree hanging around - makes recompiles nice and easy.
The next step is the config file. Unless you want to be lanching bosch from the command line every time, you want to be editing the .bochsrc config file (invisible in the finder unless you have used tweakUI to show hidden files etc.).
The MacOS X version also doesn't seem to support native cdrom access, so I had to image a win98 SE install CD - you can do it with Apple's Disk Tool (in your Applications/Utilites folder), just make a non-encrypted .dmg file and you'll be sweet.
I made a "images" folder in the bocsh-2.1 folder and copied the cd image (im my case win98-cd.dmg) there. Now we need a hard drive image file, and the bochs suite provides a commandline program bximage to do just that. I gave the following responses:
...
Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] hd
What kind of image should I create?
Please type flat, sparse or growing. [flat] growing
Enter the hard disk size in megabytes, between 1 and 32255
[10] 4096
I will create a 'growing' hard disk image with
cyl=8322
heads=16
sectors per track=63
total sectors=8388576
total size=4095.98 megabytes
What should I name the image?
[c.img] win98-hd.img
Writing:[] Done.
I wrote 4294950912 bytes to win98-hd.img.
The following line should appear in your bochsrc:
ata0-master: type=disk, path="win98-hd.img", mode=growing, cylinders=8322, heads=16, spt=63
I moved this win98-hd.img file to the images folder as well. Note the line at the end where bximage gives you the config options for the drive you just created - copy that into your clipboard because we are about to make the following amendments to the .bochsrc config file (changes in bold - look for similar lines in the default config):
vgaromimage: $BXSHARE/bios/VGABIOS-elpin-2.40
ata0-master: type=disk, path="images/win98-hd.img", mode=growing, cylinders=8322, heads=16, spt=63
ata0-slave: type=cdrom, path="images/win98-cd.dmg", status=inserted
mouse: enabled=1
boot: cdrom
Double click Bochs, and do a normal win98 install! Don't go make a coffee, go for a drive to your favourite cafe and read the news paper—this is going to take a LONG time!
When you're all done, you just want to change the boot: config line to disk and commend out the line that mounts your cd image.
Enjoy!
12:22 AM, 03 Feb 2004 by Mark Aufflick Permalink | Short Link
i let my install finish...
and it had to have taken several days. i started on a sunday evening, let it run all night, took my laptop(tibook, 667mhz, 512 ram) to work, let it run some more(i never shutdown unless absolutely necessary), the install still going at the end of the day, took it home and let it churn away all night, and sometime during the next day(tuesday) i had to "reboot" the windows install to finish the install! unfuckingbearably slow... i still have hope that bochs would have a place in a work environment for limited pc needs, so i'm trying again. i'm currently doing my install on a linux box, downloading and running litepc and stripping everything i don't need, run whatever optimization i can and copy the disk image back to a mac.
by Unregistered Visitor on 03/08/04
unbearably slow to install, or else some other problem
Tried to do a W 95 install from both a physical OEM cd and a disk image made from that cd using Version 2.1.1 of the emulator. Something is obviously not cool. Even after letting it run all night, and perhaps close to 12 hours of cpu time logged on a G4 400, still no Windows installer screen. The setup.exe program on the installer disk starts up ok but never budges after I have responded to the initial prompt/message. Most of the accounts of "successful" (heh!) installations that I have read about have been with W 98 or newer.
by Unregistered Visitor on 06/01/04








Wow - when they say slow they mean slow!
I cancelled the win98 install after about 10 hours!!
by Mark Aufflick on 02/03/04