mips64emul documentation: Installing and running "guest OSes"

Back to the index


Installing and running "guest OSes"


General notes on running "guest OSes":

The emulator works well enough to run complete operating systems. These are often refered to as "guest" operating systems.

Although it is possible to let a guest OS access real hardware, such as harddisks, it is much more flexible and attractive to simulate harddisks using files residing in the host's filesystem. On Unix-like systems, files may contain holes, which makes this really simple. To the guest operating system, the harddisk image looks and acts like a real disk.


How to install NetBSD/pmax in the emulator:

To install NetBSD/pmax onto a harddisk image in the emulator, follow these instructions:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Create an empty harddisk image, which will be the root disk that NetBSD installs itself onto:
    	$ dd if=/dev/zero of=netbsddisk.img bs=1 count=512 seek=1900000000
    
    

From this point, there are two separate ways to continue the installation. You can either download a CD-ROM iso image (and let the installation program copy files from the CD-ROM image to the harddisk image), or you can install via ftp. For an installation from a CD-ROM image, follow these steps:

  1. Download a NetBSD CD-ROM iso image:
    	ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/pmaxcd.iso
    	or
    	ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0/pmaxcd.iso
    
    
  2. Start the emulator like this:
    	$ ./mips64emul -X -b -E dec -e 3max -d netbsddisk.img -d bc:pmaxcd.iso
    

For an ftp install, substitute steps 3 and 4 above with these:

  1. Download a NetBSD pmax INSTALL kernel, and gunzip it:
    	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz
    	or
    	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0/pmax/binary/kernel/netbsd-INSTALL.gz
    
    	$ gunzip netbsd-INSTALL.gz
    
    
  2. Start the emulator like this:
    	$ ./mips64emul -X -b -E dec -e 3max -d netbsddisk.img -O netbsd-INSTALL
    

