# GXemul: IBM 6050/6070 PReP emulation

Back to the index.

This emulation mode attempts to emulate an IBM 6050/6070, which was a PowerPC Reference Platform machine (a.k.a. PReP).

### NetBSD/prep:

It is possible to install and run NetBSD/prep 2.1 in GXemul on an emulated IBM 6050 (PowerPC) machine. (Newer versions of NetBSD/prep use the wdc controller in a way which isn't implemented in GXemul yet, or there are bugs in GXemul's PowerPC CPU emulation.)

To install NetBSD/prep onto a disk image, follow these instructions:

1. Create an empty harddisk image, which will be the root disk that you will install NetBSD/prep onto:

           dd if=/dev/zero of=nbsd_prep.img bs=1024 count=1 seek=1000000

2. Download the NetBSD/prep 2.1 ISO image and the generic kernel:

           ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/prepcd.iso
           ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/prep/binary/kernel/netbsd-GENERIC.gz

3. Start the installation like this:

           gxemul -X -e ibm6050 -d nbsd_prep.img -d rdb:prepcd.iso -j prep/binary/kernel/netbsd-INSTALL.gz

4. Installation is a bit unsmooth, possibly due to bugs in GXemul, possibly due to bugs in NetBSD itself; others have been having problems on real hardware: http://mail-index.NetBSD.org/port-prep/2005/11/25/0004.html. Creating an MBR slice and a disklabel with sysinst bugs out, so some things have to be done manually:

   At "`(I)nstall, (S)hell, or (H)alt`", choose `s`.
   `# fdisk -u wd0`
   `Do you want to change our idea of what BIOS thinks? [n]` (just press ENTER)
   `Which partition do you want to change?: [none] 0`
   `sysid: ...` (just press ENTER)
   `start: ... 1cyl`
   `size: ...` (just press ENTER)
   `Which partition do you want to change?: [none]` (press ENTER)
   `Should we write new partition table? [n] y`
   `# disklabel -I -i wd0`
   `partition> a`
   `Filesystem type [?] [unused]: 4.2BSD`
   `Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 1c`
   `Partition size ('$' for all remaining) [0c, 0s, 0M]: 900M`
   `partition> b`
   `Filesystem type [?] [unused]: swap`
   `Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: a`
   `Partition size ('$' for all remaining) [0c, 0s, 0M]: $`
   `partition> W`
   `Label disk [n]? y`
   `partition> Q`
   `# newfs wd0a`
   `# sysinst`
   Choose to install onto wd0. Choose "`a: Edit the MBR partition table`" when presented with that option.
   Choose the 'a' partition/slice, set the 'e' ("active") and 'f' ("install") fields to Yes, and then choose "`x: Partition table OK`".
   Choose "`b: Use existing partition sizes`" in the next menu.
   Select partition 'a' and press ENTER. Set field 'k' (mount point) to '`/`'.
   Get out of the partitioner by selecting "`x: Partition sizes ok`" twice.
   At "`Write outside MBR partition? [n]:`", just press ENTER.
   Install from CD-ROM, device wd1c.

If everything worked, NetBSD should now be installed on the disk image. Use the following command line to boot the emulated machine:

    	gxemul -X -e ibm6050 -d nbsd_prep.img netbsd-GENERIC.gz

When asked which the root device is, type `wd0` and just press ENTER to select the default values for dump device, file system type, and init path.