I recently had a query asking me where the CONFIG.SYS and AUTOEXEC.BAT files fit into the system booting. I got carried away with myself when replying. After I had finished, I thought it might provide some information for those just coming into computing. With regard to AUTOEXEC.BAT and CONFIG.SYS, it is more meaningful to describe these two files in terms of where they fit in to the start up sequence. When you turn the power on, the computer's power supply converts 240 volt AC into 5 and 12 volt DC. When the motherboard powers up, a chip called the BIOS comes into play. Some times this chip is called the ROM BIOS. (Read Only Memory Basic Input Output System). This chip has a built in program that does the first part of the start up. It. sets up parts of memory for some functions and various simple but essential house keeping chores. It also checks the keyboard and video and so on, looking to see that it is all responding correctly. You can see it on screen doing the memory check. Just about the last thing that this chip does is try to read a disk in drive A:. If there is a disk in drive A:, it will try to run the start up files. If there are no start up files, in other words it is not a boot disk, then you get the message "Non System Disk". Usually there is no disk in drive A:, so it has a try with drive C:. If that does not work it displays an error message and stops. Regardless of which drive is used to run the start up files, pretty much the same thing happens. Lets sidetrack for a minute. The information on the disk is recorded in the same way as music on a tape-magnetic pulses. The tracks are laid down as concentric rings. One circle inside another, not one continuous stripe spiralling inwards as on a record. Each of these circles, called tracks, is broken into separate segments called sectors. Different disks have different numbers of tracks and segments per track. A 360 kB floppy has 40 tracks and 9 sectors per track. A 20 MB hard disk might have 614 tracks and 17 sectors per track. It varies. Regardless of the size of the disk the first sector on the first side is set aside to hold information about the disk, such as the number of sectors and tracks and other technical information. Each time the computer accesses the disk it reads this sector. It is called the Boot Sector and all disks must have one or the computer has no source of information about the kind of disk it is dealing with. The next few sectors are allocated to the File Allocation Table (the FAT) and then some to the Directory Area. The FAT is like the page numbers on the Contents page of a book, it says where files are located. The Directory Area corresponds to the names of the chapters in a book, in other words the files on the disk. There is a lot of other information in the Directory area - you can view it by typing in DIR in the root directory. The DIR command simply reads the Directory Area. It does not go hunting all over the disk looking for files. On a boot disk - a start up disk - floppy or hard, the next few sectors contain two hidden files called something like
IO.SYS and MSDOS.SYS. Hidden files do not show with the DIR command. These files must be physically located immediately after the end of the Directory Area. If they get moved anywhere else the computer
cannot find them and so you cannot start from that disk. |