(If you don't want to use a graphical framebuffer during the install, you can remove -X from the command line, but then make sure you choose 'vt100' when prompted with which terminal type to use, and not 'rcons'.)

Then proceed like you would do if you were installing NetBSD on a real DECstation. If you are installing from the network, then suitable networking parameters are as follows:

	Which device shall I use? [le0]: le0
	..
	Your DNS domain: mydomain.com
	Your host name: foo
	Your IPv4 number: 10.0.0.1
	IPv4 Netmask [0xff000000]: 0xff000000
	IPv4 gateway: 10.0.0.254
	IPv4 name server: 10.0.0.254

(If using 10.0.0.254 as the nameserver fails, then try entering the IP number of a real-world nameserver instead.)

When the installation is completed, the following command should start NetBSD from the harddisk image:

	$ ./mips64emul -X -b -M64 -E dec -e 3max -d netbsddisk.img

Use startx to start X windows.

NOTE: For some reason, NetBSD 2.0 doesn't work with X out-of-the-box on pmax. It seems that this has to do with a switch to WSCONS. For now, if you want X, then try NetBSD 1.6.2.

If you want to run without the X framebuffer, use this instead:

	$ ./mips64emul -E dec -e 3max -b -d netbsddisk.img

NetBSD/pmax seems to work fine with dynamic binary translation (enabled by the -b command line option) in R3000 mode. NetBSD also supports R4000-like CPUs on pmax, but the bintrans support for R4000 in the emulator is less stable than for R3000.


How to install NetBSD/arc in the emulator:

It is possible to run NetBSD/arc on an emulated Acer PICA-61 in the emulator.

To install NetBSD/arc from a CDROM image onto an emulated harddisk image, follow these instructions:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Create an empty harddisk image, which will be the root disk that NetBSD installs itself onto:
    	$ dd if=/dev/zero of=nbsd_arc.img bs=1024 count=1 seek=900000
    
    
  3. Download a NetBSD/arc CDROM image from ftp:
    	ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/arccd.iso
    
    
  4. Download a NetBSD/arc installation (ramdisk) kernel, and gunzip it:
    	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd.RAMDISK.gz
    
    
  5. Start the emulator using this command line:
    	$ ./mips64emul -E arc -e pica -b -d nbsd_arc.img -d arccd.iso netbsd.RAMDISK
    
    
  6. From now on, you have to use your imagination, as there is no automatic installation program for NetBSD/arc. Here are some tips and hints on how you can proceed with the install:
    	$ mount /dev/cd0a /mnt2
    	$ disklabel -i -I sd0    (for example 'a', '4.2BSD', '1c',
    	    '700M', 'b', 'swap', '701M', '$', 'P', 'W', 'y', and 'Q')
    	$ newfs /dev/sd0a
    	$ mount /dev/sd0a /mnt
    	$ cd /mnt
    	$ for a in /mnt2/arc/binary/sets/*.tgz; do tar xvzpf $a; done
    	$ cd dev; sh MAKEDEV all
    	$ cd ../etc; echo "rc_configured=YES" >> rc.conf
    	$ cat > /mnt/etc/fstab
    	    /dev/sd0a / ffs rw 1 1
    	    /dev/sd0b none swap sw 0 0
    	    (ctrl-d)
    	$ cd /; umount /mnt; umount /mnt2
    	$ halt
    
    
  7. Download a generic NetBSD/arc kernel, and gunzip it:
    	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz
    
    

You can now use the generic NetBSD/arc kernel to boot from the harddisk image, using the following command:

	$ ./mips64emul -E arc -e pica -b -d nbsd_arc.img netbsd-GENERIC

Using -b (enabling dynamic binary translation), as in the instructions above, is not 100% stable. If you experiment weird crashes, try removing that option and try again.


How to install OpenBSD/pmax in the emulator:

Installing OpenBSD/pmax is a bit harder than installing NetBSD/pmax. You should first read the section above on how to install NetBSD/pmax, before continuing here. If you have never installed OpenBSD on any architecture, then you need a great deal of patience to do this. If, on the other hand you are used to installing OpenBSD, then this should be no problem for you.

OpenBSD/pmax died at release 2.8 of OpenBSD, so you should be aware of the fact that this will not give you an up-to-date OpenBSD system. The files are available at this URL:

	ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/

Following these instructions might work. If not, then use common sense and imagination to modify them as you see fit.

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Create an empty harddisk image, which will be the root disk that OpenBSD installs itself onto:
    	$ dd if=/dev/zero of=openbsddisk.img bs=1 count=512 seek=900000000
    
    
  3. Download the entire pmax directory from the ftp server: (approx. 99 MB)
    	$ wget -r ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/
    
    
  4. Execute the following commands:
    	$ mv ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/simpleroot28.fs.gz .
    	$ gunzip simpleroot28.fs.gz
    	$ chmod +w simpleroot28.fs		<--- make sure
    
    
  5. You now need to make an ISO image of the entire directory you downloaded. I recommend using mkisofs for that purpose. If you don't already have mkisofs installed on your system, you need to install that in order to do this.
    	$ mkisofs -o openbsd_pmax_2.8.iso ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax
    
    
  6. Start the emulator with all three (!) disk images:
    	$ ./mips64emul -E dec -e 3max -b -d openbsddisk.img -d b:simpleroot28.fs -j bsd -d c:openbsd_pmax_2.8.iso
    
    
    (If you add -X, you will run with the graphical framebuffer. This is REALLY slow because the console has to scroll a lot during the install. I don't recommend it.)

  7. Go on with the installation as you would do if you were installing on a real machine. If you are not used to the OpenBSD installer, then this will most likely be a very uncomfortable experience. Some important things to keep in mind are:

  8. For some unknown reason, the install script does not set the root password! The first time you boot up OpenBSD after the install, you need to go into single user mode and run passwd root to set the root password, or you will not be able to log in at all!
    	$ ./mips64emul -E dec -e 3max -b -d openbsddisk.img -d 2c:openbsd_pmax_2.8.iso -j bsd -o '-s'
    
    While you are at it, you might want to extract the X11 install sets as well, as the installer seems to ignore them too. (Perhaps due to a bug in the installer, perhaps because of the way I used mkisofs.)

    Execute the following commands in the emulator:

    	# fsck /dev/rz0a
    	# mount /
    	# passwd root
    
    	# cd /
    	# mount -t cd9660 /dev/rz2c /mnt
    	# sh
    	# for a in /mnt/[xX]*; do tar zxvf $a; done
    	# ln -s /usr/X11R6/bin/Xcfbpmax /usr/X11R6/bin/X
    	# ln -s /dev/fb0 /dev/mouse
    	# echo /usr/X11R6/lib >> /etc/ld.so.conf
    	# ldconfig
    
    	# sync
    	# halt
    

NOTE: It is also possible to install via ftp instead of using a CDROM image. This is not much less awkward, you still need the simpleroot filesystem image, and you still have to manually add the X11 install sets and set the root password, and so on.

Once you have completed the installation procedure, the following command will let you boot from the new rootdisk image:

	$ ./mips64emul -E dec -e 3max -b -X -M64 -o '-aN' -d openbsddisk.img -j bsd

OpenBSD/pmax seems to work fine with dynamic binary translation (enabled by the -b command line option).

(Normally, you would be asked about which root device to use (rz0), but using -o '-aN' supresses that.)

When asked for which terminal type to use, when logging in as root, enter rcons if you are using the graphical framebuffer, vt100 for text-mode.
Use startx to start X windows.


How to install OpenBSD/arc in the emulator:

It is possible to run OpenBSD/arc on an emulated Acer PICA-61 in the emulator.

(You should be aware of the fact that OpenBSD for the ARC platform died at release 2.3, so this will not give you an up-to-date OpenBSD system. See http://www.openbsd.org/arc.html for more information.)

To install OpenBSD/arc onto an emulated harddisk image, follow these instructions:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Create an empty harddisk image, which will be the root disk that OpenBSD installs itself onto:
    	$ dd if=/dev/zero of=obsd_arc.img bs=1024 count=1 seek=700000
    
    
  3. Download the entire arc directory from the ftp server: (approx. 75 MB)
    	$ wget -np -l 0 -r ftp://ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/
    
    
  4. You now need to make an ISO image of the entire directory you downloaded. I recommend using mkisofs for that purpose. If you don't already have mkisofs installed on your system, you need to install that in order to do this.
    	$ mkisofs -o openbsd_arc_2.3.iso ftp.se.openbsd.org/pub/OpenBSD/
    
    
  5. Start the emulator using this command line:
    	$ ./mips64emul -X -b -E arc -e pica -d obsd_arc.img -d openbsd_arc_2.3.iso \
    	    ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/bsd.rd.elf
    
    
    and proceed like you would do if you were installing OpenBSD on a real Acer PICA-61. (Answer 'no' when asked if you want to configure networking, and then install from CD-ROM.)

Once the install has finished, the following command should let you boot from the harddisk image:

	$ ./mips64emul -X -b -E arc -e pica -d obsd_arc.img ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/bsd

(The -b command line option enables dynamic binary translation, which isn't always 100% stable, so if things seem buggy you might want to try to remove that from the command line.)


How to install Ultrix/RISC in the emulator:

The following instructions should guide you through an install of Ultrix onto a disk image:
  1. Compile mips64emul:
            $ ./configure; make
       
    
  2. Create an empty harddisk image, which will be the root disk that Ultrix installs itself onto:
            $ dd if=/dev/zero of=rootdisk.img bs=1024 count=1 seek=800000
    
    
  3. Place your Ultrix installation media in your CDROM drive. (I'm assuming it is called /dev/cd0c here, replace that with the name of your CDROM drive, or the name of a .iso image file.) Then, start the emulator like this:
            $ ./mips64emul -X -b -M64 -E dec -e 3max -d rootdisk.img -d bc:/dev/cd0c -j vmunix
    
    
    Once the first stage of the installation is done (restoring the root filesystem), you need to restart the emulator, booting from the new rootdisk, to continue the installation process. This is done by removing the bootflag ('b') from the second diskimage argument:
            $ ./mips64emul -X -b -M64 -E dec -e 3max -d rootdisk.img -d c:/dev/cd0c -j vmunix
    
    

When the installation is completed, the following command should start Ultrix from the harddisk image:

        $ ./mips64emul -X -b -M64 -E dec -e 3max -j vmunix -d rootdisk.img

Ultrix mostly seems to work with dynamic binary translation (enabled by the -b command line option). If you have a very fast host machine, and use bintrans, you might experience a weird timer related bug, which makes it impossible to logon to the system. It is triggered when the emulation goes faster than any real DECstation machine was capable of running. A temporary workaround is to add -I33000000 to fix the emulated clock speed to 33 million instructions per emulated second. (When using -CR4400, -I16000000 should be used instead.)

You can experiment with adding -Z2 (for emulating a dual-headed workstation) or even -Z3 (tripple-headed), and also the -Y2 option for scaling down the framebuffer windows by a factor 2x2. There is also a -z option for supplying names of X11 displays to use. The following example starts Ultrix on an emulated tripple-headed workstation, on three different displays (remote1:0.0, localhost:0.0, and remote2:0.0), using no scaledown:

        $ ./mips64emul -M64 -bN -E dec -e 3max -jgenvmunix -d rootdisk.img \
            -XZ3 -z remote1:0.0 -z localhost -z remote2:0.0

The X11 displays may differ in bit depth and endianness. Unfortunately, there is no way yet to set the scaledown factor on a per-window basis, so the scaledown factor affects all windows.

(If you didn't use -Zn during the installation, and compiled your own /vmunix, then it will not contain support for multiple graphics cards. To overcome this problem, use the generic kernel, -j genvmunix, whenever you are running the emulator with a different setup than the one you used when Ultrix was installed.)

A note for the historically interested out there: OSF/1 for MIPS is quite similar to Ultrix, so that is possible to run as well. If you are unsuccessful in installing Ultrix or OSF/1 directly in the emulator, you can always install it on your real machine onto a real SCSI disk, and then copy the contents of that SCSI disk into a file (using dd(1)), and use that file as a disk image file in the emulator.


How to run Sprite for DECstation in the emulator:

Sprite was a research operating system at the University of Berkeley. The Unix Heritage Society (TUHS, www.tuhs.org) has made available a copy of a Sprite harddisk image for a DECstation 5000/200. If you want to find out more about Sprite in general, read http://www.cs.berkeley.edu/projects/sprite/retrospective.html.

The following instructions should let you run Sprite in the emulator:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Download the Sprite harddisk image using ftp or http:
    	http://www.es.embnet.org/Services/ftp/misc/TUHS/sprite/ds5000.bt
    	or ftp://ftp.es.embnet.org/misc/TUHS/sprite/ds5000.bt
    	83973120 bytes, MD5 = ec84eeeb20fe77b758370d5e312e4a5e
    
    
  3. Start the emulator with the following command line:
    	$ ./mips64emul -X -b -E dec -e 3max -M128 -d ds5000.bt -j vmsprite -o ''
    
    

The first time you boot up with the disk image, you will be asked a number of questions regarding network settings. If you feel like entering correct values, then you should use the following:

    Your machine's Ethernet address:    10:20:30:40:50:60
    Your machine's IP:                  10.0.0.1
    Subnet mask:                        0xff000000
    Gateway's Ethernet address:         60:50:40:30:20:10
    Gateway's IP:                       10.0.0.254

Unfortunately, at the end of http://www.es.embnet.org/Services/ftp/misc/TUHS/sprite/boot.txt, the following sad statement can be found:

    The bootable Sprite image is meant to be a demonstration of Sprite, not
    a robust Sprite system.  There are several missing things, such as 
    floating point and network support.

Once you are logged in as root, running xinit will start the X11 environment.

Sprite works fine with dynamic binary translation (enabled by adding -b to the command line options).


How to install Debian GNU/Linux for DECstation in the emulator:

NOTE: This is experimental, and extremely unstable. During my tests, even pressing the wrong key during the install (for example the wrong cursor key) can cause a kernel Oops. I think this has to do with interrupts from the serial controller. Hopefully using the -U command line option will reduce the risk for such crashes. (I haven't had time to come up with a clean solution to this yet; it feels like a buffer overflow in Linux' serial driver for the 5000/200, but it is also likely that it is a bug in mips64emul.)

The following steps should let you install Debian GNU/Linux for DECstation onto a harddisk image:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Create an empty harddisk image, which will be the root disk that Debian installs itself onto:
    	$ dd if=/dev/zero of=debian.img bs=1024 count=1 seek=2000000
    
    
  3. Download an install kernel:
    	http://http.us.debian.org/debian/dists/testing/main/
    	    installer-mipsel/current/images/r3k-kn02/boot.img
    	or
    	http://http.us.debian.org/debian/dists/unstable/main/
    	    installer-mipsel/current/images/r3k-kn02/boot.img
    
    
    depending on whether you want to install Debian "Testing" or "Unstable".

  4. For a text-mode installation, start the emulator like this:
    	$ ./mips64emul -E dec -e 3max -b -U -M64 -o 'console=ttyS3' -d debian.img -O boot.img
    
    

Debian GNU/Linux on DECstation works reasonably fine with dynamic binary translation, enabled by the -b command line option. (Without this option, the emulator might be less buggy, but also too slow to be useful when running Linux as a guest OS.)

(If you want to, you can try -X instead of -o 'console=ttyS3' on the command line. This will cause Linux to use the graphical framebuffer. Unfortunately, Linux does not seem to have a driver for the DZ11 keyboard controller yet, so you cannot interact with the system. You will see the penguin in the upper lefthand corner while booting, and nicely rendered Unicode characters, but that's about it.)

You need to enter some values during the installation procedure, for example network settings. The following should work:

    DHCP:                       No, choose "Configure network manually"
    IP address:                 10.0.0.1
    Netmask:                    255.0.0.0
    Gateway:                    10.0.0.254
    Name server addresses:      10.0.0.254

Once the first phase of the install has finished, the following command should let you boot into Debian, and perform post-install configuration:

	$ ./mips64emul -E dec -e 3max -U -b -M64 -o 'console=ttyS3' -d debian.img

It seems that there's a problem with getting a login prompt on serial console (at least when I've done test installs), so when the installation is finished and you're supposed to get a login prompt, you need to press CTRL-C and type quit, and then:

  1. Download a normal kernel (not a RAMDISK one).
    	http://http.us.debian.org/debian/dists/testing/main/
    	 installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02
    
    
  2. Boot Debian using the following command line:
    	$ ./mips64emul -E dec -e 3max -U -b -M64 -o \
    	    'console=ttyS3 root=/dev/sda1 rw init=/bin/sh' \
    	    -d debian.img vmlinux-2.4.27-r3k-kn02
    
    
    You'll enter single-user mode. You need to add a line to /etc/inittab, to enable logins via serial console.
    	sh-2.05b# echo 'T3:23:respawn:/sbin/getty -L ttyS3 9600 vt100' >> /etc/inittab
    	sh-2.05b# echo 'ttyS3' >> /etc/securetty
    	sh-2.05b# sync; umount /
    

The system should now be ready for everyday use.

Use this command to boot from the completely installed disk image:

	$ ./mips64emul -E dec -e 3max -U -b -M64 -o 'console=ttyS3' -d debian.img

UPDATE 2005-01-19:  Kaj-Michael Lang noticed that the current CVS-version of linux-mips has support for keyboards now, on DECstation 5000/200, so it is possible to run Debian GNU/Linux with framebuffer/keyboard. (Add -X (or -XY2) and remove the console=ttyS3 option.) He has made a kernel available here: http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation It has other problems (ethernet doesn't seem to work, for example), but at least it doesn't Oops that often. ]


How to run Redhat Linux for DECstation in the emulator

NOTE: This is experimental, and extremely unstable. Read the note about '-U' in the section on how to install Debian.

The following steps should let you run Redhat Linux for DECstation in mips64emul:

  1. Compile mips64emul:
    	$ ./configure; make
    
    
  2. Download a kernel. This is a Debian kernel, but it works fine:
    	http://http.us.debian.org/debian/dists/testing/main/
    	 installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02
    
    
  3. Download a root filesystem tree:
    	ftp://ftp.uni-wuppertal.de/pub/linux/mips/
    	 mipsel-linux/root/mipsel-root-20011216.tgz
    	19486676 bytes, md5 = 5bcb725c90209479cd7ead8ad0c4a414
    
    
  4. This is the tricky part: Create an ext2 filesystem image called redhat.img using the filesystem tree you just downloaded. The disk image should have a MS-DOS partition table (!), and then one or more ext2 partitions. (Use loopback mount, or similar. This is probably easiest to do on a Linux host.) However, in order to actually boot the system you need to modify /etc/fstab. Change
    	/dev/root               /               nfs     defaults        1 1
    	#/dev/sdc1              /               ext2    defaults        1 1
    	none                    /proc           proc    defaults        0 0
    	none                    /dev/pts        devpts  mode=0622       0 0
    
    
    to
    	#/dev/root              /               nfs     defaults        1 1
    	/dev/sda1               /               ext2    defaults        1 1
    	none                    /proc           proc    defaults        0 0
    	none                    /dev/pts        devpts  mode=0622       0 0
    
    
    (Note sda1 instead of sdc1.)

  5. To boot Linux, start the emulator like this:
    	$ ./mips64emul -E dec -e 3max -U -b -M128 -o \
    	    "console=ttyS3 root=/dev/sda1 ro" -d redhat.img vmlinux-2.4.27-r3k-kn02
    
    

If you need to boot into single user mode, try the following:

	$ ./mips64emul -E dec -e 3max -U -b -o "console=ttyS3 root=/dev/sda1 rw init=/bin/sh" \
	    -d redhat.img vmlinux-2.4.27-r3k-kn02

Redhat Linux on DECstation in R3000 mode should work fine with dynamic binary translation (enabled by the -b command line option).

NOTE: You can add -X and remove console=ttyS3 from the command line, if you want to use a graphical framebuffer. Unfortunately, Linux doesn't have support for keyboards on DECstation 5000/200 yet, so you cannot actually interact with the sytem. :-(

UPDATE 2005-01-22:  Read the 2005-01-19 update in the Debian section above, and then, if you do not need ethernet support, try Kaj-Michael Lang's kernel compiled from linux-mips' CVS. http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation It should work with framebuffer/keyboard. ]


How to run Mach/PMAX in the emulator:

Read the following link if you want to know more about Mach in general: http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html

NOTE: Mach for DECstation requires some files (called 'startup' and 'emulator') which I haven't been able to find on the web. Without these, Mach will not get very far. These installation instructions are preliminary.

The following steps should let you experiment with running Mach for DECstation in the emulator:

  1. Compile mips64emul: (NOTE: --enable-caches)
    	$ ./configure --enable-caches; make
    
    
  2. Download the pmax binary distribution for Mach 3.0:
            http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z
    	7263343 bytes, md5 = f9d76c240a6e169921a1df99ad560cc0
    
    
  3. Extract the Mach kernel:
            $ tar xfvz pmax.tar.Z pmax_mach/special/mach.boot.MK83.STD+ANY
    
    
  4. Create an empty disk image:
    	$ dd if=/dev/zero of=disk.img bs=1 count=512 seek=400000000
    
    
  5. Load the contents of pmax.tar.Z onto the disk image. This is complicated, and should be described in more detail some time. For now, use your imagination. (For example using OpenBSD/pmax: disklabel -E rz1; newfs -O /dev/rz1a; mount /dev/rz1a /mnt; cd /mnt; download pmax.tar.Z using ftp; tar xzvf pmax.tar.Z; mv pmax_mach/* .; rmdir pmax_mach; mkdir mach_servers; cd mach_servers; cp ../etc/mach_init .; cp ../tests/test_service startup; dd if=/dev/zero of=paging_file bs=65536 count=400; cd /; sync; umount /mnt)

  6. Start the emulator with the following command:
    	$ ./mips64emul -E dec -e 3max -X -d disk.img \
    	    pmax_mach/special/mach.boot.MK83.STD+ANY