MINIX 2.0.0: set up SYS.TAZ and CMD.TAZ

Boot up MINIX 2.0.0 and configure BIOS monitor (hd=bios). Log in as root and type df for disk usage. You will notice / is not very big and /usr has the majority space. So I put the stuff from CMD.TAZ and SYS.TAZ into directories in /usr.

In MINIX,

# mkdir /usr/cmd
# setup /usr/cmd

In xterm, do the dd thing and carve up CMD.TAZ into CMD.01, CMD.02, etc. I only needed up to three. (SYS.TAZ may be only two pieces.) Then cat as file 1.44 and press Return. Repeat as you did to set up USR.TAZ.

After CMD.TAZ and SYS.TAZ are installed, read a man page:

# man -M /usr/sys/man sh

So we’ll have MINIX 2.0.0 soon

To finish our MINIX 2.0.0 installation, we will boot from c: and carve up USR.TAZ, CMD.TAZ, and SYS.TAZ into virtual diskettes. The Bochs INSTALL.386 instructions pre-req files that don’t exist in CD-ROM-2.0; i.e. USR.01, USR.02, and so on. We create them.

First, edit .bochsrc to boot from c: instead of a:. Comment out the boot a: line and uncomment the boot c: line.

Start up bochs with ./bochs. Press Escape and specify hd=bios! Log in as root. If you set up MINIX 2.0.0 correctly, the console message should mention something like “type setup /usr” instead of the usual “type setup.” Do this.

You will get a prompt for size. Type 1440. Press Enter (Return) for [0] floppy drive. Now you should get a prompt to insert disk 1.

Switch to a free xterm and do the following:

# cp /path/to/CD-ROM-2.0/MINIX/I386/USR.TAZ /my/work/dir
# cd /my/work/dir
# dd if=USR.TAZ of=USR.01 bs=1440k count=1 skip=0
# dd if=USR.TAZ of=USR.02 bs=1440k count=1 skip=1
...
# dd if=USR.TAZ of=USR.25 bs=1440k count=1 skip=24

I didn’t need to go farther than the third file, or USR.03. Note the byte sizes that dd outputs. The first two are 1474560 bytes and the third is 776267 bytes. The fourth is 0 bytes, so you only need USR.01, USR.02 and USR.03.

The INSTALL.386 instructions say to concatenate the files as pairs, but you can get away with doing it one at a time:

# cat USR.01 > /path/to/1.44

Switch to bochs emulator and press Enter. Installation should proceed until you are asked to insert the next disk. Then

# cat USR.02 > /path/to/1.44

And press Enter. This should continue until you get a hash prompt, hopefully with no error messages. If you get a “header checksum error,” check your steps.

  • You are not concatenating multiple files.
  • You do not have to write a novel header file.
  • Don’t click into the bochs emulator screen; that will cause it to exit. LOL Only click the title bar.
  • Type halt to shutdown MINIX before closing bochs.

You’re pretty much done. Next is to set up the CMD and SYS sources, which will use the same techniques outlined here. I like completeness and I want my manual pages.

MINIX 2.0.0 guest with bochs on OpenBSD

MINIX 2.0.0 will be booted from a concatenated file that we create; a second file will serve as our virtual hard drive. The rest of the installation will be covered in a second post, so there’s still a chance this all may be futile. But, let us proceed. Go to minix3.org and download CD-ROM-2.0.tar.gz. I used lynx because I did not want to use Firefox as root, and I hadn’t set up an unprivileged user yet. After downloading, run the following commands:

# cd /path/to/downloads
# tar xzvf CD-ROM-2.0.tar.gz
# mkdir bochs-src
# cd bochs-src
# zcat ../CD-ROM-2.0/BOCHS/BOCHS.TAZ | tar xvf -
# cd bochs-960913
# ./configure --enable-80386 --enable-memory=8 --enable-dma-floppy-io
# make

A binary called bochs should have been created among the .o files and such. We will now set up the virtual hard drive and hercules font. The font is mandatory.

# dd if=/dev/zero of=30M.minix bs=512 count=62730
# cp font/hercules.bdf /usr/X11R6/lib/X11/fonts/misc
# mkfontdir /usr/X11R6/lib/X11/fonts/misc
# xset fp rehash
# chmod 0644 /usr/X11R6/lib/X11/fonts/misc/hercules.bdf

ls -l will list the file permissions of the fonts; hercules.bdf comes to us rw——-, while all our system fonts are rw-r–r–. This fixes a font error later on. Now we will create the boot file, which is a concatenated file, which bochs will boot.

# pwd
# cd /back/to/CDROM-2.0/MINIX/I386
# cat ROOT USR > /somewhere/nearby/1.44

Edit .bochsrc to boot from a:. The easiest way to do this is to comment out the boot from c and add the booting from a, following the conventions in the file. Also make sure floppya: 1_44= and diskc: file= point to the 1.44 file and 30M.minix file, respectively.

# cd /back/to/bochs-960913
# vi .bochsrc

After editing .bochsrc, try ./bochs. Hopefully the emulator will boot. Follow instructions in INSTALL.I386. Some pointers:

  • Do not forget to go into BIOS monitor before typing setup! (Press ESC.)
  • /dev/hd0 is your desired device; if you crash, make sure you went into BIOS monitor.
  • You only want one MINIX partition. The default will show two. Change the second to None.
  • Follow the instructions carefully. If you crash, it’s okay to try again.
  • If bochs opens and then closes quickly, check .bochsrc: you want to boot from a:.
  • If you get io errors in bochs.out, make sure you put hd=bios in boot monitor.

The next post should look at installing MINIX 2.0.0 and the disk sets.

OpenBSD 5.5 on VirtualBox with AMD A6

(I’ve got Windows 8.1.) Here’s the settings I used:

  • version: OpenBSD 64-bit
  • Enable I/O APIC
  • Extended Features: Enable PAE/NX
  • Processor(s): 1 CPU
  • Hardware Virtualization: Enable VT-x/AMD-v
  • Uncheck Nested Paging
  • install55.iso file
  • BIOS: disable secure boot

Probably a lot of these settings are unnecessary if you pick the right version of OpenBSD to start. I wanted 32-bit to stick to the single-threaded kernel, but whatever.

OpenBSD 5.5 on VirtualBox with AMD C60

It’s a netbook CPU, so cue the heatsink fans. I used VirtualBox x64. For settings, I just had to uncheck “Enable I/O APIC”; the rest was left as default. The file I used was install55.iso from the OpenBSD website.

Installation was successful. After reboot, I typed “help” at the boot loader prompt to pause the process and shutdown the machine via Machine -> Close and “Power off the machine.”

I changed the boot order to hard drive before CD; this will boot your installed image rather than the install ISO. Network configuration worked and everything loaded pretty fast. X works, although exiting leaves the console background red. Hopefully, it is just cosmetic.

Now I can read all those magnificent man pages. I must find a way to bootstrap out of here.