CIS 106a: Introduction to Operating System Concepts

Chapter 6: Windows 9x/Me Commands and Startup Disk



This chapter is about troubleshooting startup issues in Windows 9x and Windows Me. Objectives important to this chapter are:

  1. What happens when Windows 2000 and Windows XP are started
  2. Memory management in these OSs (and DOS)
  3. DOS commands
  4. Troubleshooting computers that won't start and getting a new hard drive ready to use

In my opinion, this chapter could have come earlier in the text. It features an extended discussion of DOS commands that are helpful to know in the last two chapters. It may be placed as it is because few users are now on 9x or Me.

Windows 95, 98, and Me (Millennium Edition) are all based on DOS. A version of DOS must be loaded on the computer before the Windows interface is loaded in all three cases. It is no surprise that the DOS component must exist on your boot drives/disks, including any startup disk you make.

When DOS boots, several files are loaded in sequence. The names of the files have varied a bit from one version of DOS to another. Some steps mentioned in the text a bit differently from the last chapter:

  1. Startup BIOS runs the Power On Self Test (POST) - if there is an error here, expect a beep code to give you a clue.
  2. Startup BIOS looks for a boot drive, looks for a Master Boot Record (MBR) on it, and loads the master boot program, also called the MBR program in the text. (Control now passes to the master boot program.)
  3. The MBR program reads the partition table, finds the active partition (the one you boot from), and loads the OS boot sector, also called the OS boot record. - What it is really doing is loading the small program stored in that sector, that will start loading the OS. Control passes to this program.
  4. The text calls the program loaded in step 3 the boot sector program. It starts the boot loader, Io.sys. Control passes to this program -
  5. Io.sys runs in 16-bit mode. It reads the Msdos.sys file, which holds configuration settings. (The boot fails if this file is not present.)
  6. Io.sys reads the config.sys file for more configuration settings and a list of device drivers to load. The himem.sys program is loaded as a device driver for high memory (see below)
  7. Io.sys looks for the file. It is loaded and control is passed to it.
  8. reads the autoexec.bat file (if present) and runs the commands in it one at a time. holds DOS commands, operating system code, and an automatic call to the autoexec.bat file.
    Autoexec.bat is a batch file, a plain text file that stores commands that could be entered at the DOS command line. It is typically used for commands that are routinely run each time the computer starts, such as setting the value of the PATH environment variable.

    (Many commonly used DOS commands are stored in the file. These are called internal commands. Other commands are stored as separate files.)
  9. The command prompt appears on the screen. ( continues to run in the background.)

Memory management in a DOS environment became complex, because it started simply and grew over time without a common plan for doing so. Imagine a one bedroom house, that is sold to a new family, who add a new bedroom. They sell to another family who add a second story to the house. Each improvement is made without tearing out the old one, but without any regard to the previous plans. DOS memory management is a bit like that.

Under DOS, there are several memory areas to consider:

  • Conventional (base): 0 to 640 KB
  • Upper memory: 640 KB to 1024 KB
  • Extended memory: above 1024 KB
  • High memory: 1025 to 1088 KB (the first 64 K of extended memory)

You may be wondering why we would divide memory this way. In the beginning, most computers did not have a full load of conventional memory, much less anything else. Upper memory and extended memory were later developments, like the additions to the house in our metaphor.

The text says that himem.sys is a memory manager for memory above 640KB. It is actually a memory manager for memory above 1024 KB (high and extended). It enables DOS computers to load device drivers in high and extended memory. Himem would be loaded from config.sys with a command like:
Then, any driver could be loaded with a device command and himem would put it in high or extended memory:
Himem could also be used, once loaded, to put as much DOS as possible into high memory:

Emm386.exe is a memory manager that loads drivers into upper memory. It must also be loaded as a device with a command in the config.sys file:

The chapter goes on at length about these two utilities. I have a 16 year old text on my shelf that describes their use. Other than this afternoon, I have had no reason to look at it in years. Let us move on.

