Minix 3/Minix 3 on Bochs

From Wikibooks, open books for an open world
< Minix 3
Jump to: navigation, search

Run MINIX 3 on Windows XP Bochs[edit]

The recipe below was successfully tried with Minix versions 3.1.1, 3.1.2, 3.1.2a. The Bochs ver. 2.2.6 was running under (or over?) Windows XP.It also may work on other operating system that support Bochs Environment.

  • Download a Minix 3 bootable CD ISO image[1]. You'll download an archive, unpack it - you'll get the file with name like IDE-3.1.1.iso.
  • Download Bochs - in my case,I have used Bochs 2.2.6 released for Windows XP but should work higher verion[2].
  • Install WinPCap, downloadable from [3].
  • Install Bochs - when asked for options, add DLX Linux.
  • In the directory where the default installed Bochs will be in (C:\Program Files\Bochs-2.2.6) , you'll find dlxlinux directory.
  • You need to make a copy of dlxlinux in the same parent directory with different name minix3. This new directory will be your Minix OS versions.
  • Go to the new minix3 directory and edit bochsrc.bxrc file.
###############################################################
# bochsrc.txt file for Minix3 disk image.
###############################################################

# how much memory the emulated machine will have megs: 256
# filename of ROM images romimage: file=../BIOS-bochs-latest, address=0xe0000 vgaromimage: file=../VGABIOS-lgpl-latest
# what disk images will be used floppya: 1_44=floppya.img, status=inserted floppyb: 1_44=floppyb.img, status=inserted
# hard disk ata0-slave: type=cdrom, path=IDE-3.1.1.iso, status=inserted
# choose the boot disk. boot: cdrom
# default config interface is textconfig. #config_interface: textconfig #config_interface: wx
#display_library: x # other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
# where do we send log messages? log: bochsout.txt
# disable the mouse, since DLX is text only mouse: enabled=0
# ne2k: NE2000 compatible ethernet adapter ne2k: ioaddr=0x240, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
# enable key mapping, using US layout as default. # # NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows. # However, the key mapping tables are used in the paste function, so # in the Minix3 example I'm enabling keyboard_mapping so that paste # will work. Cut&Paste is currently implemented on win32 and X windows only.
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map #keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map #keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map #keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map
  • Run Boch's NIC Lister. For a few ordinary Windows XP machines with one network card NIC Lister mentions three interfaces, and some of them usually works.
  • Put the IDE-3.1.1.iso file with Minix 3 bootable CD image into minix3 directory.
  • Edit the run.bat file in the minix3 directory - replace dlxlinux with minix3 on the first line in the path.
# Run.bat
cd "C:\Program Files\Bochs-2.3\minix3"
..\bochs -q -f bochsrc.bxrc
  • Run run.bat - you'll get Minix 3 booting in the virtual Bochs PC.

Install Minix onto a Virtual Hard Drive[edit]

The step below work on any Bochs Environment and doesn't depend on the operating system

  • Create the file for that drive first. Launch the Disk Image Creation Tool, which is included into Bochs distribution. The interface is very simple - the program just asks a few questions and does the job, but just in case, you'll wand a hard drive (hd) disk image, of flat (flat) type, sized, for example, 2048 megabytes (2048) - it will actually be 8192 bytes less than that - named hd2gig.img.
  • You'll need to edit bochsrc.bxrc again. The line in hard disk section, related to disk - if you took the bochsrc.bxrc from dlxlinux, it will contain
# hard disk
"ata0-master: type=disk, path="hd10meg.img", cylinders=306, heads=4, spt=17"

should contain the line, which Disk Image Creation Tool put into clipboard, namely,

# hard disk
"ata0-master: type=disk, path="hd2gig.img", mode=flat, cylinders=4161, heads=16, spt=63"
  • Relaunch Minix booting from cdrom, login as root, run "setup", which will install Minix on the virtual hard drive. The network will get installed as well.
  • After installation is complete, run "shutdown", in boot monitor run "off" so Bochs will turn down, and change "boot: cdrom" to "boot: disk", so you'll boot next time from virtual disk instead of cdrom.

References[edit]

  1. Official MINIX 3 Operating System site
  2. Bochs Development Homepage
  3. Official site for WinPcap