![]() |
Manual
Table of contents
1- License and preface
2- Introduction
3- System requirements
4- Interface features/functions
a) Textual windows interface
b) Command line interface
5- Using the program
6- Saving an element
a) Support choice:
b) Source element choice:
c) Part to save:
d) Swap files directory:
e) File choice:
f) File size choice:
g) Compression choice:
h) Log file choice:
i) Saving window:
j) Options file creation:
k) Examples:
7- Restoring an element
a) Backup file choice:
b) Log file choice:
c) Destination element choice:
d) Restoring window:
e) Examples:
8- Copying an element
a) Support choice:
b) Source element choice:
c) Part to save:
d) Destination element choice:
e) Copying window:
f) Examples:
9- Copying a backup file
10- Verifying a backup file
11- Updating Windows 2000/XP/Vista/Seven registry
a) Support choice where Windows is installed:
b) Element choice where Windows is installed:
c) Directory where Windows is installed:
d) Disk choice where partition to update is:
e) Partition to update choice:
f) Drive letter of partition to update:
g) Confirmation:
h) Example:
12- Updating Windows Vista/Seven boot configuration
a) Bootable support choice:
b) Bootable element choice:
c) Boot configuration data file choice:
d) Disk where partition to update is choice:
e) Partition to update choice:
f) Boot entry to update choice:
g) Confirmation:
13- Updating BOOTSECT.DOS/BOOTSECT.BAK file
a) Support choice where BOOTSECT.DOS/BOOTSECT.BAK file is:
b) Element choice where BOOTSECT.DOS/BOOTSECT.BAK file is:
c) Confirmation:
14- Fixing disk physical definition into boot sector
a) Support choice where fixing boot sector:
b) Element choice where boot sector is:
c) Correction of first sector value:
d) Choice of new physical definition:
e) Giving manual values:
f) Correction of support number value:
g) Confirmation:
15- Replacing a boot sector or a superblock by its copy
a) Support choice where copying boot sector/superblock:
b) Element choice where boot sector/superblock is:
c) Choice of copy to use:
d) Exploring partition:
e) Confirmation:
16- Simulating an element
a) Use of driver:
b) Simulating an element:
c) Remarks:
17- Creation of files on NTFS drive
18- Reset bad sectors in filesystem
a) Support choice where bad sectors shall be removed:
b) Element choice where bad sectors shall be removed:
c) Confirmation:
d) Execution:
19- Explore a partition
a) Choice of support where partition to explore is:
b) Choice of partition to explore:
c) Exploration window:
d) View window:
e) Edit window:
f) Copy destination:
g) Copy execution:
h) Execution in command line mode:
20- Explore a backup
21- Change of boot partition
a) Choice of disk where partitions table is:
b) Boot partition choice:
c) Confirmation:
22- Create files marking drives to use
23- Load an options or marker file
24- Options file contents
25- Mounting a partition
26- Notes on what elements can be saved
a) The complete disk:
b) The Master Boot Record (MBR):
c) First sectors of disk:
d) Partitions table (MBR):
e) Partitions table (GPT):
f) Partitions (all sectors):
g) Partitions (only occupied sectors):
h) FAT (12, 16 and 32) partitions (DOS/Windows):
i) Ext2fs/ext3fs/ext4fs partitions (Linux):
j) NTFS partitions:
k) Boot sector/superblock:
l) Floppy disks:
m) DOS/Windows/Linux devices:
n) Raw files:
27- Differences between DOS and Windows versions
a) All versions of Windows:
b) Windows before Windows 95:
c) Windows 95/98/Me:
d) Windows NT/2000/XP/Vista/...:
e) Windows 64 bits:
28- Differences between DOS and Linux versions
a) All versions of Linux:
b) Secured versions of Linux:
c) Linux 64 bits:
29- Log file
30- What is not supported
31- What cannot be tested
32- Acknowledgements
This program may be copied and freely redistributed. It may not be sold in any way, either alone or included in another program. All that is in this package must be kept together in its original form.
This program is offered as-is without any guarantee. No pursuit can be engaged against its author in case of damages due to this program.
This file is the complete version of manual and has many details. If you begin to use Partition-Saving, you can read the HOWTO before to see how to use it, then come back to this file if you need further details.
All remarks are welcome.
The goal of this program is to achieve saving, restoring and copying of
elements of storage device. An element can be a whole hard disk, a floppy disk,
the Master Boot Record (first sector of hard disk containing boot code), the
partitions table or a partitions. This permits saving hard disk contents to
restore it later in case of a problem, without losing time reinstalling and
reconfiguring software.
This program allows running the following tasks:
For detailed information about partitioning and this program, please read additional information.
Hardware:
4- Interface features/functions
Two interface types are available:
a) Textual windows interface
Interface can be used with keyboard or mouse. Keys common to all windows are:
Moving keys | Combination |
Home | Ctrl+B |
End | Ctrl+E |
Down | Ctrl+D |
Up | Ctrl+O |
Right | Ctrl+K |
Left | Ctrl+L |
Page Down | Ctrl+N |
Page Up | Ctrl+P |
BackSpace | Ctrl+H |
Delete | Ctrl+J |
Insert | Ctrl+Y |
Return | Ctrl+M |
Tab | Ctrl+F |
Shift+Tab | Ctrl+G |
Alt+Tab | Ctrl+T |
Ctrl+Tab | Ctrl+W |
b) Command line interfaceThis interface is more basic and can only be used with the keyboard. Pressing the Escape key at any time stops execution of the program.
Usage:
savepart.exe [-l en|fr|fr_2] [-cm|-nm|-pm] [-f <options file>] [-fp <partition marker file>|-fd <device marker file>] [-ff <drive marker file>] [-fnc] [-ncd] [-ncs] [-nvd|-vd] [-nvf|-vf] [-tds] [-cui|-tui|-tuix|-bui|-buix] [-beep|-beep=<nb>] [-utf8|-noutf8] [-force] [-nocrc] [-noroot] [-hiber=warn|exit|ignore] [-term <terminal>] [-termopt <terminal command execution flag>] [-a|-b|-c|-d|-e|-g|-i|-k|-m|-n|-r|-s|-t|-u|-v|-w|-x|-z]
To use the Windows version, spartwin.exe (32 bits) or spartw64.exe (64 bits) shall be used instead of
savepart.exe.
To launch the Linux version, spartlnx.run (32 bits) or spartl64.run (64 bits) shall be used instead of
savepart.exe.
In Windows and Linux versions, same options are available, but some of
them will have no effect (see below).
-l: this option allows you to select which language to use. You only have to use this option if the automatically recognised language is not correct. If an error occurs before this option is analysed, the error message will be written with the automatically detected language. Recognised languages are:
In DOS, detection of language sets language to French when detecting France, French Canada, French Guyana, French Antilles or French Polynesia settings, otherwise it is set to English.
- en: English.
- fr: French.
- fr_2: French with others code pages.
-cm: this option is the default way the mouse is utilised.
-pm: this option is another way to utilise the mouse that can be used in case the first one does not work (it is default method when using DOS version on Windows NT/XP). Using this method may prevent detecting some double clicks. This option is equivalent to -cm into Windows version. In Linux version, program does not try to install its own mouse handler but fully relies on ncurses one.
-nm: this option disables the mouse. You would have to use it only if mouse use seems to pose a problem with 2 previous methods.
-f <options file>: this option allows you to use batch mode. To understand the contents of this file, please read chapter 24.
-fp <partition marker file>|-fd <device marker file>: this option allows you using another way to designate the partition (-fp) or device (-fd) to save or restore: program searches for marker file you give (by scanning all partitions or devices) and uses the partition/device on which this file is found. To get more information on these options, please read chapter 22.
-ff <drive marker file>: this option allows you using another way to designate the drive where is backup file: program searches for marker file you give (by scanning all partitions or devices, then all drives) and uses the drive on which this file is found with using the name of this file as base for backup file name. To get more information on this option, please read chapter 22.
-fnc: this option disables confirm of found partition/drive when using -fp, -fd and -ff options.
-ncd: this option disables the check that created/read file is not on saved/restored element. It is generally recommended only if DOS drive letter attribution is wrong. This option has no influence in Windows and Linux versions (this check cannot be disabled).
-ncs: this option disables the check on free size on drive where backup file is created. This is a workaround in case the driver report a wrong free size, but you have to be aware when using this option to not provide a too big maximum file size else saving will fail.
-nvd|-vd: this option disables/enables the check that sectors are correctly written. It is disabled as default. This speeds up restoring, but may prevent detecting bad sectors on the disk. The check that sectors are correctly written cannot be enabled in Windows and Linux versions (less for floppy disks in Windows 9x).
-nvf|-vf: this option disables/enables the check that files are correctly written and that sectors are correctly written when using DOS devices access. It is disabled as default. This speeds up saving (and/or restoring), but created files or restored devices may be incorrect because the disk where they are written is damaged. The check that files are correctly written cannot be enabled in Windows and Linux versions.
-tds: this option enables check of disk size with relying on partitions table content (for disk with extended access) or with searching last cylinder (for disk with standard access). This option is needed only if partitions do not appear on displaying of what can be saved/restored.
-cui|-tui|-tuix|-bui|-buix: this option allows you to select the user interface:
If this option is not given, textual window interface is used. This option has to be used only if this interface poses a problem (for example nothing appears when the program begins). In this case, you can first try the -bui option, and if it still does not work, use the -cui one.
- -cui: command line interface.
- -tui: textual window interface.
- -tuix: same as -tui but with using extended display mode (43 or 50 lines instead of 25). In Linux version, the whole terminal size is used. In Linux and Windows modes, program will adapt displayed area is you modify terminal size (without allowing it to be smaller than 80*25).
- -bui: textual window interface using BIOS calls to write on the screen. This ensures better compatibility but goes slower. This option is the same than -tui in Windows and Linux versions.
- -buix: same as -bui but with using extended display mode (43 or 50 lines instead of 25). This option is the same than -tuix in Windows and Linux versions.
-beep|-beep=<nb>: some beeps are generated at regular time when performing backup/restore (see "beep=" option to get more details). Without value, beeps are generated every 10 seconds, else they are generated every <nb> seconds.
-utf8|-noutf8: forces use or not use of UTF-8 terminal capability in Linux version. The default behaviour is to detect it automatically.
-force: allows testing all filesystem types on a partition even if they are not compatible with partition type. On restoration forces it even in case destination does not match constraints stored in backup (in this case, there is NO GUARANTEE on result). Constraints that are still checked are that type of support is the same (you cannot restore backup of a disk on a partition), size of sector is the same and that size of support is at least equal to size in backup. Constraints that are not checked depend on what is in backup but can be that physical definition (number of heads, cylinders, first sector) is the same or support is not bigger than maximum size. That can lead to big amount of space unused at end or wrong partition definition leading it to be unreadable or unbootable. Use of some capability of this program can correct some of these problems (as fixing of physical definition). This option shall be used only in case of troubles and when you know what you do.
-nocrc: avoids program to stop in case of backup file's checksum having an invalid checksum. Depending on used backup options, restore could fail for some other reason (as when file is compressed, decompression algorithm will certainly be unable to uncompress data). As the backup file is damaged, obtain restoration will be corrupted.
-noroot: avoids program to check if user has administrator's rights. It only avoids a potential warning message telling all support could be not seen in case user does not have administrator's rights.
-hiber=warn|exit|ignore: what program shall perform if it finds an hibernated operating system. An hibernated operating system does not have flushed content of disk and will not refresh it on startup, so modifying disk could lead to incoherences or corruptions. As default, program searches for such system to warn you in case it finds some.
-term <terminal>: this option is specific to
Linux and Windows versions.
In Linux version, if program finds it does not run in a terminal,
it launches itself into a terminal with using the "xterm" command
(this mechanism is useful if you double click on program from a file explorer).
This option allows setting command to use to create the X terminal in which
running program instead of "xterm". If <terminal> is equal to
"no", program does not try to create a terminal even if it finds it
is not executed into a terminal.
In Windows version, program tries to launch a new console to ensure the
mouse quick edit mode is disabled (thus allowing use of mouse). Using this option
(whatever <terminal> value is) disables this behaviour.
-termopt <terminal command execution flag>: this option is specific to Linux version. It allows giving flag used by terminal program to execute a command with arguments. It is "-e" as default that is value for "xterm" program.
-a|-b|-c|-d|-e|-g|-i|-k|-m|-n|-r|-s|-t|-u|-v|-w|-x|-z: this option allows selecting which action to do:
If none of these options are given, the program asks what you want to do
- -a: fix disk physical definition into boot sector.
- -b: update BOOTSECT.DOS/BOOTSECT.BAK file.
- -c: copy an element.
- -d: copy files created by this program to modify it (compression rate, maximum size, extract occupied sectors only, ...).
- -e: explore a partition.
- -g: change the boot partition in partitions table.
- -i: get information from driver.
- -m: simulate an element with backup files.
- -n: create files on NTFS partition when you are running from Windows NT, 2000, XP or following.
- -r: restore an element.
- -s: save an element.
- -t: verify a backup file.
- -u: update Windows 2000/XP/Vista/Seven registry.
- -v: explore a backup file.
- -w: update Windows Vista/Seven boot configuration data.
- -x: create marker files on partition to save/restore and on partition where to create/get backup files.
- -z: cancelling bad sectors information of a filesystem.
Return code of program can be one of the following:
Remarks:
This is the part executed when you use the -s option or select it when the program asks you.
Execution follows the diagram below (if not in batch mode):
Support choice | V Source element choice | V [Part to save] | V [Swap files directory] |<------------------------+---+ V | | File choice | | | | | V | | File size choice | | +-------------------------+ | V | [Compression choice] | | | V | [Log file choice] | | | V | Saving window | +-----------------------------+ V Options file creation | V End
a) Support choice:You have to choose the disk, floppy drive, DOS/Windows/Linux device or raw file where the element to be saved is located.
b) Source element choice:This window allows you to select what part of the disk to save.
Remarks:
c) Part to save:This window only appears if chosen partition is of a type which permits saving only occupied sectors. In this case, it proposes the following choices:
Remark:
d) Swap files directory:This window appears only if you chose "Element without swap files" or "Element on itself without swap files" option in the previous window. It allows telling the program which directory contains the swap files. In addition to the directory you choose here, the program also searches for them in the root directory (you can obviously give the root directory here also). As a general rule, swap files are either in the root directory or in the Windows directory. To select the directory you have to go into the tree (with displaying subdirectories of a directory by pressing the "+" key when it is selected if necessary) until you reach it, then press Enter or click the Ok button.
e) File choice:In this window you can choose the name and location of the file in which to save partition data. For this purpose you can type into "File" line the name of the file (with possibly its path) or select one from the files list or select another directory with drives and directories lists. By default "*.*" is displayed in DOS and Windows or "*" in Linux, which means that all files are shown. You can also create some directory (this shall NOT be done on the saved partition even if you chose to save it on itself) or mount a partition. Mounting a partition allows you to access a partition that cannot be used by DOS/Windows, such as an NTFS (for DOS version) or ext2 partition you want to write a backup file on. For have more details on mounting a partition, please read chapter 25.
Remarks:
f) File size choice:This window permits you to choose the maximum size you want for the file. If more space is needed to save the element, a new file will be asked of you when this one is full. If free space on the drive is less than 10 MB, asked size is in kB, else it is in MB. This maximum size cannot be bigger than drive free space or 2047 MB, whichever is smaller. If you used the "-ncs" option, drive free space is not checked.
g) Compression choice:If you have enough memory, a window asks which compression level you want to use to compress data. The level goes from 0 (no compression) to 9 (maximum compression). Level generally used by the compression routine is level 6. The higher the compression level, the longer the execution time will be (but only a small change when expanding).
h) Log file choice:This window appears only in case you check option to create log file when the name of the backup file is requested. You have to give the name of the file where you want to store all errors message displayed by program. You can refer to chapter 29 to get more details on log file.
i) Saving window:This window shows the backup progress.
j) Options file creation:If you do not use batch mode (or if some options have been added to those given in batch mode), a window will ask you if you want to create an options file that will allow you to use batch mode for future save/restore of this partition. If you answer "yes", a window will ask you to give its name. This file will contain all the options you have used. Another window is displayed to allow you adding a comment at begin of this file (program automatically adds ";" before comment).
Remarks:
k) Examples:Suppose you have 2 hard drives partitioned as described below (next to partition type are <DOS>|<Linux> drive names):
|
|
If you want to save the partition containing the D: drive, you execute savepart.exe -s, then:
If you want to save the Linux partition, you must:
This is the part that is executed when you use the -r option or select it when the program asks you.
Execution follows the diagram below (if not in batch mode):
Backup file choice | V [Log file choice] | V Destination element choice |<------------------------------+ V | Restoring window | +-----> Backup file choice -----+ V End
a) Backup file choice:This is the same window as the one used for file choice when saving. The selected file header is verified and an error is displayed if it is incorrect.
b) Log file choice:This window appears only in case you check option to create log file when the name of the backup file is requested. You have to give the name of the file where you want to store all errors message displayed by program. You can refer to chapter 29 to get more details on log file.
c) Destination element choice:This window gives a list of elements that are compatible with what is saved in the file. You must choose one of the elements in this list to do a restoration.
!!!!! Warning !!!!!:
Restoring erases all data currently present on the chosen element.
Moreover, you must NOT choose the disk (when restoring a whole disk)
or the partition on which the file used for
this restoration is located (indeed it would be erased during restoration and thus would no longer be accessible, causing an error and stopping the restoration).
A warning window informs you if the selected file is located on the disk or partition
to be restored. This window is only displayed for the first file (for subsequent files, you must NOT access the disk or partition you are
restoring) and is not displayed if you used the "-ncd" option.
d) Restoring window:This window permits you to watch the restoration progress.
!!!!! Warning !!!!!:
e) Examples:Consider the same partitioning presented in the above examples for saving partitions, and now you want to restore the partitions previously saved.
If you want to restore the Linux partition, you do the same things as above. In this case only the third partition of the first disk will be listed as it is the only Linux partition (the Linux swap partition does not have the same filesystem).
This is the part executed when you use the -c option or select it when the program asks you.
Execution follows the diagram below:
Support choice | V Source element choice | V [Part to save] | V Destination element choice | V Copying window | V End
a) Support choice:Please refer to the same description in the "saving element" chapter (chapter 6.a).
b) Source element choice:Please refer to the same description in the "saving element" chapter (chapter 6.b).
c) Part to save:Please refer to the same description in the "saving element" chapter (chapter 6.c).
d) Destination element choice:Please refer to the same description in the "restoring element" chapter (chapter 7.c) replacing all references to "file" by "element to copy".
e) Copying window:This window permits you to follow copying progress.
!!!!! Warning !!!!!:
f) Examples:Take the same partitioning presented above in the examples of saving a partition, and now you want to copy the partition containing the D: drive onto the partition containing the E: drive (assuming that size is compatible).
This is the part executed when you use the -d option or select it when the program asks you.
This part allows you copying files, modifying their compression rate or maximum size. In case backup files contains all sectors of a disk or a partition, you can copy only a partition or occupied sectors of the partition (such as you can restore obtained files on another partition than the source one).
Execution follows the diagram below:
First file choice Contains all sectors | Contains occupied sectors +------------------+------------------+ V | Ask for extraction | | No extraction | +------------------------+ | Extraction | | | V | | Source files check | | | | | V | | Part to copy choice | | | | | +------------------+-----+------------+ | V First destination file choice | V Copy | V End
Program begins with asking you the source filename (please read chapter 7.a).
If file contains a backup of all sectors, program asks if you want to
extract a partition (in case of a disk backup) or occupied sectors (in case
of partition, floppy disk or DOS device backup).
If you choose to extract a part of the file, program asks all backup files to check them. For the remaining part of execution, all these files shall be accessible simultaneously. It is better to avoid using this option in case the saving signalled some bad sectors. Once files are checked, program asks what you want to copy (this is similar to chapters 6.b to 6.d), then performs copy with simulating a saving (as into chapters 6.e to 6.h).
In case you do not choose to extract a part of the file, or if you have no choice, program asks the name and maximum size of the destination file and its compression rate (please read chapters 6.e, 6.f and 6.g), then copy begins. The copying window displays progress for the source file with the upper progress bar and progress for the destination file with the lower progress bar. If several source or destination files are necessary, they will be asked of you when they are needed.
Remarks:
This is the part that is executed when you use the -t option or select it when the program asks you.
This permits verifying that backup files are valid. This verification consists of checking file headers, size and checksum of data (once they are expanded if they were deflated). If a saving was done in several files, you are obliged to check all files. No data is written on disk or is modified inside the files.
Execution begins with asking source filename (please read chapter 7.a). The checking window shows in the upper progress bar the state of the check for the current file. If saving was done in several files, subsequent files will be asked of you.
11- Updating Windows 2000/XP/Vista/Seven registry
This is the part that is executed when you use the -u option or select it when the program asks you.
Windows 2000 and followings store partition position in the registry in order to preserve association between a partition and its corresponding driver letter. Partition position is composed of two parts and depends on partitions table type:
So if you copy a partition onto another disk (without copying partitions table) or if you move the beginning of a partition (for MBR partitions table), you have to update the information in the registry for each partition that you moved for Windows to be able to still use the same drive letter. In the case of restoring a partition which has not been moved, this is not necessary.
Execution is composed of 2 parts: first, to designate where Windows is installed so that the program can find the registry file; second, to give the partition to be updated in this registry. If you copy the Windows 2000/XP/Vista/Seven partition, the Windows installation that should be updated is the one that was the destination of the copy.
It shall be noticed that this option does not allow to create a new drive
letter into registry: you can only assign an already existing
drive letter. This is not a problem as the need for this option is to set
the drive letter of a source partition to the destination partition when
restoring/copying to a destination partition that is not the same than source
one.
In case you need to create a new drive letter, you can either use the
Windows disk management tool (if it is not for the system partition) or edit
registry with booting with a WinPE or BartPE CD.
Execution follows the diagram below:
Support choice where Windows is installed | V Element choice where Windows is installed | V Directory where Windows is installed +--------------------->| | V | Disk choice where partition to update is | | | V | Partition to update choice | | | V | Drive letter of partition to update | | | V | Confirmation | | | V | Change another drive letter? | yes | +----------------------+ | no V End
a) Support choice where Windows is installed:You select the disk or DOS/Windows/Linux devices list where the Windows installation whose registry should be updated is located.
b) Element choice where Windows is installed:You select the partition (if a disk has been chosen in the first window) or the DOS/Windows/Linux device (if DOS/Windows/Linux devices have been chosen in the first window) where the Windows installation whose registry should be updated is located.
c) Directory where Windows is installed:You select the Windows installation directory. As a general rule, this directory is called "WINDOWS", unless you specified another name when installing it. If you give a wrong directory name, or if the installed Windows version is not correct, you will get an error message telling you that the registry file has not been found.
d) Disk choice where partition to update is:You choose the disk which has the partition whose registry definition you want to update.
e) Partition to update choice:You choose the partition for which you want to update the definition in the registry.
f) Drive letter of partition to update:This window shows a list of driver letters that can be modified with their current definition. The first column is the drive letter, the second is the disk identifier where the corresponding partition is located, and the third column is the first byte of the partition on the disk. The last column displays the two previous columns as given by regedit.
g) Confirmation:The program asks you to confirmation the registry modification. It gives you the key name that will be modified, its previous and new values. The value is composed of 12 hexadecimal digits, the first four being the disk number, last eight the offset of the partition on the disk (it is the same format as the last column of previous window).
h) Example:
|
|
|
|
12- Updating Windows Vista/Seven boot configuration
This is the part that is executed when you use -w option or select it when the program asks you.
In order to manage boot, Windows Vista/Seven store into a file which partitions
are bootable and where they are on disk following a way near the one used to
associate a drive letter to a partition. This is similar to the way BOOT.INI
works on Windows XP, but file cannot be edited because it is binary.
This option allows you modifying information in case you moved a system
partition (either it is copied onto another disk, or its beginning position is
modified on disk) and you have Windows Vista/Seven installed on your computer.
Execution follows the diagram below:
Bootable support choice | V Bootable element choice | V [Boot configuration file choice] | V Disk where partition to update is choice | V Partition to update choice +-------------------------->| | V | Boot entry to update choice | | | V | Confirmation | | | V | Change another entry | yes | +---------------------------+ | no V End
a) Bootable support choice:This window permits you to choose on which support is file containing boot configuration data. In most cases this file is on bootable partition of the computer that is on first disk. This partition is often a small 100 MB partition that appears first on disk or the partition where Windows is installed.
b) Bootable element choice:This window permits you to select partition on which boot configuration data are.
c) Boot configuration file choice:This window is optional. It is displayed only if no boot configuration data file or both of them are found.
d) Disk where partition to update is choice:This window permits you to select disk that contains partition that was moved and that need an update of its boot information.
e) Partition to update choice:This window permits you to select partition that was moved.
f) Boot entry to update choice:This window shows a list of boot entries that are defined with their current configuration. Above list is the description of chosen partition: displayed values will replace the ones in list for the selected entry.
The mostly encountered entries are the following:
If an entry appears with all its data to 0, this means there was incoherence into its data or program gets a problem to read them. You have to be careful when updating it, it can lead to some others incoherence.
If an entry appears with a name between "{...}", it means program was not able to find its name and it uses the default one depending on entry type. If name is "{Unable to get name}", it is that even entry type cannot be found.
If a window is shown before, informing you that all entries were not read, these entries are not displayed and you cannot update them.
Example:
The screenshot shows the case where Windows Vista was not installed on the
bootable partition (this can be deduced because two identifiers appear).
If you move the Vista partition, you have to update the 2 first entries, and
if you move the bootable partition, you have to update the 3 last entries.
If Windows Vista had been installed on the bootable partition, the 5
entries would have the same identifier and you would have to update all of
them if you move the partition.
g) Confirmation:This window requests you if you confirm the modification of entry you chose.
13- Updating BOOTSECT.DOS/BOOTSECT.BAK file
This is the part that is executed when you use -b option or select it when the program asks you.
In order to manage multiboot with another DOS or Windows version, Windows XP/Vista/Seven saves the boot sector of other Windows versions into BOOTSECT.DOS or BOOTSECT.BAK file on the same partition and modifies this boot sector to set a new one (this one asks for the Windows version to run depending multiboot configuration). If you choose to launch previous Windows version, it reads the BOOTSECT.DOS/BOOTSECT.BAK content and run it. Consequently, if you copy to another disk or move the begin of the partition where the other Windows version is, this file needs to be modified to reflect that. This option is for that purpose.
Warning: This option only modifies some parameters in BOOTSECT.DOS/BOOTSECT.BAK to take into account changes that may have been made in the boot sector; it does not allow creating or completing a BOOTSECT.DOS/BOOTSECT.BAK file.
Execution allows choosing the partition on which BOOTSECT.DOS/BOOTSECT.BAK file is located to update it according to the current boot sector of this element. Execution follows the diagram below:
Support choice where BOOTSECT.DOS/BOOTSECT.BAK file is | V Element choice where BOOTSECT.DOS/BOOTSECT.BAK file is |<-------+ V | Confirmation | | | +--------+ | V End
a) Support choice where BOOTSECT.DOS/BOOTSECT.BAK file is:You have to choose disk, floppy disk or DOS/Windows/Linux devices list on which is the BOOTSECT.DOS/BOOTSECT.BAK file to modify.
b) Element choice where BOOTSECT.DOS/BOOTSECT.BAK file is:You have to choose the partition (if a disk has been chosen in first window) or DOS/Windows/Linux device (if DOS/Windows/Linux devices has been chosen in first window) on which is the BOOTSECT.DOS/BOOTSECT.BAK file to modify.
c) Confirmation:The program asks you to confirm the BOOTSECT.DOS/BOOTSECT.BAK file modification. If you confirm, it will be modified to update some parameters according to those in the current element boot sector.
14- Fixing disk physical definition into boot sector
This is the part that is executed when you use -a option or select it when the program asks you.
This option permits you to change number of heads and number of sectors per
track that are stored into FAT and NTFS boot sector.
This can be needed in case you have a problem as "NTLDR missing" or "IO.SYS not
found" when booting and when you explore this partition you see these files
(if you do not see them, you need to copy them with using SYS program in
DOS/Windows 9x case or with using recovery console for Windows NT/2000/...).
This error can be generated because physical definition of disk into boot
sector is wrong (note: SYS and recovery console allow fixing this error also).
Execution follows the diagram below:
Support choice where fixing boot sector | V Element choice where boot sector is | V [Correction of first sector value] | V Choice of new physical definition | Using predefined value +-----------+-------------------------+ | | V | Giving manual values | | | +-----------+-------------------------+ | V [Correction of support number value] | V Confirmation | V End
a) Support choice where fixing boot sector:You have to choose disk, floppy disk or DOS/Windows/Linux devices list on which is the partition or device for which boot sector shall be modified.
b) Element choice where boot sector is:You have to choose the partition (if a disk has been chosen in first window) or DOS/Windows/Linux device (if DOS/Windows/Linux devices has been chosen in first window) on which is the boot sector to modify.
c) Correction of first sector value:This window is displayed only if program finds that first sector value is wrong in boot sector. This value gives number of sectors on disk that are before the partition. In case this value is wrong, it can disallow the partition to boot if it is a bootable one. If it is not a bootable one, this has no consequence. In case you want to correct this value, you have to confirm it. The change will be effective only if you do not cancel execution in following windows.
d) Choice of new physical definition:This window displays current values of boot sector and a list of predefined values. Content of this list depends on the support and the OS (some values can be missing) and it is normal that these values are different (this is the reason why fixing them in boot sector is needed).
Note: using values different from standard numbers for a disk using standard access is certainly a bad idea, because only these numbers shall be correct.
e) Giving manual values:These windows are displayed in case you choose last option into previous window. They allow you to enter numbers you want in case no predefined value seems correct. Giving bad values will in most cases not result in lost of data (partition will not boot), but it is better to be cautious. Often correct values are power of 2 (16, 32, 64, ...) or power of 2 less 1 (63, 255, ...).
f) Correction of support number value:This window is displayed only if program finds that support number value is wrong in boot sector. This value should be 0 for a removable media and 128 for a fixed media. In case this value is wrong, it can disallow the partition to boot if it is a bootable one. If it is not a bootable one, this has no consequence. In case you want to correct this value, you have to confirm it. The change will be effective only if you do not cancel execution in following windows.
g) Confirmation:The program asks you to confirm the boot sector modification. If you confirm, boot sector and its copy (if there is one) will be modified.
15- Replacing a boot sector or a superblock by its copy
This is the part that is executed when you use -k option or select it when the program asks you.
This option permits you to replace a boot sector for a FAT/NTFS partition or a superblock for an ext2/ext3/ext4 partition with its copy. FAT32, NTFS, ext2, ext3 and ext4 filesystems define a copy of these sectors in order to be able to repair a partition if origin sector is corrupted. You can try to use this option if your partition appears suddenly as of "RAW" type instead of "FAT" or "NTFS" in Windows.
Execution follows the diagram below:
Support choice where copying boot sector/superblock | V Element choice where boot sector/superblock is | V Choice of copy to use | V Exploring partition | V Confirmation | V End
a) Support choice where copying boot sector/superblock:You have to choose disk or DOS/Windows/Linux devices list on which is the partition or DOS/Windows/Linux device for which boot sector or superblock shall be replaced by its copy.
b) Element choice where boot sector/superblock is:You have to choose the partition (if a disk has been chosen in first window) or DOS/Windows/Linux device (if DOS/Windows/Linux devices has been chosen in first window) on which is the boot sector or superblock to replace.
c) Choice of copy to use:This window gives list of boot sector or superblock copies that seem valid. In most cases, this list is either empty (no found copy) or has one item only. If several copies are found, it is better you explore partition (see next window) for each of them to check which one is the correct one.
d) Exploring partition:This window requests you if you want to explore partition with using the copy of boot sector/superblock. This permits you to check if its content is valid with using this copy. Exploring runs as described into chapter 19, partition being mounted read only. When you exit exploration, you come back to this execution.
e) Confirmation:The program asks you to confirm the boot sector/superblock modification. If you confirm, boot sector/superblock is replaced by its copy.
This section covers the use of the driver (DRVPART.SYS) and the options
"-m" and "-i" for savepart. The purpose of this driver is
primarily to allow access to a partition contained in a backup file in order to
recover some files.
Note:
Because of option to explore a backup (see
chapter 20) that has more capacity, this part is
deprecated and will not be
maintained in case of major change in backup file format.
a) Use of driver:DRVPART.SYS is a DOS driver that allows simulating that a new drive letter is present. This drive is simulated with a backup file created previously.
Memory allocated by the driver is a memory block which allows temporarily storing sectors requested by
others programs. As needed, this size can dynamically be
increased/decreased (but never goes bellow the size defined when loading). The
worst case of memory use is certainly when a program wants to know free space on the
drive (as when you do a "dir").
Memory used by the driver is XMS or EMS memory (depending on what is present).
These are standard memory types (you do not need specific hardware) called XMS or EMS depending on the way it is managed.
XMS memory is managed by HIMEM.SYS driver (a DEVICE=<location>\HIMEM.SYS
line has to be present at the beginning of the CONFIG.SYS file) and EMS memory is
managed by EMM386.EXE driver (or some other that does the same thing) (a
DEVICE=<location>\EMM386.EXE line has to appear in CONFIG.SYS file just
after the one containing HIMEM.SYS). If neither of these two types of memory
is present, driver will not be loaded. Note that using EMS memory
can limit useful memory size to 32 MB.
Driver can generate following messages when loading:
b) Simulating an element:Once the driver is loaded into memory, "-m" and "-i" options of savepart can be used (or associated actions appear in lists of actions if you do not specify an action option).
c) Remarks:
17- Creation of files on NTFS drive
This option appears only when you are running the program under Windows NT and following. It allows you to create a file on a NTFS partition which can be used as a backup file by using partition mounting once you are running from DOS. This is due to fact that the program is not able to create files on a NTFS partition (only to read/write and resize) when it runs from DOS, so files you create here serve as a base. This option asks you names of files to be created until you hit the 'Cancel' button. If you use automatic naming, instead of asking you several files, it asks number of files you want to create.
Remarks:
Example:
You want to save a partition with 4 GB data into 680 MB files (to be able to
burn them) with using partition. In this case you will have to create:
4*1024 / 2 / 680 = 3.011 => 6 files.
18- Reset bad sectors in filesystem
This is the part that is executed when you use -z option or select it when the program asks you.
This option allows removing that sectors are marked as wrong on a filesystem. It does not allow correcting bad sectors, it shall only be used in case you restore/copy a partition with bad sectors on another hard drive. This is automatically done by program when restoring but in case where source and destination disks and partitions are identical: in this case program thinks it performs restoration on the saved partition and so does not reset bad sectors information.
So this option shall only be used in one case: the one where you got an "X" into the "Idem" column on restoring/copying even when disk is not the same as the source one.
Notes:
Support choice where bad sectors shall be removed | V Element choice where bad sectors shall be removed | V Confirmation | V Execution | V End
a) Support choice where bad sectors shall be removed:You have to choose disk, floppy disk or DOS/Windows/Linux devices list where filesystem to modify is.
b) Element choice where bad sectors shall be removed:You have to choose partition (if a disk was selected into first window) or DOS/Windows/Linux device (if DOS/Windows/Linux devices list was selected into first window) on which bad sectors information shall be removed.
c) Confirmation:Program asks for you confirmation of filesystem modifications. If you confirm, all bad sectors will be marked as valid back.
d) Execution:Filesystem modification is running. Depending on filesystem type and partition size this can need more or less time (faster being for ext2 partition and slower for FAT partitions).
This is the part that is executed when you use -e option or select it when the program asks you.
This option allows you navigating into a partition to copy or edit some of
its files.
Execution follows the diagram below when used with textual window interface:
Choice of support where partition to explore is | V Choice of partition to explore | V +---------------> Exploration window | | | +------------------+----------------------+ | | | | | V V V | View window Edit window Copy destination | | | | | | | V | | | Copy execution | | | | +-----+------------------+----------------------+When it is used with command line interface, part starting from "Exploration window" is replaced by a command line prompt allowing using commands described in chapter 19.h.
a) Choice of support where partition to explore is:You have to choose disk, floppy disk or DOS/Windows/Linux devices list where filesystem to explore is.
b) Choice of partition to explore:You have to choose partition (if a disk was selected into first window) or DOS/Windows/Linux device (if DOS/Windows/Linux devices list was selected into first window) you want to explore.
c) Exploration window:This window is the explorer window. It contains following items:
d) View window:This window is a simple hexadecimal viewer to view file content. Actions that can be performed in this viewer are:
e) Edit window:This window is a simple text editor. You can modify a file then save changes you made. This window is composed of:
f) Copy destination:This window permits you to choose where to copy selected files. In case you have selected one file that is not a directory, you can give it another name, else you can only give the directory where all files will be copied.
g) Copy execution:This window shows files being copied and encountered errors.
h) Execution in command line mode:When exploration is done with command line interface, you get a "> " prompt after having chosen partition or backup file to explore. From this prompt, you can execute several commands to read or modify content of explored partition. The prompt allows using following special keys:
Variables allow storing some value to reuse it later. A variable has a name composed of any characters less "=", "<", "%" and "+". Some variables are reserved and cannot be modified:Variables
When executing a command, this one can generate an error or not. This information can be used to decide what to perform after command execution. This can be automatically done through the error status or checked through the "if" instruction. The error status is used when a command ends with an error and can be set through the "onerror" command which has several options:Error status
A script is a text file containing commands to execute. There shall be one command per line (empty lines and lines starting with ";" are ignored).Scripts
Functions are a list of instructions that can be called with some arguments. Functions are declared through "func <function name>" and ends at first "endfunc" instruction. They can be called though "fcall" instruction followed by function name and its arguments. A function remains local to the script where it is declared.Functions
A label is a point of a script that can be reached through the "goto" instruction. It allows performing jump to avoid executing some part of a script or on contrary to loop over a part of a script (for this last case it shall be a "goto" done from "if" instruction or there shall be some other jump to go outside of the loop to not end in infinite loop execution). You can jump to a label that is still not declared in which case, all instructions until declaring this label are ignored less label and function declarations.Labels
When an instruction is executed, it is performed from a point in the directory tree called current directory (if you list directory content without providing some directory name, it will be content of this current directory). Because of the way exploration is done, there is two current directories notion:Current directory
scd 0:\a_directory ; From this point both explored partition and standard filesystem current ; directories are "a_directory" on explored partition ecd a_subdir ; Both are now "a_directory\a_subdir" scd .. ; Both are "a_directory" again scd C:\ ; Explored partition current directory is still "a_directory" and filesystem ; current directory is "C:\" ecd a_subdir ; Only explored partition's current directory has been modified to ; "a_directory\a_subdir"
This chapter describes all commands that can be used during exploration. In these descriptions:Commands
Command | Arguments/Description/Example |
asfilename | [-k] <string> |
Transform the string such as some specific characters will be considered as
valid in a filename (" ", "<", ">", "[", "]", "?", "*", "/", "\", ":",
characters before " " and characters after "~").
In case "-k" is used, path separator characters ("\", "/" and ":") are kept as such. A typical use of this command is to avoid some filename containing a space to be interpreted as being two arguments when being used with other commands. |
|
;---------- asfilename a file with spaces ;----------Outputs "a<20>file<20>with<20>spaces". |
|
asstring | <string> |
Transform the string such as the specific characters are set back to ASCII
(reverse operation of "asfilename").
In case a character matches an UTF-16 one, a warning is displayed and this character is replaced by "_". |
|
;---------- asstring a<20>file<20>with<20>spaces ;----------Outputs "a file with spaces". |
|
[es]call | <script> <argument>* |
Read the given <script> on explored partition or system directory and
executes it with using the given arguments. When the script returns, execution
continues unless scripts ends with the "exit" or "quit"
instruction.
Called script gets all variables that exist in caller less those corresponding to caller's argument and those declared as local. Variables that are set or modified during script execution are not retrieved by caller. The same applies for the error status and for current directory. |
|
;---------- ecall my_script.txt first second ;----------Reads the "my_script.txt" file and executes it with "first" and "second" as arguments. |
|
[es]cat | [-i|-c] <file>+ |
Display the given <file>. In case several files are given, they are
displayed one after the other. Filename can contain some wildcard characters in
which case all matching files are displayed (order is directory order). Binary
files are displayed in hexadecimal form. Options are used in case of wildcard
match and are:
|
|
;---------- ecat file1.txt file2.txt ;----------Displays content of "file1.txt" and "file2.txt" files. |
|
[es]cd | [<directory>] |
Displays name of the explored partition's current directory ("ecd") or of the standard filesystem's current directory ("scd") if no directory name is given or change explored partition's current directory or standard filesystem's current directory to the given one. | |
;---------- ecd ;----------Displays name of current directory of explored partition. ;---------- scd system ;----------Changes standard filesystem's current directory to "system" sub-directory. |
|
[es]cp | [-a|-i|-c|-d|-f|-k|-s|-p|-r|-v|-8.3|-asc|-lfn|-u16] <source path>+ <destination path> |
Copy <source path> to <destination path>.
"ecp" copies files from explored partition to standard filesystem and
"scp" copies files from standard filesystem to explored partition. With
"ecp" you can copy files from explored partition to itself with using
the explored partition mount point.
In case name of only one file is given into <source path>, <destination path> can be name of a file (copy with renaming) or of a directory (copy to this directory). In case there is several <source paths>, or it contains wildcard characters or it is a directory name, <destination path> shall be a directory:
|
|
;---------- ecp *.txt . ;----------Copies all files with ".txt" extension to current directory of standard filesystem. ;---------- ecp a_file.ext 0:\ ;----------Copies "a_file.txt" file to root directory of explored partition (if this one is mounted as "0:"). ;---------- scp to_explored_root.txt \ ;----------Copies "to_explored_root.txt" file to root directory of explored partition. |
|
[es]dir | [-on|-oe|-od|-os|+on|+oe|+od|+os|-tb|-tc|-td|-tf|-tl|-tp|-ts|-i|-c|-p|-s]* <path>* |
Display list of files given into "<path>".
"edir" lists files on explored partition and "sdir" lists files
on standard filesystem. If no "<path> is provided, current
directory is used. "<path>" can contain some wildcard characters.
Options are:
|
|
;---------- edir ;----------Displays content of current directory on explored partition. ;---------- sdir -p -tf -td firstdir/* seconddir/*.txt ;----------Displays all files and directories from "firstdir" and those ending by ".txt" in "seconddir". ;---------- set CURDIR_LIST<edir -s ;----------Sets into "CURDIR_LIST" variable content of current directory with ensuring each whitespace separated word is the name of a file. |
|
dispsize | |
Update screen size program uses. If LINES or COLUMNS environment variables are defined, it uses them else it detects current screen size. This is useful with command having "-p" option to display output per page for this length to be correctly managed. | |
;---------- dispsize ;----------Detects current screen size and use it. ;---------- set COLUMNS=100 set LINES=50 dispsize ;----------Uses a screen size of 100 rows and 50 lines. |
|
echo | <expression> |
Displays "<expression>". | |
;---------- echo %COLUMNS% %LINES% ;----------Displays value of "COLUMNS" and "LINES" environment variables. |
|
end | [<end code>] |
Ends current script and comes back to caller. If <end code> is not provided or is 0, script ends without error else it ends with an error (but error status treatment is not performed at its level but at its caller level). <end code> value cannot be retrieved by caller (only if it is equal to 0 or not). | |
;---------- end ;----------Ends script without error. ;---------- end 1 ;----------Ends script with an error. |
|
exit | [<exit code>] |
Exits program. If <exit code> is not provided or is 0, program ends without error else it ends with an error (but error status treatment is not performed). | |
;---------- exit ;----------Exits program without error. ;---------- exit 1 ;----------Exits program with an error. |
|
expr | <expression> |
Computes "<expression>" and displays result. An expression
can be:
|
|
;---------- expr 3 or 0 ;----------Displays 1. ;---------- expr 4 + 5 ;----------Displays 9. ;---------- expr aaa - bbb ;----------Displays -1. ;---------- expr aaa < bbb ;----------Displays 1. ;---------- set FIRST<expr 4 + 5 expr %FIRST% * 10 ;----------Displays 90. |
|
fcall | <function> <arguments>* |
Calls the given function with the arguments. The function shall already have been defined into current script. <arguments> are a list of spaces or tabulations separated words. In case you want to have spaces or tabulations in an argument you have to replace them with <20> or <09> or use "asfilename" command on it (and use "asstring" inside function to decode it). | |
;---------- fcall a_function ;----------Executes "a_function" function. ;---------- set DIR_CONTENT<edir -s fcall treat_list %DIR_CONTENT% ;----------Calls "treat_list" function with content of current directory with ensuring whitespaces are correctly managed on filename. |
|
func | <function name> |
Defines a function named "<function name>". No function having this name shall have already been defined in current script. Function definition extends until the first "endfunc" instruction. It can contain any kind of command less definition of another function. | |
;---------- func print_hello echo hello endfunc ;----------Defines a function that just displays "hello". |
|
goto | <label name> |
Continues execution at label named "<label name>". If label has already been defined, execution continues from it else program waits for its definition. If script or function ends without this label to be defined, it is an error. | |
;---------- goto label echo Not displayed :label ;----------Continues execution from "label" label and so "Not displayed" is not displayed. |
|
help | [<command>] |
Displays a summary of all commands if no "<command>" is provided else displays "<command>" options. | |
;---------- help ;----------Displays summary of all commands. ;---------- help if ;----------Displays help of "if" command. |
|
if | [not] <condition> <command> |
Execute the "<command>" if "<condition>" is true (or
false if it is preceded by "not").
"<command>" can only be a single command different from label or function definition. If you want to perform several commands you have to use the "goto", "fcall", "scall" or "ecall" command. "<condition>" can be:
If you want to perform complex conditions, you will have to split them on several "if" commands with using "goto" command. |
|
;---------- if error exit ;----------Exits program if previous command ends with an error. ;---------- if exist COLUMNS goto set_size if not exist LINES goto do_not_set_size :set_size dispsize :do_not_set_size ;----------Force screen size update in case either COLUMNS or LINES variable is defined. |
|
local | <variable name>+ |
Define <variable name> variable as local: any change to this variable following this command will not be visible to function caller and any call to another function or script from this point in function will not get this variable. | |
;---------- func var_management echo %A_VARIABLE% set A_VARIABLE=set back to caller local A_VARIABLE set A_VARIABLE=no more modified for caller fcall another_function endfunc ;----------This function displays value of "A_VARIABLE" variable then modifies it before declaring it as local. For caller of this function, variable "A_VARIABLE" will have "set back to caller" value when calls of this function ends. When this function calls "another_function", this one will not see the "A_VARIABLE" variable. |
|
[es]mkdir | <directory> |
Creates <directory> directory on explored partition ("emkdir") or on standard filesystem ("smkdir"). | |
;---------- emkdir a_subdir ;----------Creates "a_subdir" directory in current directory of explored partition. |
|
[es]more | [-i|-c] <file>+ |
Display the given <file> with pausing between each screen display.
In case several files are given, they are
displayed one after the other. Filename can contain some wildcard characters in
which case all matching files are displayed (order is directory order). Binary
files are displayed in hexadecimal form. Options are used in case of wildcard
match and are:
|
|
;---------- emore file1.txt file2.txt ;----------Displays content of "file1.txt" and "file2.txt" files. |
|
mount | |
Mount a new partition under a drive number. Partition to mount is interactively asked. | |
;---------- mount ;----------Starts request to mount a new partition. |
|
emount | |
Displays drive number under which explored partition is mounted. | |
;---------- emount ;----------Displays "0:" (on DOS/Windows) or "//0" (on Linux) if no other partition was mounted before explored one. |
|
smount | |
List all available drives. | |
;---------- smount ;----------Displays C: [...] 0: [...] on DOS/Windows or / [...] //0 [...] on Linux (the [...] parts being remaining list of drives). |
|
onerror | continue|end|exit|goto <label>|return |
Defines the behaviour in case an error is encountered:
|
|
;---------- onerror end ;----------Sets that the script shall be ended in case of error. |
|
printcmd | none|read|exec|both |
Prints commands that will be executed or stop printing them:
|
|
;---------- printcmd exec [...] printcmd none ;----------Prints all commands present in "[...]" then stop printing them. |
|
quit | [<exit code>] |
Exits program. If <exit code> is not provided or is 0, program ends without error else it ends with an error (but error status treatment is not performed). | |
;---------- quit ;----------Exits program without error. ;---------- quit 1 ;----------Exits program with an error. |
|
return | [<exit code>] |
Exits function or script if not inside a function. If <exit code> is not provided or is 0, function ends without error else it ends with an error (but error status treatment is not performed at its level but at caller's level). | |
;---------- return ;----------Exits function without error. ;---------- return 1 ;----------Exits function with an error. |
|
[es]rm | [-i|-c|-f|-k|-p|-r|-v]* <file>+ |
Removes <file> files and directories on explored partition ("erm") or
standard filesystem ("srm"). Name of files can have some wildcard
characters. A directory can be removed only if it is empty unless the "-r"
option is used. Options are the following:
|
|
;---------- erm -f *.tmp ;----------Removes all files ending with ".tmp" on current directory of explored partition without requesting confirm. |
|
set | [<variable name>[[+]=<variable value>]|[[+]<<command>]] |
Sets or displays value of an environment variable. If no <variable name>
is given, it displays all variables value. If a <variable name> is given
without value or command, it displays value of this variable. If <variable name>
is followed by
|
|
;---------- set A_VARIABLE=hello set A_VARIABLE ;----------Sets "hello" into "A_VARIABLE" then displays it. ;---------- set A_VARIABLE+<asstring <20>world ;----------Executes "asstring <20>world" and appends its output (" world") to "A_VARIABLE" (using "asstring" instead of "echo" is to be able to get space at begin else it would have been discarded by "echo" command). ;---------- set A_VARIABLE+=! ;----------Appends "!" to "A_VARIABLE" (so this one is now "hello world!"). |
|
shift | [<shift number>] |
Removes the first <shift number> script or function arguments and shift following ones accordingly. In case no <shift number> is given, it shifts one argument. In case <shift number> is bigger than number of arguments, all are shifted (so there is no more any argument). "@" and "#" variables are updated accordingly. | |
;---------- func shift_args shift echo %1% shift 3 echo %1% echo %@% endfunc ;----------If function "shift_args" is called with "one two three four five six", it displays "two", then "five" and "five six". |
|
shiftvar | <variable name> [<shift number>] |
Split value of variable <variable name> into whitespace separated words, removes the first <shift number> ones with displaying them and sets remaining ones into value of <variable name>. If <shift number> is not given, first word is removed. In case <shift number> is bigger than number of words in value of <variable name>, all are displayed and variable is empty. | |
;---------- set A_VARIABLE=one two three four five shiftvar A_VARIABLE 2 ;----------Displays "one two" and "A_VARIABLE" is "three four five". |
|
[es]tofile | <file>([[+]=<content>]|[[+]<<command>]) |
Writes <content> or output of <command> into <file>. In case <file> already exists, it is overwritten. If <content> is preceded with "+=" instead of "=" or <command> is preceded with "+< instead of "<", <content> or output of <command> is appended at end of <file> (if it does not exist, it is created). | |
;---------- etofile out.txt=hello ;----------Writes "hello" into file "out.txt" of current directory on explored partition. ;---------- etofile out.txt+<asstring <20>world ;----------Appends " world" at end of file "out.txt". |
|
unset | <variable name> |
Remove definition of the variable <variable name>. Value of this variable is no more available and trying to use it generates an error. | |
;---------- unset A_VARIABLE ;----------Remove definition of "A_VARIABLE". |
This is the part that is executed when you use -v option or select it when the program asks you.
This option allows you navigating into the content of backup files such as you can extract some files. It does not allow modifying file content.
Files that can be explored are all those containing either a disk (you have to select a partition), or the backup of a partition with a FAT12/16/32, NTFS or ext2/3/4 filesystem. If backup was made in several files, all files shall be readable at the same time. Files can be compressed or not.
Execution is the same as for chapter 19 but with the a) and b) steps replaced with ask and check of all backup files (similar to chapter 10).
Notes:
This is the part that is executed when you use the -g option or select it when the program asks you.
This option allows you to change the partition used to boot your computer. It can be needed in case you copied the content of your boot partition from one partition to another.
Execution allows choosing the disk where you want to update partitions table then partition you want to set as boot one. Execution follows the diagram below:
Choice of disk where partitions table is | V Boot partition choice | V Confirmation | V End
a) Choice of disk where partitions table is:You have to choose disk where you want to update partitions table to change boot partition. In most cases, it is first fixed disk unless you have some boot manager that allows changing boot disk.
b) Boot partition choice:This window gives you the list of main partitions on the chosen disk (only main partition can be boot one) and inform you of the current boot partition. You have to select the one you want to use as boot partition.
c) Confirmation:The program asks for you confirmation of partitions table modification. You can have a specific message in case chosen partition is a main partition declaring extended ones, as it is not expected to have this kind of partition as boot one as it does not contain directly a filesystem.
22- Create files marking drive to use
This option allows creating marking files that can be used with "-fp",
"-fd" or "-ff" options. These files are some standard empty
files or files containing options (with same format than for options file) that
are used by program to retrieve a partition on backup/restore. This is a
workaround to the fact that drive name can be different depending on used OS
(this means that the C:\ drive within DOS can be different from the C:\ drive
within Windows). You have to provide a unique file name among all partitions
(for a given directory) such as the partition where this file is can be
identified.
Running of this option is done in three steps:
Once these files have been created, you can use the program on another OS with following command line: "savepart -fp <name of first file> -ff <name of second file>. In both cases, name shall not contain a drive name ("marker.par" and not "C:\marker.par"). It will scan all partitions to find these two files and all drives for second file (in case it is on a CD). If it finds only one occurrence of each file, it asks you to confirm the found place (unless you used the "-fnc" option) then perform backup or restore depending on what you request to do. If it does not find one of the files or find one on more than one partition, it does nothing with asking you to fix this first.
Notes:
23- Load an options or marker file
This option allows you to load an options file if you did not used the "-f" option on command line or a marking file if you did not used the "-fp", "-fd" or "-ff" option. Once this option has been used, you come back to the screen to select what you want to perform.
First window requests you what you want to load depending on which option
you already provided (so if you used the "-f" option or already loaded
the options file, this option will no more appear in list, but options to give
marker files will still appear).
If you choose one of the marker file options, you can enter its name without
its drive name (as "marker.par", not "c:\marker.par").
Program will not search it at once, but only when it needs it (so do not be
surprised if it does not complain at once if it does not find it).
If you choose option to load options file, you can select it. You
can see its content to check it with the "View file" button.
When loading file through this option, following options are ignored:
The options file allows you to restore (or save again) element you have saved.
When using savepart with the -f <options file name>
option, the various parameters are read from the file instead of
being asked of you. Contents of this file can be partial (not covering all the options, in which
case missing parameters will be asked), but in this case some rules described
below must be followed.
The options file is a text file that allows options to be specified. Each option must be
alone on a line.
If the line begins with ";", its a comment line (it is not analysed).
Option content can be defined with an environment variable. In that case, the environment variable must be given between % (example:
file=%CONF%.PAR, %CONF% will be replaced by the content of the CONF
environment variable). If the environment variable does not exist, an error will be
generated. To be able to give the % character inside option contents, you
have to double it (example: file=WITH%%.PAR, the file name would be
WITH%.PAR).
Options have <option name>=<option value> format. Name and value of each option are the following:
Option | Values | Default value |
mouse | yes|no|poll | yes |
Choice of the method of using the mouse (same as -cm|-nm|-pm option on
command line). Please read command line option description to get more details. |
||
check_drive | yes|no | yes |
Verification that created/read file is not on saved/restored
element is disabled when set to "no" (same as -ncd option on
command line). Please read command line option description to get more details. |
||
verify_free_size | yes|no | yes |
Verification of free remaining size on destination drive is not done when set
to "no" (same as -ncs option on command line). Please read command line option description to get more details. |
||
verify_disk_write | yes|no | yes |
Verification that sectors are correctly written is disabled when set to
"no" (same as -nvd option on command line). Please read command line option description to get more details. |
||
verify_file_write | yes|no | yes |
Verification that files are correctly written is disabled when set to
"no" (same as -nvf option on command line). Please read command line option description to get more details. |
||
test_disk_size | yes|no|<number> | no |
This option allows trying to detect disk size if it is set to "yes" (same as -tds option on command line). Please read command line option description to get more details. If a number is given, it is number of disk for which trying to detect disk size. In this case, this option can be given several times with different numbers. |
||
lang | en|fr|fr_2 | automatic detection |
Language choice (same as -l option on command line). Please read command line option description to get more details. |
||
utf8 | yes|no | automatic detection |
Forces use or not use of UTF-8 terminal capability in Linux version. | ||
user_interface | console|text|text_bios|text_ext|text_bios_ext | text |
User interface choice (same
as -cui|-tui|-bui|-tuix|-buix option on command line). Please read command line option description to get more details. |
||
no_crc | yes|no | no |
Disable check of backup file checksum (same as -nocrc option on command line). | ||
no_root | yes|no | no |
Disable check if user has administrator's rights (same as -noroot option on command line). | ||
hiber | warn|exit|ignore | warn |
What to perform if an hibernated operating systems is found (same as -hiber option on command line). | ||
disk | <number> | asked to user |
Gives the disk number to use. This number must be between
zero and the number of disks minus one. When saving, this option replaces the first
window. When restoring, this option restricts the search of elements to be restored, to elements of the given disk (otherwise, the
element is searched for on all the disks). When updating Windows 2000/XP/Vista/Seven
registry or updating boot configuration data, this option replaces the choice
of the second disk (the one that contains partition to update). When updating
BOOTSECT.DOS/BOOTSECT.BAK files, this option replaces the choice of support
where these files are.
This option cannot be given if "floppy", "device", "raw_file" or "new_raw_file" option is given. |
||
floppy | <number> | asked to user |
Gives the floppy drive number to use. This number must be between
zero and number of floppy drives minus one. When saving, this option replaces the first
window. When restoring, this option restricts the search of elements to be restored, to elements of the given floppy drive (otherwise, the
element is searched for on all floppy drives). When updating
BOOTSECT.DOS/BOOTSECT.BAK files, this option replaces the choice of support
where these files are.
This option cannot be given if "disk", "device", "raw_file" or "new_raw_file" option is given. |
||
device | DOS/Windows: A-` Linux: <block device> |
asked to user |
Gives the DOS/Windows device letter or Linux device file to use. When saving,
this option replaces the first two windows. When restoring, this option restricts
the search of elements to be restored, to elements of the given device (otherwise,
element is searched for on all DOS devices). When updating
BOOTSECT.DOS/BOOTSECT.BAK files, this option replaces the choice of support
where these files are.
This option cannot be given if "disk", "floppy", "raw_file" or "new_raw_file" option is given. |
||
raw_file | <filename> | asked to user |
Gives name of raw file to use. When saving, this option replaces the two first
windows. When restoring, this option reduces search for items to restore that
correspond to saved one, to given file with expecting it to already exist for it
to be updated. When updating BOOTSECT.DOS/BOOTSECT.BAK
file, this option replaces search for support where these files are. This option cannot be given if "disk", "floppy", "device" or "new_raw_file" option is given. |
||
new_raw_file | <filename> | asked to user |
Gives name of raw file to use. When saving, this option replaces the two first
windows. When restoring, this option reduces search for items to restore that
correspond to saved one, to given file with creating or overwriting it.
When updating BOOTSECT.DOS/BOOTSECT.BAK
file, this option replaces search for support where these files are. This option cannot be given if "disk", "floppy", "device" or "raw_file" option is given. |
||
main_part | <number> | asked to user |
Gives the number of the main partition to
use. This number must be between 1 and 4 for MBR partitions table, 1 and
4294967295 for GUID partitions table. If the element to save/restore is
directly related to a disk, this option must not be given.
For this option to be used, "disk" or "raw_file" option must be given. For the case of "raw_file", if the file content is not a partitioned disk, this option will be silently ignored. |
||
ext_part | <number> | asked to user if "main_part" not given, 0 else |
Gives the number of the extended partition to use.
This number must be between 1 and the number of extended partition
corresponding to main partition. It can be used only in case of MBR partitions
table.
For this option to be used, "main_part" option must be given. You do not have to give this option if you want to save a main partition. The pair of options "main_part" and "ext_part" replaces the second window when saving, and the set "disk", "main_part" and "ext_part" replace the second window when restoring. When updating Windows 2000/XP/Vista/Seven registry or updating boot configuration data, "main_part" and "ext_part" replace the choice of the second partition (the one to update). When updating BOOTSECT.DOS/BOOTSECT.BAK files, these options replace the choice of partition where these files are. |
||
only_if_same | yes|no | no |
This option allows considering destination support as valid only if it is identical with saved support (when choosing destination support it has an "X" into "Idem" column). This allows avoiding error when using option file in case something was modified (as some partitions were added/removed since saving which modifies partition numbering). | ||
def_level | <number> | asked to user if "file" not given, 0 else |
Gives the compression level to use. This number must be between 0 and 9. When saving, this option replaces the third window. When restoring, this option is not used (hence can be omitted). If this option is not given and a file name is given (see "file" option below), compression level used is level 0 (no compression). | ||
file | <file name> | asked to user |
Gives the file to use to save/restore element. This option can be given several times in case saving/restoring need several files. In this case, options must be given in order you want files to be used. | ||
max_size | <number> [kB|MB] or max | asked to user if "file" not given, 2047 MB else |
Gives the maximum size that a file can be. If kB|MB is not given, size is in MB. If size is in kB, it must be between 1 and 9999 kB, if it is in MB it must be between 1 and 2047 MB. If "max" is used as value, the program will use minimum between drive free space and 2047 MB. This option can be given several times if saving/restoring needs several files. In this case this option must be given in the same order as file names are given. If this option is given less time than number of file names, the last option will be used for all remaining files. If this option is given more times than number of file names, remaining options will not be used. If this option is not given and some file names are given, maximum size of 2047 MB is used. When restoring this option is not used (hence can be omitted). | ||
check_files_exist | yes|no | no |
This option allows checking that all files needed to restore a backup exist. This avoids getting an error in the middle of the process in case a file is missing. This option cannot work in case files are on some removable media. | ||
filesystem | no|fat12|fat16|fat32|ext2|ntfs|MBR|firstsect|parttable|
fat12mem|fat16mem|fat32mem|ntfsmem|ext2mem| fat12swap|fat16swap|fat32swap|ntfsswap| fat12memswap|fat16memswap|fat32memswap|ntfsmemswap |
asked to user if several choices are available ("no" else) |
Gives the filesystem type to use when saving. If this parameter is equal to
"no", all sectors are saved without considering filesystem that is on
the partition. If this parameter is equal to one of the others possibilities, the
program checks that partition to save corresponds to the filesystem of the asked type.
If this is the case, only occupied sectors will be saved. Otherwise,
an error is displayed.
The options fat12mem, fat16mem, fat32mem, ntfsmem and ext2mem allow saving only occupied sectors, while authorising that the backup file created can be on the saved partition. The options fat12swap, fat16swap, fat32swap and ntfsswap allow saving only occupied sectors without saving the swap files contents. The options fat12memswap, fat16memswap, fat32memswap and ntfsmemswap put together the features of both <xxx>mem and <xxx>swap options. When restoring, this option is not used (the value defined inside the backup file is used). |
||
swap_dir | <path name> | asked to user |
This option allows giving the directory where swap files are located. It is used only when saving and when requesting to not save swap files. <path name> must be the path name from the partition root directory without a drive letter (example: "\" for root directory, "\WINDOWS" for WINDOWS directory). As with the window which requests this information, the program searches for swap files in the root directory also. | ||
quit | yes|no|nobadsector | no |
This option permits to exit program automatically. If it is equal to "yes", program exits at end of saving/restoring/copying (be aware that in the case of saving, if one of the options used from option file has been modified, the window asking if you want to create options file will still appear). It this option is equal to "nobadsector", program will exit only if no bad sectors have been found (otherwise, user can read errors list on screen, then click "Ok" button). If this option is equal to "no" or is not given, user has to click "Ok" button to exit. | ||
reboot | yes|no | no |
This option allows rebooting computer automatically at end of program execution. It is active only when saving or restoring a partition (copying does not take an option file and it is not useful to reboot computer in others cases). If the "quit" option is equal to "no", or "nobadsector" with some errors, or is not given, program will reboot only after the user has clicked on the "Ok" button. If the "quit" option is equal to "yes", or "nobadsector" without any errors, reboot will be done immediately. | ||
automatic_naming | yes|no | asked to user if "file" not given, "no" else |
This option allows using automatic naming. If no "file" option is given, this will only cause the automatic naming checkbox to be checked when asking for the first file name. If one or more "file" options are given, all these options will be first used and if more files are needed, the program will use the last file name, changing its extension with the file number following rules described in chapter 6.e (it does not verify whether the file already exists or not). | ||
nb_files | <number> | asked to user |
This option allows giving number of files to create when creating files on an NTFS drive with using automatic naming. Number must be between 1 and 1000. | ||
windows_disk | <number> | asked to user |
Gives the disk number where Windows is installed. This option is equivalent to the "disk" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give disk number where Windows is installed (see chapter 11.a). | ||
window_main_part | <number> | asked to user |
Gives the main partition number where Windows is installed. This option is equivalent to the "main_part" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give main partition number where Windows is installed (see chapter 11.b). | ||
window_ext_part | <number> | asked to user if "window_main_part" not given, 0 else |
Gives the extended partition number where Windows is installed. This option is equivalent to the "ext_part" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give extended partition number where Windows is installed (see chapter 11.b). | ||
windows_floppy | <number> | asked to user |
Gives the floppy drive number where Windows is installed. This option is equivalent to the "floppy" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give floppy drive number where Windows is installed (see chapter 11.a). | ||
windows_device | DOS/Windows: A-` Linux: <block device> |
asked to user |
Gives the device letter/file where Windows is installed. This option is equivalent to the "device" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give device where Windows is installed (see chapter 11.b). | ||
windows_raw_file | <filename> | asked to user |
Gives the file where Windows is installed. This option is equivalent to the "raw_file" one but is used in the case of update of Windows 2000/XP/Vista/Seven registry to give device where Windows is installed (see chapter 11.b). | ||
window_dir | <string> | asked to user |
Gives the directory where Windows is installed (see chapter 11.c). | ||
part_letter | A-` | asked to user |
Gives drive letter that should be modified in the registry for the chosen partition (see chapter 11.f). | ||
boot_disk | <number> | asked to user |
Gives the disk number where Windows Vista/Seven boot configuration data are. This option is equivalent to the "disk" one but is used in the case of update of Windows Vista/Seven boot configuration data to give disk number where these data are (see chapter 12.a). | ||
boot_main_part | <number> | asked to user |
Gives the main partition number where Windows Vista/Seven boot configuration data are. This option is equivalent to the "main_part" one but is used in the case of update of Windows Vista/Seven boot configuration data to give main partition number where these data are (see chapter 12.b). | ||
boot_ext_part | <number> | asked to user if "boot_main_part" not given, 0 else |
Gives the extended partition number where Windows Vista/Seven boot configuration data are. This option is equivalent to the "ext_part" one but is used in the case of update of Windows Vista/Seven boot configuration data to give extended partition number where these data are (see chapter 12.b). | ||
boot_floppy | <number> | asked to user |
Gives the floppy drive number where Windows Vista/Seven boot configuration data are. This option is equivalent to the "floppy" one but is used in the case of update of Windows Vista/Seven boot configuration data to give floppy number where these data are (see chapter 12.a). | ||
boot_device | DOS/Windows: A-` Linux: <block device> |
asked to user |
Gives the device letter/file where Windows Vista/Seven boot configuration data are. This option is equivalent to the "device" one but is used in the case of update of Windows Vista/Seven boot configuration data to give device letter where these data are (see chapter 12.b). | ||
boot_raw_file | <filename> | asked to user |
Gives the image file where Windows Vista/Seven boot configuration data file is. This option is equivalent to the "raw_file" one but is used in the case of update of Windows Vista/Seven boot configuration data to give device letter where these data are (see chapter 12.b). | ||
boot_BCD_file | <string> | \Boot\BCD or \EFI\Microsoft\Boot\BCD or asked to user |
Gives the name of the file that contains Windows Vista/Seven boot configuration data (see chapter 12.c). | ||
boot_entry | <string> | asked to user |
Gives the name of boot entry to update when updating Windows Vista/Seven boot configuration data (see chapter 12.e). | ||
source_disk | <number> | asked to user |
Gives the disk number where element to copy is. This option is equivalent to the "disk" one but is used in case of copying an element to give source of copy (see chapter 8.a). | ||
source_main_part | <number> | asked to user |
Gives the main partition number to copy. This option is equivalent to the "main_part" one but is used in the case of copying an element to give source of copy (see chapter 8.b). | ||
source_ext_part | <number> | asked to user if "source_main_part" not given, 0 else |
Gives the extended partition number to copy. This option is equivalent to the "ext_part" one but is used in the case of copying an element to give source of copy (see chapter 8.b). | ||
source_floppy | <number> | asked to user |
Gives the floppy drive number to copy. This option is equivalent to the "floppy" one but is used in the case of copying an element to give source of copy (see chapter 8.a). | ||
source_device | DOS/Windows: A-` Linux: <block device> |
asked to user |
Gives the device letter/file to copy. This option is equivalent to the "device" one but is used in the case of copying an element to give source of copy (see chapter 8.b). | ||
source_raw_file | <filename> | asked to user |
Gives the raw file to copy. This option is equivalent to the "raw_file" one but is used in the case of copying an element to give source of copy (see chapter 8.b). | ||
dest_disk | <number> | asked to user |
Gives the disk number where to copy element. This option is equivalent to the "disk" one but is used in case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_main_part | <number> | asked to user |
Gives the main partition number that is destination of copy. This option is equivalent to the "main_part" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_ext_part | <number> | asked to user if "dest_main_part" not given, 0 else |
Gives the extended partition number that is destination of copy. This option is equivalent to the "ext_part" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_floppy | <number> | asked to user |
Gives the floppy drive number that is destination of copy. This option is equivalent to the "floppy" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_device | DOS/Windows: A-` Linux: <block device> |
asked to user |
Gives the device letter/file that is destination of copy. This option is equivalent to the "device" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_raw_file | <filename> | asked to user |
Gives the raw file that is destination of copy. This option is equivalent to the "raw_file" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
dest_new_raw_file | <filename> | asked to user |
Gives the raw file that is destination of copy. This option is equivalent to the "new_raw_file" one but is used in the case of copying an element to give destination of copy (see chapter 8.d). | ||
mount | <drive number>:<disk number>/<main partition
number>,<extended partition number>
or DOS/Windows: <drive number>:<device letter> Linux: <drive number>:<block device> |
asked to user |
Allows defining mounting options of a partition or a device.
In first syntax, the first number is the drive number used to identify mounted partition, it must be between 0 and 2147483647. The second number is the disk number on which partition to mount is, it must be between 0 and number of disks - 1. The third number is the main partition number of partition to mount, it is between 1 and 4 for a MBR partitions table and between 1 and 4294967295 for a GUID partitions table. The last number must not be given for a main partition (if it is omitted, the colon before must be also) and is the extended partition number where the main partition is a logical partition, it must be between 1 and 255. In second syntax, disk and partitions numbers are replaced with the drive letter/device file of the device to mount. The drive number must be unique and a partition can only be mounted with one number. When a mount is defined, the "file" option can use this number to define a file name. Example: mount=0:0/1 mounts as 0: the first main partition of the first disk, mount=10:3/2,2 mounts as 10: the second extended partition in the second main partition of the forth disk, file=0:\DISK_C.PAR (or FILE=//O/DISK_C.PAR for Linux version) defines a file that is on the partition mounted by the first mount. |
||
gmt | <hours>h<minutes> | automatic detection |
This option permits setting difference between your hour and GMT hour (example:
1h00 in France in winter). It is used when writing file to NTFS partition
because this one stores file modification time in GMT time. This option is not
mandatory, it only avoids having some file modification time in future or past. Automatic detection cannot be performed in DOS version, in this case 0 is used. |
||
ask_first_media | yes|no | yes |
When saving to a removable media, program asks for next support for each file even first one. With setting this option to "no", program will create the first file on current media without requesting anything. | ||
max_mem_size | <number> [kB|MB] | available memory |
This option allows reducing memory usage by program. It shall be used only when getting the "Error: could not allocate page table memory" error (mostly when exploring compressed backup). This limit is not absolute (program will use more memory than that in case of need), but allows reducing biggest buffers size. If you do not get the error, you do not need to use it, if you get the error, try with giving half the memory you have (reduce it or try to free some DOS memory if it is not enough). | ||
empty_files | yes|no | no |
When saving, this option allows program to empty the files it does not use in case "file" or "nb_files" (with automatic naming) are given. It does not request any confirmation before doing that and stop when all files are treated or at first error. This option allows knowing which files are used by saving and which are not. | ||
heads_sectors | default|standard|extended|parttable|<heads number>/<sectors number> | asked to user unless "fix_first_sector" or "fix_disk_number" is used |
When fixing physical definition of a disk on a boot sector, this option permits
to choose which values to use. Three first options
(standard|extended|parttable) are to use predefined values, the last option is
to give your own values (the number of heads and the number of sectors per
track). In case this option is not used and fix_first_sector or fix_disk_number option is used,
program updates first sector or disk number value only. In Windows and Linux versions, this option allows forcing number of heads and sectors per cylinder for a disk in case these definitions cannot be obtained with reading partitions table (that is the default behaviour). For this purpose numbers shall be given, not predefined values. In order to have similar behaviour between DOS, Linux and Windows, setting the value to "parttable" in DOS version will lead to use values obtained from partitions table for disk with extended access. This option allows also forcing the definition when using a raw file (default being to get them from partitions table). |
||
cylinders | default|parttable|[+]<cylinders number> | retrieved from physical definition |
This option is only to get similar definition between DOS, Windows and Linux versions.
It is mostly needed in DOS version because the BIOS could simulate hidden cylinders
that were needed with first disks for them to park the heads when disk is shutted
down. It allows forcing a value to number of cylinders to workaround this kind of
behaviour. If it is set to "parttable", value is obtained from the biggest
cylinder value read in partitions table. If it is set to a number, value is set
to given value. If the number is preceded with "+", the number is added
to default number (thus it could be "+1" to unhide last cylinder). This is used only for disks with extended access and raw files as number of cylinders is not important (this does not update disk size). For disk with standard access, you have to use the "test_disk_size" option instead such as program will check if it could access to the hidden cylinders instead of forcing it to a potentially wrong value. |
||
fix_first_sector | yes|no|<first sector number> | asked to user unless "heads_sectors" or "fix_disk_number" is used |
When fixing physical definition of a disk on a boot sector, setting this option
to yes or a value permits to correct the first sector value if it is wrong. When it is set to yes,
first sector value is deduced from partition's first sector else the given value
is used. In case this
option is not used and heads_sectors or fix_disk_number option is used, program updates
heads/sectors or disk number only. This option allows also forcing the definition when using a raw file that is considered as a device raw file. |
||
fix_disk_number | yes|no|<support number> | asked to user unless "heads_sectors" or "fix_first_sector" is used |
When fixing physical definition of a disk on a boot sector, setting this option
to yes or a value permits to correct the support number value if it is wrong. When it is set to yes,
support number value is deduced from kind of support (0 for removable, 128 for fixed) else the given value
is used. In case this
option is not used and fix_first_sector or heads_sectors option is used, program updates
first sector or heads/sectors number only. This option allows also forcing the definition when using a raw file that is considered as a device raw file. |
||
stdaccess | <number> | detection of type of access |
This option allows forcing use of standard access for disks that support both
access modes (disks of less than 8 GB). The
<number> allows giving disk number for which access mode shall be forced
(see "disk" option). This option can be given several times with
different disk numbers.
This option shall be carefully used and only in case of a disk found as using extended access but that does not support it (case of very old disks). Before using this option, it is better to check disks with partinfo.exe with and without "-s" option, then to try exploring a partition to check what program sees. This situation is in most cases bad. It shows that disk is badly recognised and that can lead to some loss of data, overlapping partitions, ... (moreover in case of using disk with several OS). It can potentially be corrected with changing disk parameters into BIOS, but this can lead to the loss of all data of this disk (it is better after such a change to destroy all partitions and create them again to be sure they are correctly defined). |
||
beep | yes|no|<number> | no |
This option allows emitting two close beeps at regular time (10 or <number> seconds) during saving/restoring when it is set to "yes" or "<number>" (same as using the -beep option on command line). If your attention is requested a single beep is emitted (as when option is set to "no"). When saving/restoring ends 3 beeps (or 4 in case of problem) are emitted (warning: you still need to end program if you did not used the "quit=" option for it to flush data on disk). | ||
log_file | <file name> | asked to user |
Gives the name of file to use to store error messages. In case this option is not given, it is requested to user when it checks the corresponding option on backup file name request. You can read chapter 29 to get more details on this log file. | ||
explore_script | <filename> | none |
When exploring a partition or a backup, executes <filename> file at start of exploration as a script. All commands described into chapter 19.h are available. In case the script ends with the "exit", "quit" command or if the options file uses the "quit" option, program is ended at end of execution of script, else interactive exploration is started. |
Remarks:
With taking the partitioning presented in the example of saving a partition, and with assuming the backup of all sectors of the partition corresponding to D: drive, the obtained batch file will look like (assuming that two backup files are needed):
;-------------------------------
; Parameters for D: drive ; On the first disk disk=0 ; Main partition 1 main_part=1 ; No compression ; (remark: in this case this option can be omitted) def_level=0 ; Files: file=c:\driv_d_1.par file=c:\driv_d_2.par ; Same size for all files ; (remark: in this case the second line can be omitted) max_size=620 max_size=620 ; All sectors are saved filesystem=no ; End of file ;------------------------------- |
The file below will permit you to save/restore the Linux partition (all sectors of this partition):
;-----------------------------------
; Parameters for Linux partition ; On the first disk disk=0 ; Main partition number 3: main_part=3 ; Standard compression: def_level=6 ; File: file=c:\linux.par max_size=2047 ; All sectors are saved filesystem=no ; End of file ;------------------------------- |
If you have two disks where the first one has a partition format that is not recognised by savepart, you can use the following file to force the program to only use the second hard drive:
;-------------------------------
; Partition format of the first disk not recognised ; => force using only the second one disk=1 ; End of file ;------------------------------- |
To modify the registry automatically, you have to give all the options which define the element to be modified and the element where Windows is installed. As an example:
;-----------------------------------
; Modification of registry for logical partition on second disk while ; Windows is installed on the first partition of first disk. ; Parameters for Windows installation windows_disk=0 windows_main_part=1 windows_dir=windows ; Parameters for partition definition to be modified in the registry disk=1 main_part=2 ext_part=1 part_letter=G ; End of file ;----------------------------------- |
Mounting a partition allows accessing partitions that cannot be used from
OS. Instead of using a drive letter or mount point as for OS, mounted partitions get a drive
number that can be used in the same way. As an example, to
access DISK_C.PAR file that is on first mounted partition (that has the 0
number), you have to use "0:\DISK_C.PAR" (mount number followed with
":") for DOS and Windows versions or //0/DISK_C.PAR (two
"/" followed by mount number) for Linux one.
Mounting process is similar to saving partition choice process: you have
to first choose the disk where partition to mount is, then partition itself.
Once this is done, and if filesystem on this partition is recognised, this
partition gets a drive number that is unique. If you try to mount a partition
several times, you always will get the number it was mounted under at first
time.
Recognised filesystem are NTFS, FAT and ext2/3/4 filesystems. Mounting a
NTFS partition allows modifying its files, but does not allow creating
or erasing files. Mounting a FAT or ext2/3/4 partition allows creating files on
them (not for ext2/3/4 partitions using binary tree sorted directories).
Mounting a damaged partition allows accessing it in read-only mode.
On ext2/3/4 partitions, symbolic links are displayed as files, but cannot be read
or followed.
When you mount a partition to modify its files, you must let the program
end by itself for it to be able to synchronise the filesystem with modifications
you perform. For example, do not reboot immediately when saving has ended, but click on
'Ok' button, create (or not) the configuration file and wait for the program to end.
Notes:
26- Notes on what elements can be saved
This chapter describes some points specific to each type of element that can be saved. It describes in particular restrictions that are checked by program when restoring an element.
a) The complete disk:This is about saving/restoring the whole disk without taking into account its organisation.
When saving you should not create the backup file on one of the partition of the disk, else you are likely to have incoherence when restoring.
When restoring you should not use files that are on this disk as it is entirely rewritten and so files would be erased before they were completely read (so restoring will end with an error and files will be lost). Restoring is possible only on a disk with a compatible physical definition. For that, it must have the same access type, the same number of heads, of sector per track and have sectors that have the same size. It must equally have the same number or more cylinders (so the disk will have the same size or be bigger). If it has more cylinders, the last cylinders will be not allocated (consequently left empty) and you will have to create a new partition or increase the last one to use them when having MBR partitions table or increase the partitions table when having a GPT one (an easy way to fix the GPT partitions table is to restore the partitions table after having restored disk).
When using the "-tds" option, the disk size can be increased depending on size found through partitions table or in case of hidden cylinders. In case partitions table is of GPT type and appears smaller than disk size, disk size is lowered to match this size, such as disk appears to have same size whichever OS is used (a GUID partitions table is expected to occupy whole disk).
If disk size seems to be incorrect (for example it is displayed as 8 GB when the disk is 20 GB), you should not save this disk because the backup will not be complete (in this example, the last 12 GB will not be saved). This comes from a bad detection of the disk (for example in the way it is accessed). The use of a disk manager program may solve this problem.
b) The Master Boot Record (MBR):This sector is the first one on the disk. It contains:
When restoring, the only constraint on destination disk is that it must have the same sector size.
It can be useful to save the Master Boot Record to restore it on another disk or in case of a boot virus. This is the same as doing "fdisk /mbr" if you have a boot sector written by Windows 9x/Me. This also allows you to restore a boot loader in case you install an operating system that modifies the boot sector without notice.
Boot code is restored as-is, so if it contains some code specific to the disk format, this format is not updated even if this sector is restored on another disk.
You cannot save the MBR if it is not considered valid (in which case this choice will not be displayed).
c) First sectors of disk:These are the sectors that are before the first partition when using MBR partitions table (there is no such definition for GUID partitions table). This includes Master Boot Record, which is restored as described above (only boot code is restored).
When restoring, the destination disk must have the same sector size and have a valid partitions table. If the number of sectors before the first partition is not the same between the saved and restored disks, only the common part (the minimum number of sectors) will be restored.
You may need to save all sectors before first partition rather than just the MBR in the situation where you have a boot loader that uses these sectors to store its program. If this is restored onto a disk other than the original one or on a disk with different partitions, restored sectors will not be modified to take into account this new definition.
You will not see this option if MBR or partitions table is not valid.
d) Partitions table (MBR):These sectors describe the partitions table when it uses MBR formalism (4 main partitions and extended partitions). They include MBR and all sectors that describe extended partitions.
When saving, the sectors are fully saved but, when restoring, only the part corresponding to the partitions table and disk identifier are restored (so boot code is not modified). Constraints on the destination disk are the same as when saving/restoring whole disk.
When restoring partitions table, you will lose the whole contents of the disk, not because it is overwritten (only sectors of the partitions table are written), but because the way it is organised is modified. It is recommended that the backup file is not on the destination disk because there is a risk that it can be erased (it is a low risk because the file should be too big to be stored in memory and one of the sectors of the partitions table would be where the file is stored).
In case you restore the partitions table to a new disk (not the source one), it is better to avoid keeping both source and new disks in the same computer as they will have the same identifier (Windows will map drive letter to one of these disks, but perhaps not the one you want) or you have to modify the disk identifier of one of the two disks before starting Windows.
e) Partitions table (GPT):These sectors describe the partitions table when it uses the GPT (GUID Partitions Table) formalism (new representation that should be used with more than 2 TB disks). They include MBR (with the guard MBR partitions table) and all sectors that describe partitions and the copy of these sectors.
When saving, the sectors are fully saved and when restoring they are fully written. On contrary to MBR partitions table, restoration can be done on a disk that does not have the same physical definition (it should have the same sectors size and be at least of the same size).
When restoring partitions table, you will lose the whole contents of the disk, not because it is overwritten (only sectors of the partitions table are written), but because the way it is organised is modified. It is recommended that the backup file is not on the destination disk because there is a risk that it can be erased (it is a low risk because the file should be too big to be stored in memory and one of the sectors of the partitions table would be where the file is stored).
In case you restore the partitions table to a new disk (not the source one), it is better to avoid keeping both source and new disks in the same computer as they will have the same identifier (and their partitions also), so that could break EFI disk recognition or you have to modify the disk and partitions identifiers of one of the two disks.
f) Partitions (all sectors):In this case all sectors of a partition are saved without taking into account if they are occupied or not.
When saving be aware to not create backup file on saved partition (for same reasons as when saving whole disk). This is equally true when saving only occupied sectors except when choosing to save a partition on itself.
When restoring you should not use backup files that are on the restored partition (for same reasons as when restoring whole disk). This is equally true when restoring only occupied sectors. Restoring will be available only on a partition that is on a disk that has the same constraints as when restoring whole disk. Moreover partition must be on the same place on disk (it must begin and end at the same place as the saved one). Finally, partition type has to be compatible with type of saved partition. For this, here is the array giving compatibility between partition types:
0x01 | DOS FAT-12 | |
0x11 | DOS FAT-12 hidden | |
0xc1 | DR-DOS FAT-12 | |
0x04 | DOS FAT-16 < 32Mo | |
0x06 | DOS FAT-16 >= 32Mo | |
0x14 | FAT-16 < 32Mo hidden | |
0x16 | DOS FAT-16 hidden | |
0xc4 | DR-DOS FAT-16 | |
0xc6 | DR-DOS,NT | |
0x0e | Win95 VFAT-16 | |
0x1e | Win95 VFAT-16 hidden | |
0x0b | Win95 FAT-32 (b) | |
0x0c | Win95 FAT-32 (c) | |
0x1b | Win95 FAT-32 hidden(b) | |
0x1c | Win95 FAT-32 hidden(c) | |
0x07 | QNX,OS/2,NT,Unix | |
0x17 | OS/2,NT hidden | |
0x83 | Linux ext2fs/xiafs |
Saving all sectors of a partition can be useful in the case of a partition for which saving only occupied sectors is not available or in the case where the filesystem is too much damaged for saving only occupied sectors to work or if you do not have enough memory.
g) Partitions (only occupied sectors):This part describes how saving only occupied sectors works for partitions that are known by this program. The following will describe some specific things for each partition type (FAT, ext2fs, NTFS).
When saving/restoring occupied sectors of a partition, it is necessary to know how data are stored on it to know if a sector is occupied or not. For this reason, this option is not available for all filesystem, but only for those where I found documentation and that I have, to perform tests. For those filesystems, some checks are done to verify that it will be correctly recognised (if it is not, the window asking you if you want to save only occupied sectors will not be displayed).
Saving/restoring of occupied sectors allows saving space (backup file is smaller), to save time (less data are read) and to do restore on a partition with a different size or that is on a hard disk different from those where was source partition or at a different place. Further constraints are that disk must have the same sector size as the original one and partition types must be compatible. The partition also needs to respect some minimal and maximal sizes (they are described below for each filesystem type). Remarks on where created/read files are located are the same as for a partition where all sectors are saved.
Saving/restoring of occupied sectors keeps data sectors structure as it was defined when saving. If the partition is restored on a partition with a size different from original one, filesystem sectors can be modified to take into account this size change.
Example:
With a FAT partition, suppose there was the following structure (each letter is a
sector with its content, number of sectors given is not representative of a
true FAT structure):
RRRRRRFFFF R: reserved sectors (boot sector and others)
FFFFDDDD.. F: FAT sectors (sectors that allow to know if clusters,
DDDDDDDD.. that are groups of sectors, are occupied)
........DD D: data sectors
DDDDDDDDDD .: empty sectors
DD....DDDD
This partition is 60 sectors long. If you want to restore it on a partition that has 120 sectors, you will get following result:
RRRRRRFFFF
FFFFFFFFFF
FFDDDD..DD
DDDDDD....
......DDDD
DDDDDDDDDD
....DDDD..
..........
..........
..........
..........
..........
The number of reserved sectors has not been modified, the number of FAT sectors has
grown because there was more accessible data sectors. The number of data sectors
has grown, but their organisation has not been modified (only empty sectors
have been added at end).
In this example, it is not possible to restore this partition on a smaller
partition because the last sector of partition is occupied. To avoid this problem
you have to use a defragmenter before saving in order to get following
structure:
RRRRRRFFFF
FFFFDDDDDD
DDDDDDDDDD
DDDDDDDDDD
DDDD......
..........
In this case, the partition can be restored on a partition with 44 sectors (certainly less, as number of data sectors is reduced and so number of FAT sector will be reduced, and a partition with 42 sectors can certainly be used).
To know minimum and maximum partition size you can use when restoring a partition where only occupied sectors were saved, you can:
h) FAT (12, 16 and 32) partitions (DOS/Windows):All FAT12 and FAT16 partitions are recognised. FAT32 partitions are recognised only for version 0 of this filesystem (I did not know other version). FAT partitions group data sectors into groups called clusters. When restoring this type of partition, cluster size is not modified and FAT type is not modified.
2 kB | 2 MB | 4 kB | 4 MB | 8 kB | 8 MB | 16 kB | 16 MB | 32 kB | 32 MB | 64 kB | 64 MB | 128 kB | 128 MB | |
2 MB | 32 MB | 4 MB | 64 MB | 8 MB | 128 MB | 16 MB | 256 MB | 32 MB | 512 MB | 64 MB | 1 GB | 128 MB | 2 GB | |
32 MB | 128 MB | 64 MB | 256 MB | 128 MB | 512 MB | 256 MB | 1 TB | 512 MB | 2 TB | 1 TB | 4 TB | 2 TB | 8 TB |
Remarks:
i) Ext2fs/ext3fs/ext4fs partitions (Linux):Ext2fs/ext3fs/ext4fs partitions that are recognised are 0 and 1 version.
256 MB | 2 GB | 16 GB | |
512 MB | 4 GB | 32 GB | |
1 GB | 8 GB | 64 GB | |
2 GB | 16 GB | 128 GB | |
4 GB | 32 GB | 256 GB | |
8 GB | 64 GB | 512 GB | |
16 GB | 128 GB | 1 TB | |
32 GB | 256 GB | 2 TB | |
64 GB | 512 GB | 4 TB |
For example, if you have a 3 GB partition with 2 kB blocks, you would not be permitted to restore it on a partition that has more than 4 GB (but you can restore it on a partition having a size between 0 and 4 GB, lower limit will be determined by the number of the last used block).
Remarks:
j) NTFS partitions:NTFS partitions are recognised for versions 1.1, 1.2, 2, 3.0 and 3.1 (this number is not NT version but filesystem version (1.1, 1.2, 2 <=> NT, 3.0 <=> Windows 2000, 3.1 <=> Windows XP)). As Microsoft did never release a NTFS specification, this filesystem is not fully known and there still were some unknown parts. Nevertheless, parts concerning sector use is known and so can be used. But there was some feature of NTFS that I did not cover (it is the case of partitions that have heavily fragmented filesystem).
Remarks:
k) Boot sector/superblock:This option appears only for partitions, floppy disks and devices for which filesystem is recognised. It allows saving first sector for the FAT and NTFS filesystems and the first 2048 bytes for the ext2, ext3 and ext4 filesystems (this is 4 sectors in most cases). In ext2/ext3/ext4 case, it means there is more sectors than superblock that are saved as there is also sectors before it.
l) Floppy disks:360 kB, 720 kB, 1.2 MB, 1.44 MB and 2.88 MB floppy disks can be saved. But only floppy disks that are correctly formatted and have 512 bytes sectors can be saved.
m) DOS/Windows/Linux devices:This method allows you to save all devices that OS accesses using sector notation and that have a filesystem known by OS (only FAT for DOS and FAT/NTFS for Windows NT/2000/...). For example, it is not the case for CD or network mapped drive, but it is the case for large removable disks like Zip. In Linux version, it relies on /etc/fstab file content to get a list of devices to use (with using only block devices declared in this file).
n) Raw files:A raw file is a standard file that contains byte by byte image of a support (as obtained through "dd" program). Constraint of this file is that it shall have a size multiple of 512 bytes.
27- Differences between DOS and Windows versions
Because of differences between DOS and Windows, the two Partition-Saving versions are not exactly the same. Major differences are given here with taking DOS version as reference.
a) All versions of Windows:Windows does not allow protecting a drive that is in use to avoid that several programs access it simultaneously. So these drives cannot be saved or restored from Windows. The most notable case is the system partition or partition with the swap file. If you want to save these partitions with the Windows version, you have to do it either from a second Windows installation, or from a WinPE or BartPE CD, or from Windows Vista/Seven recovery console.
Note:
In case mouse seems to not work, it is because console is configured to use
quick edit mode. You have to click on the window icon on top left, choose
"Properties", "Edit options" tab and uncheck "Quick edit
mode" (note: as it is translation from French version, menu and options name are certainly not exactly these ones but something similar).
b) Windows before Windows 95:I do not think the Windows version can be executed on these Windows versions. But if it works, it is better you do not use it and you use the DOS version in DOS mode.
c) Windows 95/98/Me:These versions of Windows do not allow direct access to disk. So you can only save floppy disk or devices. So it is better to use the DOS version in DOS mode.
d) Windows NT/2000/XP/Vista/...:These versions of Windows allow accessing NTFS drives, so it is not needed to create backup files on NTFS partition before as it is the case for DOS version. But, in case you save a NTFS partition on itself, you will still need to create these files because they will be used with the mount mechanism instead of with Windows.
e) Windows 64 bits:The 32 or 64 bits version of Partition-Saving can be used on 64 bits Windows. In case you use the Windows DVD or rescue disk, you will have to use the 64 bits version of the program as 32 bits compatibility layer is not present on these disks.
28- Differences between DOS and Linux versions
Because of differences between DOS and Linux, the two Partition-Saving versions are not exactly the same. Major differences are given here with taking DOS version as reference.
a) All versions of Linux:Linux does not allow protecting a drive that is in use to avoid that several programs access it simultaneously. So these drives cannot be saved or restored from Linux. The most notable case is the system partition. If you want to save this partition with the Linux version, you have to do it either from a second Linux installation, or from a live CD, or recovery console that is available on most installation CD.
Device naming is different from DOS/Windows one: it is based on name of
device file (as /dev/hda1). Program uses the "/etc/fstab" file to get
a list of devices where to search. So in case a device does not appear into
list you can add an entry into this file to force its detection (note that
device file shall be a block device file).
As for device name, mount point name is not the same: it does not use a
"<mount number>:" notation but
"//<mount number>" one to know a mount shall be used instead
of some local file.
Following options and corresponding ones into options file have described
behaviour:
b) Secured versions of Linux:On some very conservative Linux versions (known as SELinux), program can fail to launch because it is compressed. In this case you have to go to the UPX website (http://upx.sourceforge.net) to use this program to inflate binary (upx -d spartlnx.run -ospartlnx_unc.run) then launch obtained file.
c) Linux 64 bits:The 32 or 64 bits version of Partition-Saving can be used on 64 bits Linux if both 32 and 64 bits libraries are installed. In case only 64 bits libraries are installed, you will have to use the 64 bits version of the program.
This file is created in case you request it either through dedicated option
in options file or through checking corresponding option when the backup file is
requested. This file will store all error messages displayed by program during
its execution (there is no additional message less starting and ending messages).
The file begins with a "Start of execution on <date> at <time>."
and ends with an "End of execution on <date> at <time>." if
there was no error, "End of execution with error on <date> at <time>."
if there was an error that prevents complete execution,
"End of execution with warning on <date> at <time>." if there
were errors that do not prevent complete execution (as bad sectors) or
"Execution canceled by user on <date> at <time>." if user
canceled execution. In case
you do not get the end message, it means program ends abruptly, so with some
error that could have been not logged (as if there is not enough memory).
There is no real need to use this log file in most cases. You should
be aware that in case you have a damaged disk, it will store a lot of messages
and so become very big (so it is better to create it on a drive where there is
a lot of available space).
The following situations are not supported for this program:
The following situations cannot be tested:
Hoping this program will be useful,
D. Guibouret <>