While when I doing the “2008 plan” I found there’s something I didn’t finished last year. Among them is learning the Minix code. I’ve read all the principle chapters, and left reading the source code behind and never finished that. So to make a good start for this year, I decide to make a test qemu machine yesterday.
There are two good articles about install Minix : How to Get and Install Minix 2.0.4 and Install Minix on Qemu. There are also a Qemu image to download on the net. However they are all about Minix 2.0.4, the latest of the 2.x series. However as I’m reading the book, I prefer to use the same version the book is using, so I won’t get line number mismatch or something like that. And after I read the changelog of 2.0.4 and found out the change is pretty big, I decide to install it my own, using the version come with my book.
It turns out to be not that hard, just a few points:
First, we could make the install image by
and then start with
or we could start qemu with
and then supply “/dev/fd1″ when the setup script asks for the USR
Second, as I’m installing it on a virtual machine I want Minix to take all the disk. But don’t know why it won’t take /dev/hd1 and complains /dev/hd1c. And the “parts” program give me two partitions although I made one. I guess this might be a bug in the “parts” program, but
anyway, if I install Minix on the 2nd partition it made, it works for me.
Third, and this is really a touth one. I made the floppy images as in the two articles above, using the dd(1) command. However on the last floppy of SYS.TAZ and USR.TAZ, there is a complain from tar “header checksum error”. I tried both the files on my CDROM and the CD-ROM-2.0 version downloaded from the official Minix website, both got the same problem. (Well the two sources have the same file size and md5 checksum so this is expected). Those two files can be un-tar-ed on my FreeBSD box without error, though. Finially I found “talkd.h” is missing on the installed Minix OS and I typed that file in manually. It looks it’s the only file missed because “make world” works fine after that. And even there are something missed in “USR.TAZ”, my “make world” should have fixed that.
So I decide to put my fresh virtual box online, in case it could save some time for other people reading the book. I didn’t touche anything in it, except set the hostname to “minix.dryice.name”. It’s in Qemu “raw” format, which should be easily used by other virtual machine software. The disk is 300M which should be enough for testing and learning, while the download is about 10M, zipped.