logo
http://www.partition-saving.com
Copyright © 1999-2016 D. Guibouret

Additional information

Table of contents

  0- Preamble
  1- Types of access to a hard disk
  2- Partitioning
     a) Principle:
     b) Partitions table:
  3- Why save partitions ?
  4- Why a DOS program ?

0-  Preamble

This file gives some more precise information on accessing a hard disk, partitioning, and use of this program. Its aim is only to give this precise information (not to give all the details on the subjects presented).

1-  Types of access to a hard disk

At the BIOS level, there are two types of access to a hard disk:

If the second access type is possible, the program uses it even if the disk capacity is less than 8 GB.

2-  Partitioning

a) Principle:
Partitioning allows installing several OSes on the same disk. Each OS has a part of the disk and manages it as it wants.
It also allows creation of several logical drives for a given OS (for example, the different units C: D: E: ... with DOS).
For this purpose, information on partitioning is saved on the disk so that each OS can know to whom each part of the disk belongs: this information is the partitions table. Once an OS knows which partition(s) it uses, it loads functionalities with which it can access data written on this partition with care taken as to how it must access it (FAT system on DOS, ext2fs on Linux, ...). At this level, an OS is unable to access the data of other OS's partitions (unless it has some extensions which allows it: Linux is able to read DOS partitions, for example).
b) Partitions table:
Only the most common format will be presented here. This format is the one used notably by Microsoft, Linux, OS2, BeOS, ... (the only OS that I know that does not support it is Solaris x86). My apologies to those people who have other OSes, but I have neither the OS nor the information required to realize tests.

The format of this partitions table is the following:

Information given by a partitions table entry is: As you can see, position information is duplicated between the physical definition and the linear position. If the disk is accessed with linear access, it is the linear position that is used, else it is the physical definition.

3-  Why save partitions ?

It appears that each OS manages its data as it wants and does not know what is done elsewhere. So if we want to save data, we have to write a program for each OS (and we must follow OS evolution). Another way is to bypass the OS level by directly accessing the disk. Indeed, at the disk level data does not seem to be organized, it is only written at a position on the disk and we do not need to know its sense. The restraint is that it is necessary to save all data that is related together: the minimum level is a partition.
So when saving a partition, we save all the information without knowing how it is organized. We are free from the OS and it is even possible to save data for which we still do not know the organization method.

Remark:
The minimum set of related information that does not depend on data representation is the partition. But when saving, care must be taken because some OSes can relate several partitions together. For example, if you install Windows on the C: drive and then some other programs that modify the register base or add DLLs on the D: drive, you have to save both partitions one after other (because the two become linked).

4-  Why a DOS program ?

An OS must be chosen. Even if we do not need to know the data organization, saved data must be written somewhere with a known organization for the user to access it (for example, to write it on a CD). The choice has been made to use DOS because it is a single-task OS. With a multi-tasking OS, imagine the problems that can be caused by a process changing data on a partition while saving (or restoring) of the partition is in progress. In general, there is a way to avoid simultaneous access, but what can happen if access to the hard disk must be forbidden for a long time, as is the case with this program (for example, with the swap file under Windows)? And what can happen if the OS does not fully hold in memory?
An advantage to using DOS is that it can be quickly installed (what is the gain if you have to lose an hour to install an OS before restoring?) and can be held on one floppy. So by running on one floppy, it is possible to save/restore a partition even if there is no DOS partition on a computer, or if this computer is connected to a network with a Samba server on it, or if it has a high capacity saving system (like ZIP or LS120).
These are the reasons why this program cannot be run under Windows and why it is not advisable to use it with an emulator running in a multi-tasking environment (moreover, an emulator cannot define all the functionalities used in this program).

Note:
This chapter is partially obsolete as a Windows version exists. But for the reason invoked above, saving the Windows installation that is in use cannot be done as Windows does not disallow the simultaneous access to this partition. So in this case, you need to use a WinPE or BartPE CD.

Back to homepage

All trademarks and registered trademarks are property of their respective holders.