I have Bochs Working enough to boot floppy!!
Chris Caudle
chris at chriscaudle.org
Sat Oct 16 16:41:08 UTC 2004
I posted these instructions a couple of years back when I first was playing
with Bochs and RTEMS. Here is the mailing list reference, and the text is
also copied below for convenience.
http://www.rtems.com/rtems/maillistArchives/rtems-users/2002/december/msg00051.html
Would these still be relevent enough that I should add them to the Wiki?
Mostly it covers how you use the loop interface to mount a floppy disk image
so that you can modify the disk image before you start the simulator.
This does not involve mtools, and I haven't looked over the details of the
mtools instructions posted a few days ago to know whether the process I
describe would be exclusionary or complementary to the mtools method.
Comments?
--
Chris Caudle
--
These instructions apply to Linux. Much of this will work on a Windows
platform, but things like device access will obviously be different.
Consult the Bochs documentation if you need access to the floppy or hard
drive under Windows and can't use the /dev/fd0 suggestion below.
Download Bochs from Sourceforge. Lots of new features are going into 2.0,
so I would skip the 1.4 release, and go with one of the 2.0 release
candidates until 2.0 is actually released.
Main site:
http://bochs.sourceforge.net/
Prerelease RPM's:
http://bochs.sourceforge.net/release2_0.html
You may need a new wxWindows to fulfill some dependencies. You can get
2.3.3 from the same page as the 2.0 prerelease RPM.
Move the sample configuration file into the directory from which you will be
running bochs.
If you installed from RPM, the sample file is located in:
/usr/share/doc/bochs/bochsrc-sample.txt
Rename the file bochsrc (I think .bochsrc may also work if you want the file
hidden).
Comment out the ATA drive line, and change the floppy drive line to point to
either /dev/fd0 or a file that you have created from a floppy
(using "dd if=/dev/fd0 of=flop.img" or a bootable image file you have
downloaded).
Assuming your floppy drive image file is "flop.img" and you have a directory
/mnt/image, you can mount the floppy image for modification with the loop
option:
mount flop.img /mnt/image -o loop
You can mount the image for modification more easily if you add an entry
like this to your /etc/fstab file:
flop.img /mnt/image auto noauto,user,loop 0 0
Then the command "mount /mnt/image" will mount the image for you. If you
have multiple disk images, you can give them different names and create a
symbolic link from flop.img to whichever image file you want to use at that
time, or you could of course set up multiple entries in fstab and have
/mnt/image1, /mnt/image2, etc.
After mounting your floppy disk image and putting whichever files you want
onto the image, make sure you unmount the image before starting bochs.
Just run the command "bochs," and when the simulation window starts, pick
the "Simulate" menu and select "Start." You should see the normal startup
messages in the window at that point.
More information about the users
mailing list