A Tale of Three DOS’s

This is a story of how I got into DOS. The story begins back in Summer 2009 when I first started playing with the DOS prompt in Windows. I actually preferred the Unix CLI because it was more rich in features, but the DOS prompt had its own charm to it. The font was aesthetically pleasing, and the format of the commands had a certain novelty to it (and I’m a sucker for novelty). I actually started playing with the DOS prompt in my Java class. It wasn’t my first experience with it, as we had written programs that ran in DOS in my C++ class the previous Fall. But it was my first time experimenting with the commands.

I was greatly intrigued by the DOS command line and wanted to learn more, and in early 2010 I started looking for a DOS emulator that I could run on my Mac. I found Boxer and then DOSBox, and soon I started playing a slew of MS-DOS games – Duke Nukem 3D, Kingdom of Kroz, Nethack, and Stargoose to name a few.

Eventually I wanted to try the real MS-DOS. I downloaded an archive for the MS-DOS 5.0 installers from vetusware.com, and also downloaded VirtualBox so I could run the DOS. I had to get help from the VirtualBox forums as to how to use the floppy disk images that came in the archive; they were in the .IMA format, which I was completely unfamiliar with. I thought I needed an ISO file, but it turned out I didn’t. I just inserted the floppy images into the virtual machine’s floppy drive.

Here ‘s a slideshow of the installation process for MS-DOS 5.0:

This slideshow requires JavaScript.

Of all the operating systems I’ve installed, I would say MS-DOS was probably the easiest.  It required very little configuration and I didn’t have to partition the drive beforehand.

In later versions of MS-DOS (including 5.0), the default configuration is for DOS to boot into a semi-graphical shell called DOS Shell, which can be activated manually with the dosshell command.

MS-DOS-Shell

The weird thing is, I had had a dream a few months earlier of using MS-DOS with a graphical interface.  This was exciting, because it was like my dream had become a reality.  Only in the dream, the DOS shell was all greyscale, so I set DOS Shell to black and white, 4-color to make it more like my dream.

I have a lot of dreams about old computers and old operating systems, and one of the recurring themes in my dreams is DOS.

If you’ve ever used both the DOS prompt and the real MS-DOS, you will know that MS-DOS is nothing like the DOS prompt in modern Windows.  It’s a whole lot more.  A list of some of the commands in MS-DOS:

backup and restore MS-DOS’s equivalent of the Backup and Restore Center
doskey A useful utility for things like command history, macros, etc.
qbasic A BASIC interpreter for MS-DOS
undelete Instant data recovery; undeletes a file that has been deleted

There are also some nifty programs and games written with QBASIC. Since they’re not in binary form, you can modify them yourself with the QBASIC editor. One that I started using was Microsoft Money Manager.

Money1

Money2

Money3

At this point I wanted to explore some of the other DOS’s out there.  I was very interested in DR-DOS and PC-DOS.  I had downloaded and used the default text editor for PC-DOS and found it to be a lot more full-featured than MS-DOS Editor.

The next DOS that I downloaded was DR-DOS.  Again, I downloaded it from Vetusware.  The installer came in the form of five floppy images with the extension .144, a rather obscure format and one that VirtualBox doesn’t recognize.  I was faced with the challenge of converting these images to a format recognized by VirtualBox.  To achieve that end, I wrote this shell script (thanks to the people in the VirtualBox community for supplying the dd command):


#!/bin/bash
# One-time script converts .144 floppy images
# to .IMA floppy images.

for (( i=1;i<=5;i++ ))
do
        touch disk0${i}.ima;
        dd if=disk0${i}.144 of=disk0${i}.ima bs=512 count=2880;
done

DR-DOS is somewhat harder to install than MS-DOS. It makes you partition the hard drive and select a partition before installing the OS, though much of this process is automated.

This slideshow requires JavaScript.

It took a couple of tries, but I eventually got it installed.  I found the OS to be rather delightful.  It has a few additional commands that MS-DOS 5.0 doesn’t have (I don’t know about 6.22).  For example, there is the stacker command, which activates the stacker driver, a disk compression utility.  I plan to explore this at a later date.  Also, the help is a lot more comprehensive, featuring not just a list of commands, but an entire book on DR-DOS and its features.  There’s networking with Personal Netware, which I’m not sure I’d be able to do in VirtualBox, but it’s worth exploring.

DR-DOS 1

DR-DOS 2

DR-DOS 3

The other DOS I tried was FreeDOS.  This is a fully modern open-source clone of MS-DOS that combines features of DOS with some Linux-like features.

This is the FreeDOS startup screen.  From here you can either install FreeDOS from an install disk, boot from a live version, or boot from the hard drive.

VirtualBox_FreeDOS 1

Here’s a brief slideshow of the FreeDOS installation process:

This slideshow requires JavaScript.

One of the things I really like about the FreeDOS installation is that it comes with 4DOS preinstalled, and it gives you the option of booting into either 4DOS or the default FreeDOS shell.  4DOS is a shell for FreeDOS that emulates some Unix-like features, as well as giving you some options that are pretty much unique to 4DOS.  One of these is the ability to add descriptions to your files, with the describe command, so that when you type dir, you get something like this:

