# GXemul: Artesyn PM/PPC emulation

Back to the index.

NetBSD/pmppc can run in GXemul on an emulated Artesyn PM/PPC board. Currently, no SCSI or other disk controller is emulated for this machine type, but it is possible to run NetBSD with root-on-nfs.

### NetBSD/pmppc:

These setup steps will let you run NetBSD/pmppc with root-on-nfs:

1. First of all, the "`nfs server`" machine must be set up. This needs to have a 750 MB `/tftpboot` partition. Install NetBSD/pmax 3.1 from CDROM. (Don't forget to add the extra partition!)

2. Configure the nfs server machine to act as an nfs server. Start up the emulated DECstation:

       	gxemul -e 3max -d nbsd_pmax.img

   and enter the following commands as `root` inside the emulator:

   `` |
       echo hostname=server >> /etc/rc.conf
       echo ifconfig_le0=\"inet 10.0.0.2\" >> /etc/rc.conf
       echo nameserver 10.0.0.254 >> /etc/resolv.conf
       echo 10.0.0.254 > /etc/mygate
       echo /tftpboot -maproot=root 10.0.0.1 > /etc/exports
       echo rpcbind=YES >> /etc/rc.conf
       echo nfs_server=YES >> /etc/rc.conf
       echo mountd=YES >> /etc/rc.conf
       echo bootparamd=YES >> /etc/rc.conf
       printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" > /etc/bootparams
       echo "bootps dgram udp wait root /usr/sbin/bootpd bootpd -d 4 -h 10.0.0.2" >> /etc/inetd.conf
       cat >> /etc/bootptab
       client:\
               :ht=ether:\
               :ha=102030000010:\
               :sm=255.0.0.0:\
               :lg=10.0.0.254:\
               :ip=10.0.0.1:\
               :rp=/tftpboot:
       (press CTRL-D)
       echo "10:20:30:00:00:10 client" > /etc/ethers
       echo 10.0.0.1 client > /etc/hosts
       reboot

3. Download the NetBSD/pmppc CD-ROM iso image, and the GENERIC kernel:

       	ftp://ftp.netbsd.org/pub/NetBSD/iso/3.1/pmppccd-3.1.iso
       	ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.1/pmppc/binary/kernel/netbsd-PMPPC.gz

4. Start the DECstation emulation again:

       	gxemul -e 3max -d nbsd_pmax.img -d pmppccd-3.1.iso

   and extract the files from the PM/PPC CD-ROM image to the DECstation disk image:

   `` |
       cd /tftpboot; mount /dev/cd0a /mnt
       for a in /mnt/*/binary/sets/[bcemt]*; do echo $a; tar zxfp $a; done
       echo 10.0.0.2:/tftpboot / nfs rw 0 0 > /tftpboot/etc/fstab
       echo rc_configured=YES >> /tftpboot/etc/rc.conf
       echo 10.0.0.254 >> /tftpboot/etc/mygate
       echo nameserver 10.0.0.254 >> /tftpboot/etc/resolv.conf
       echo rc_configured=YES >> /tftpboot/etc/rc.conf
       dd if=/dev/zero of=swap bs=1024 count=65536
       cd /tftpboot/dev; sh MAKEDEV all
       cd /; umount /mnt; halt

5. Create a configuration file called `config_client`:

   `` |
       !  Configuration file for running NetBSD/pmppc diskless with
       !  a NetBSD/pmax machine as the nfs server.

       net(
       	add_remote("localhost:12444")   ! the server
       	local_port(12445)               ! the client
       )

       machine(
       	name("client machine")
       	serial_nr(1)

               type("pmppc")

               load("netbsd-PMPPC.gz")
       )

   ... and another configuration file for the server, `config_server`:

   `` |
       net(
       	local_port(12444)               ! the server
       	add_remote("localhost:12445")   ! the client
       )

       machine(
       	name("nfs server")
       	serial_nr(2)

               type("dec")
               subtype("5000/200")

               disk("nbsd_pmax.img")
       )

It should now be possible to boot NetBSD/pmppc using the NetBSD/pmax nfs server, using the following commands: (NOTE! Execute these two commands in separate xterms!)

    	gxemul @config_server
    	gxemul @config_client

You might want to log in as `root` on the server machine, and run `tcpdump -lnvv` or similar, to see that what the client machine actually does on the network.

When asked for "`root device:`" etc. on the client machine, enter the following values:

    	root device: tlp0
    	dump device: 				(leave blank)
    	file system (default generic): 		(leave blank)
    	..
    	init path (default /sbin/init):		(leave blank)