The text returns to the concept of entering commands at a DOS prompt (command line). How do we get one in 9x or Me?

  • If you have been reading these notes, you would expect that you could start a command line window by clicking Start, Run, entering cmd, and pressing enter (or clicking OK) in W2K and XP. However, in 9x and Me, you enter instead of cmd.
  • In Windows 9x and Me, you should also be able to click Start, Programs, MS-DOS Prompt.
  • In 9x, you can go to the shutdown menu and choose to restart in MS-DOS mode.
  • In either environment, you could boot from a DOS floppy disk.
  • If you hold down F8 or Ctrl while booting, you could select Command Prompt Only from the boot menu that appears.

Under DOS, filenames were restricted to 8 or fewer characters, which could be followed by a period (dot), which could be followed by an extension of 1, 2, or 3 characters. This rule was called the 8.3 (eight-dot-three) rule.

  • Filenames could contain upper and lower case letters (which were treated the same), numerals (0-9), and some special characters: _ ^ $ ~ ! # % & – { } ( ) @ ' `.
  • Some characters were not allowed:
    • no spaces because spaces separate words on a command line
    • only the one period
    • no asterisk, because it is a wildcard meaning "any number or any character"
    • no question mark, because it is a wildcard meaning "any single character"
    • no backslashes (\), because DOS uses those to separate the names of folders in a path to a file or folder

Compare that set of rules to Windows rules:

  • file and folder names can be up to 255 characters long (Bad idea: should we need to make a web link to such a file we could not. URLs can only be 255 characters long.)
  • file and folder names can now have spaces (But a DOS system can't understand them. It will cut those names short (truncate them).)

At a DOS command line, when you issue a command that references a file (like the copy command) you can use just the filename if the file is in the current directory. Otherwise, you must specify the full path to the file (starting at the root of the drive it is on), or you must change your current directory to be the directory the file is in.

In the notes for the previous two chapters, there are links to Computer Hope's page about DOS commands. Their presentation is very good, so I continue to recommend that you check that site for tips on using such commands.

After the section on DOS, the chapter presents a discussion of batch files. As explained previously, a batch file is a text file that can hold any command that could be entered at a DOS prompt. Batch files can be run like programs. You use batch files to automate processes that are either tedious, prone to error, or both. The autoexec.bat file was often used to call (run) other batch files.

As you should know by now, a startup disk is a boot disk. It is a disk (typically a floppy) that has the main boot files for the operating system on it.

A rescue disk is a boot disk that has additional system tools for repairing a system that won't start. It may also be called an Emergency Startup Disk (ESD).

Windows 9x and Me had a weird way to make a startup disk:

  1. Open Control Panel
  2. Double-click Add/Remove Programs
  3. Click the Startup Disk tab
  4. Click Create Disk
  5. Insert the Windows CD if it is requested
  6. Windows then creates the startup disk
  7. Write protect and label the disk

You could use a startup disk to partition and format a new drive, if you put the fdisk.exe and format.exe programs on that startup disk:

  1. Boot from the startup disk
  2. Enter Fdisk at the DOS prompt
  3. Select option 1 to create a partition
  4. Use option 1 (on the next menu) to create primary partition
  5. Use option 1 or 2 to create other partitions (primary or extended)
  6. Use option 3 to create logical drives (assign drive letters)
  7. Select if large disk support will be used (FAT32)
  8. Exit Fdisk and reboot the PC
  9. Use the format program to format the logical drives

When you format a disk, you can make it a boot disk by using the /s switch:
format a: /s
This would format the disk in drive a: and place the startup files on it. (Easier than that weird method above.)

The fdisk program can also be used to fix a corrupt master boot record. First, you change your current disk to the one you are trying to fix. Then, you issue the command:
fdisk /mbr

The chapter ends with a list of error messages, the likely cause of each, and a tip for what to do about it. Students should review this list.