+--------------------------------------+ | Partition Saving | | | | http://www.partition-saving.com | | Copyright (c) 1999-2015 D. Guibouret | +--------------------------------------+ 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) Disk where partition to update is choice: d) Partition to update choice: e) Boot entry to update choice: f) 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) 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- Create files marking drives to use 22- Load an options or marker file 23- Options file contents 24- Mounting a partition 25- 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: 26- 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: 27- Differences between DOS and Linux versions a) All versions of Linux: b) Secured versions of Linux: c) Linux 64 bits: 28- Log file 29- What is not supported 30- What cannot be tested 31- Acknowledgements 1- License and preface ---------------------- 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. 2- Introduction --------------- 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: - saving an element (hard disk, partition, floppy disk, device). - restoring an element that was saved before. - copying an element. - copying a backup file created by this program, modifying its size or compression rate. - verifying created files. - updating partition definition in Windows 2000/XP/Vista/Seven registry. - updating BOOTSECT.DOS/BOOTSECT.BAK file. - exploring a partition. - simulating elements with created files. - creating files on a NTFS drive under Windows for use in saving. - cancelling bad sectors information of a filesystem. - correcting disk physical definition (first sector number of a partition, heads and sectors per track numbers) into a FAT and NTFS boot sector. - replacing a FAT or NTFS boot sector or ext2/ext3/ext4 superblock by its copy in case original one is damaged. For detailed information about partitioning and this program, please read additional information. 3- System Requirements ---------------------- Hardware: - 386 or better. - 4 MB of memory (could work with less, but data compression might not work). Free DOS memory must be at least 300 kB. Software: - DOS (version >= 3.3) for DOS version. - any Windows version less 3.1 versions for Windows version (please read chapter 26 to get constraints depending on version). - any Linux version having a kernel version >= 2.5.4 and glibc version >= 2.3 for Linux version (please read chapter 27 to get constraints). To use DOS version, you need a bootable DOS floppy or CD (or a DOS partition on your disk). If you do not have one, you can use the boot disk that includes Partition-Saving (see spartbdk documentation) to create a bootable floppy or CD. You can also create your own floppy disk (see FAQ question 10). To use Windows version, you need a second Windows installation or a WinPE or BartPE CD or use the Windows Vista/Seven repair console because program cannot save/restore the active system. To use Linux version, you need a second Linux installation or a liveCD or use the repair console that is on most installation CD because program cannot save/restore the active system. Using this program with an emulator with accessing a not emulated disk is not recommended (especially if it runs in a multitasking environment). This program shall be used after a boot of computer without leaving any OS into some hibernation mode because in this case modification made by this program can disallow this OS booting back or OS can undo what program does. You will need also a FAT, NTFS or ext2 partition (or any other filesystem for which you have a DOS driver that allows access to it) to create backup file (this is not needed if you merely want to copy a partition, since no file is created). 4- Interface features/functions ------------------------------- Two interface types are available: - a textual windows interface that presents information in windows that can be navigated with the keyboard or mouse. - a command-line interface that presents information in a basic way and can be used only with the keyboard. The default interface is the first one. The second one is here to resolve some incompatibility issues on some computers. To decide which interface to choose, please read chapter 5. a) Textual windows interface Interface can be used with keyboard or mouse. Keys common to all windows are: - Tab, bottom arrow or right arrow to go from one item to another inside a window. - Shift+Tab, up arrow or left arrow to go from one item to another inside a window (in reverse order compared to Tab). - Ctrl+Tab to go from one window to another. - Alt+Tab to go from one window to another (in reverse order compared to Ctrl+Tab). - Key assignments are defined to associate moving keys to a combination of keys using the Control key: +-------------+-------------+ | 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 | +-------------+-------------+ If no item seems to be selected, press one of these keys to select first or last one. In general, Enter key activates Ok button (if no other button is selected) and Escape key activates Cancel button. Various features of windows are presented below: - Command buttons: to activate them, you have to press Enter key when they are selected, or press Alt+ (even if button is not selected). You can also activate them by clicking on them. A button is selected if it has a black background and is flanked by ">" and "<", otherwise it has a green background. - Entry lines: this is an item that permits entering data. Just press a key to add the character where the cursor is. Delete and BackSpace keys are used to erase characters (respectively, character that cursor is on, and character before cursor). Right and left arrows are used to move cursor and Home and End keys are used to go to begin or end of string. Holding down the shift key while using moving keys will select text that will be erased when you will press a key other than the moving one. By pressing Ctrl+A you select all the text. Finally, Insert key is used to switch from insert mode (default mode: cursor is underlined cursor) to replacement mode (cursor is block-cursor) and back again. With the mouse, you can move the cursor by clicking where you want it to be, scroll the text by clicking on arrow on left or on right, select the text by keeping button pressed when moving mouse and select all the text by double clicking on it. An entry line is selected when it has the cursor that appears in it. - Listboxes: they are used to choose an item from a list. Up and bottom arrows are used to move from one item to another, Page-Up and Page-Down keys are used to go to begin and end of list. If right column is a different color and contains a # character, it is because all elements cannot be seen and the # character is used to locate the currently selected item in the list. If last line is a different color and contains a # character it is because there were some columns that cannot be seen and the # character is used to locate columns that are displayed. With the mouse, you can select an element. If scroll bar appears on right, you can change list position by clicking where you want to be, or by clicking arrows on up or bottom. By double clicking on selected element you will activate command associated to the list (generally Ok button). A selected item has a grey background if its listbox is not selected, and has a black background if its listbox is selected. In case list allows selecting several items, you can select/unselect items either by range with keeping the shift key pressed with a mouse click or moving keys or by individual item selection with keeping the ctrl key pressed with moving and mouse click or space to select/unselect an item. You can use Ctrl+A to select all items. Ctrl+U and Ctrl+V allow replacing Ctrl+Up arrow and Ctrl+Down arrow in case these ones do not work. - Checkboxes: these items allow activating/deactivating an option. To change the state of a checkbox, click on it or press Space key when it is selected. A checkbox is activated when an "X" appears between square brackets, it is deactivated otherwise. A checkbox is selected when its text is white, is not selected when its text is grey. - Directory trees: this item allows selecting a directory on a partition. It functions similarly to a listbox. The first line ("\") is the root directory of the partition, subsequent lines are directories on this partition displayed with a tree view in alphabetic order. Directories that have "+- " before their name have some sub-directories that can be displayed by selecting this directory and pressing "+" key or by clicking the "+" before name. Directories that have their sub-directories displayed and that have "-- " before their name can be collapsed by selecting this directory and pressing "-" key or by clicking the first "-". Example: \ -- displayed sub-directories | |- sub-directory 1 | `- sub-directory 2 |- no sub-directory +- sub-directories not displayed `- terminal directory b) Command line interface This interface is more basic and can only be used with the keyboard. Pressing the Escape key at any time stops execution of the program. Various features are: - Lists: a list is displayed with numbers on the left. Enter the item number when you are asked to choose. If the list is bigger than screen size, you will have to press a key to scroll. - Entering information: you must enter the required information (for example a filename). Delete key allows removing last character (what you have already entered is displayed on next line without the last character and you can continue to enter characters). It is not possible to move the cursor. If a value appears between square brackets, it will be the one used if you hit Enter key. You can modify this default value (as to modify last characters) by hitting Delete key to access its content. In case asked item is a filename, if you enter a filename with wildcard characters (as "backup.*") or a directory name, name of corresponding files will be displayed. It is the same when asking for a directory name if you give a name with wildcard characters. - Choices: they have the form of a question with possible responses given in parentheses (sample: (Y/N)). You must answer by selecting from these choices. It is not case-sensitive. 5- Using the program -------------------- Usage: savepart.exe [-l en|fr|fr_2] [-cm|-nm|-pm] [-f ] [-fp |-fd ] [-ff ] [-fnc] [-ncd] [-ncs] [-nvd|-vd] [-nvf|-vf] [-tds] [-cui|-tui|-tuix|-bui|-buix] [-beep|-beep=] [-utf8|-noutf8] [-force] [-term ] [-a|-b|-c|-d|-e|-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: * en: English. * fr: French. * fr_2: French with others code pages. 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. In Windows, detection of language sets language to French when language settings are French one, otherwise it is set to English. In Linux, detection of language sets language to French when "LANG" or "LC_CTYPE" environment variables begin with "fr" (whichever case is used). If characters are wrongly displayed (either with square or interrogation mark), you could have to change the terminal settings from UTF-8 to your country code page (as ISO-8859-1 or ISO-8859-15 for France) and you need to launch program again. fr_2 is to be used in case accents are not well displayed. It is not automatically detected. -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 : this option allows you to use batch mode. To understand the contents of this file, please read chapter 23. -fp |-fd : 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 21. -ff : 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 21. -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: * -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. 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. -beep|-beep=: 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 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. -term : 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" (this command shall allow using "-e" option to run a program). If 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 value is) disables this behaviour. -a|-b|-c|-d|-e|-i|-k|-m|-n|-r|-s|-t|-u|-v|-w|-x|-z: this option allows selecting which action 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. * -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. If none of these options are given, the program asks what you want to do. For information about each action, please read subsequent chapters. Return code of program can be one of the following: - 0 if no error has been detected. - 1 if an error has appeared. - 2 if user cancels execution. - 3 if no error has been detected, but there were some bad sectors or errors that do not disallow execution. - 255 if some exception has been raised. Remarks: -------- - -f