# GXemul: Landisk emulation

Back to the index.

The Landisk I-O DATA USL-5P emulation mode is working well enough to run NetBSD/landisk and OpenBSD/landisk.

Ethernet is not emulated yet for this machine type. If you want to transfer files to/from the emulated landisk machine, see this chapter in the documentation.

### NetBSD/landisk:

NetBSD/landisk can run in GXemul.

The NetBSD/landisk distribution does not include any INSTALL kernel, so it must be installed using another (emulated) machine.

The following instructions will let you install NetBSD/landisk onto a disk image, using an emulated CATS machine:

1. Download a NetBSD/cats install kernel:

       	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-4.0.1/cats/binary/kernel/netbsd.aout-INSTALL.gz

2. Create an empty harddisk image, which will be the disk image that you will install NetBSD/landisk onto:

       	dd if=/dev/zero of=nbsd_landisk.img bs=1024 count=1 seek=900000

3. Download NetBSD/landisk and make an iso image of it:

       	wget -np -l 0 -r ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.1/landisk
       	cp ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.1/landisk/binary/kernel/netbsd-GENERIC.gz .
       	mkisofs -U -o landisk.iso ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.1

4. Start the emulated CATS machine like this:

       	gxemul -XEcats -d nbsd_landisk.img -d landisk.iso netbsd.aout-INSTALL.gz

5. Exit the installer, then execute the following commands:

   `` |
       disklabel -i -I wd0    (for example 'a', '4.2BSD', '1c',
           '700M', 'b', 'swap', '701M', '$', 'P', 'W', 'y', and 'Q')
       newfs /dev/wd0a
       mount /dev/cd0c /mnt
       mkdir /mnt2; mount /dev/wd0a /mnt2
       cd /mnt2; sh
       ls -R /mnt
       for a in /mnt/*/binary/sets/[bcekmt]*.tgz; do ls -R /mnt > /dev/null; echo $a; tar zxfp $a; done
       exit
       cd dev; sh ./MAKEDEV all; cd ../etc
       echo rc_configured=YES >> rc.conf
       echo "/dev/wd0a / ffs rw 1 1" > fstab
       echo "/dev/wd0b none swap sw 0 0" >> fstab
       cd /; umount /mnt; umount /mnt2; halt

NOTE: For some reason, reading the iso image created by mkisofs does not work as expected. The "ls -R /mnt" commands included above seem to make it work. (Yes, this is a serious bug, but I am not sure how to diagnose it.)

You should now be able to boot NetBSD/landisk using this command:

    	gxemul -x -E landisk -d nbsd_landisk.img netbsd-GENERIC.gz

### OpenBSD/landisk:

It is possible to install and run OpenBSD/landisk 6.3 in GXemul.

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

1. Create an empty harddisk image, which will be the root disk that OpenBSD installs itself onto:

       	dd if=/dev/zero of=obsd_landisk.img bs=1024 count=1 seek=3500000

2. Download the Landisk RAMDISK kernel, the regular kernel, and the files needed to produce a working .iso from the ftp server, and create the .iso using the `mkisofs` tool (may be part of the cdrtools package):

       	wget http://ftp.openbsd.org/pub/OpenBSD/6.3/landisk/base63.tgz http://ftp.openbsd.org/pub/OpenBSD/6.3/landisk/comp63.tgz http://ftp.openbsd.org/pub/OpenBSD/6.3/landisk/man63.tgz http://ftp.openbsd.org/pub/OpenBSD/6.3/landisk/bsd http://ftp.openbsd.org/pub/OpenBSD/6.3/landisk/bsd.rd
       	mkisofs -J -o openbsd_landisk.iso base63.tgz comp63.tgz man63.tgz

   (The installer will complain about missing INSTALL.landisk and SHA256.sig files, but it seems to work anyway.)

3. Start the emulator using this command line (note the `d:` prefix):

       	gxemul -E landisk -d obsd_landisk.img -d d:openbsd_landisk.iso bsd.rd

   and proceed like you would do if you were installing OpenBSD on a real landisk. The following hints are useful to get you through the installation:

   - Terminal type = xterm
   - Do not configure the network. (The Realtek NIC found in the Landisk machine is not implemented yet in the emulator.)
   - root disk = wd0 (the disk to install onto), use the whole disk for OpenBSD
   - Accept the auto-layout (one big root partition (a) and a small swap partition (b). c is the entire disk).
   - Location of sets = disk, is the disk partition already mounted = no, disk containing the install media = wd1
   - Pathname to the sets = /

   Ignore the warning about missing 'bsd' file by the installer, we are supplying the bsd kernel file directly on the GXemul command line.

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

    	gxemul -E landisk -d obsd_landisk.img bsd

Note: Generating ssh keys on the first bootup is extremely time consuming.