4DOS

I just thought this was so cool, because no other shell lets you do this; no other shell that I know of anyway.

Well, that’s about all I have to talk about for now.  This entry has dragged on long enough, and I think I will say goodbye now.  Goodbye now.

Advertisements

The Slackware installation process

Recently I installed Slackware Linux.  In this blog post, I will detail the installation process I went through as well as my first impressions of the OS.

Slackware is a Linux distro that is supposed to be hard to install, hard to configure, and hard to use.  This is the main reason I wanted to install it – for the challenge and for geek cred.  Every time I engage in a major project like this, I learn something from the experience.  That’s why I love it.  This is especially true of the Slackware installation process, because Slackware makes you choose all of your packages and settings, and it also makes you partition the hard drive from the command line.  Now I was doing this whole installation without reading the guide, so I’m not sure if I did everything right, but I got the crucial parts of the operating system installed (still a few kinks to work out with graphics and networking, but otherwise it works fine).

The first step in the Slackware installation process is of course to download the ISO file, which can be found here. If you’re installing it directly to your computer, you can then burn the ISO to a DVD or Flash drive using a utility like dd. Since I was installing Slackware to a virtual machine, I skipped this step.

The next step is to insert the install disk (or ISO file) into your computer (or virtual machine) and boot from the disk. Then this screen appears:

Slackware 1

At this point I just typed Enter twice to skip the maintenance and keyboard selection steps.

Slackware 2

Then enter “root” to log in as root.

Slackware 3

The next step is to partition the drive.  There are four options at this stage: you can use either an MBR or a GPT partition table, and you can use either a full-screen, menu-driven program or a command-driven program.  The four programs are fdisk, cfdisk, gdisk, and cgdisk.

Here are is a screenshot of fdisk when you start it:

fdisk 1

And the commands for fdisk:

fdisk 2

Here is a screenshot of cfdisk, with three partitions set up:

cfdisk

Originally I had an 8 GB hard drive with 6 GB for the filesystem and 2 GB for the swap space, but I soon realized this was not enough, so I created a 20 GB hard drive.

When you partition the drive using an MBR scheme, you will have to decide what partition type to use for each partition.  A partition type is an 8-bit field in the MBR that denotes how the partition is used.  Here is the list of partition types as shown by fdisk:

fdisk 4

As you can see, a standard Linux partition has a partition type of 83h and a Linux swap partition has a partition type of 82h.

An explanation of the swap partition is probably in order, for those who are unfamiliar with Linux.  Basically, an operating system will run out of space in RAM and will swap pages of memory out to the hard drive.  Linux gives you two options for how this is done – either a swap file in the Linux partition, or a separate partition devoted to swapping.  The latter is generally more efficient.

Now we get to the fun part – actually installing Slackware.  In the setup directory in /usr/lib/setup you will see several executables.

setup

The program you want to run is setup. Type setup at the command prompt. You will then see this screen:

VirtualBox_Slackware 15

Go down to “TARGET” and press the Enter key.  The Slackware installer will now format your target partition with a Linux filesystem of your choice:

VirtualBox_Slackware 17

VirtualBox_Slackware 19

As you can see, there are several filesystems to choose from.  I chose Ext4 just because I’m not familiar with the non-Ext filesystems.

After formatting, you will be prompted for what media you are installing Slackware from.  This part is pretty straightforward.

VirtualBox_Slackware 21

Then you will be prompted to choose which categories of packages to install.  Each category is explained pretty well, so I feel no need to explain them further:

VirtualBox_Slackware 22

Then you choose what installation mode to use:

VirtualBox_Slackware CLI_27_05_2016_10_44_21

I chose newbie mode the first time I installed it (I had to install it multiple times before I got it right), because I wanted to understand each of the packages that were being installed.  Newbie mode isn’t recommended, though, because it takes a really long time, especially if you’re installing the X environment.

Here is a sample screenshot of the kernel being installed:

newbie install 7

The Slackware installer doesn’t tell you this, but what it’s actually doing is running the pkgtool utility. This is a menu-based package manager that provides an easy installation process for Slackware packages. Part of the Slackware philosophy is that the operating system should be complete out-of-the-box. This means that the initial installation comes with a lot more software than, say, Debian. This makes Slackware preferable in my opinion, because searching the Internet for drivers and other packages is a pain in the ass.

The next step is to configure the system. The installer runs several config programs for you. You can run these programs again at any time if you want to change the configuration of your system.

mouse_config

window_manager_config

network_config

When I finished with the installation and rebooted, I found that the Linux partition was unbootable.  I went to a Linux forum and asked about this problem, and they suggested using the chroot command to change the mount point for /dev/sda1 to my root. That worked.

There are still some problems with this installation that I haven’t worked out. There’s no network access. The X Window System can’t find my screen when I try to start it up. And the top utility makes it so my commands don’t echo. I will have to figure out how to solve these problems in the future.