Xenix IBM PC v1.0 Exploration

From Toxi's Wiki
Jump to navigationJump to search

Setting up our VM

This specific version of Xenix is apparently only for the IBM PC AT, which uses a 80286. Let's first set up a VM for this, I'll be using 86Box.

I created a virtual machine with the following (stuff that I didn't mention were simply left blank):

Setting type Configuration
Machine
  • Machine: [80286] IBM AT
  • CPU type: Intel 80286, 8MHz
  • Memory: 640KB
  • FPU: 287
  • Time synchronization: Disabled
Display
  • Display: [ISA] MDA
Storage controllers
  • HD controller: [ISA16] PC/AT IDE Controller
  • FD controller: Internal controller
Hard disks
  • Hard drive: IDE (0:0) drive, 615 cylinders, 4 heads, 17 sectors (20MB), with speed [1989] 3500 RPM
Floppy disks
  • Floppy drive(s): One 5.25" 1.2MB drive at 300/360 RPM (A:), one 5.25" 360K drive (B:)

Using this configuration, try starting up the VM -- without any floppy disks in the drive, or anything like that. You might get a 161. It mentions to run SETUP.

How do you run SETUP, you may ask? IBM provided a diskette which would boot into special software that could configure your IBM AT. Luckily, people have archived this diskette -- it's available on WinWorld. Go ahead and download 2.07.

Then, insert the diskette. Simply continue where it said to run SETUP. It may ask you if you have finished connecting the battery. It'll throw a 0151. Press the Enter key a few times (there might be another way to bypass this error, but this is all I know). If you skip the time and date, it'll ask you to confirm -- press N and type the following:

For time, just use the current time.

For date, the current date, but replace the current year with 1985.

When it asks for a fixed disk, say that type 2 is installed -- if you used my 20MB disk configuration. This list is very useful for hard disk geometry when dealing with the IBM/PC AT.

That's all I have to say really -- SETUP is easy to follow along, so just follow along I guess. When it's done, remove the diskette.

Setting up Xenix

If you want to download this version, please check it out on WinWorld.

Now, back on topic. We'll install Xenix now.

First, insert the BOOT diskette. Then, type 'fd /etc/badtrack'. Once that is done, boot the Xenix kernel by entering 'fd /xenix.fd' (not /xenix, /xenix.fd)

Now, type 'xinstall base'. Insert the base floppies. This will install the base system. The script doesn't really check the product type, so you can use the same command but different floppies -- like you can use 'xinstall base' but insert the SDK floppies to install the SDK.

That's really about it when installing Xenix. Once the installation is done, you can remove the floppies and boot into the hard drive. However, the only available user is root. You can add one later, however.

Adding a user is simple. Once in the root account, just type 'mkuser' to create a user. Once you've logged into the user, you will get a welcome mail message. To read it, simply type 'mail'. To quit it, IIRC, you can type 'q'. Home directories are in the /usr folder. If you created a user by the name 'test', then it would be at /usr/test.

More information may be in the manuals, which are available at Bitsavers.

Developing software for Xenix and DOS

Compiling a small C application for Xenix, under Xenix

I created a file named 'hello.c' using the following command:

cat >> hello.c << EOF

This will output the contents of stdin into hello.c until you give it the literal string EOF.

And so, here is the source code of hello.c:

main() {
    printf("hello, world!\n");
}

Now, we compile it using

cc hello.c -o hello