When an operating system is installed from a floppy disk, the first sector in the outermost track of the floppy contains a short program called the bootstrap loader. This program does the job of loading the operating system into the computer's memory when the computer is switched on. In a hard disk, the first sector contains a program called the master boot program, which does the same job of locating and loading the operating system into the computer's memory. This activity is called booting.
A boot sector virus substitutes itself for the bootstrap loader, and a partition-table virus substitutes itself for the master boot program. These viruses get loaded every time you switch on the system. Once the virus is loaded into RAM, it goes about infecting all files on the disk. Also, to simulate normal processing, the virus program transfers control to the original bootstrap loader so that booting can take place.
The virus infects other diskettes in the following manner. Whenever a diskette is accessed, the virus first checks whether the diskette is infected. If it is already infected, the requested disk access is performed and control is returned to the user. If the diskette is not infected, the virus moves the original boot record of the diskette to some other safe sector and copies its own code onto the boot sector, thus infecting this diskette. It then proceeds with the requested disk access. Some examples of boot-sector/partition-table viruses are C Brain, PC Stone and Birthday Joshi.