|
@@ -43,4 +43,43 @@ Device Boot Start End Sectors Size Id Type
|
43
|
43
|
<hr>
|
44
|
44
|
**EN:** A script to extract a data image via the **[ntfsclone](https://linux.die.net/man/8/ntfsclone)** utility from XEN \ KVM media<br>
|
45
|
45
|
Parameters for using the script are specified in section **manual_parameters**<br>
|
46
|
|
-for the script you need the package **dialog**.
|
|
46
|
+for the script you need the package **dialog**.
|
|
47
|
+
|
|
48
|
+to get the necessary parameters of the script - an example:<br>
|
|
49
|
+```
|
|
50
|
+losetup /dev/loop1 /kvm/win7x64/disk_c.img
|
|
51
|
+losetup -a
|
|
52
|
+dev/loop0: [2055]:2103175 (/kvm/win7x64/disk_c.img)
|
|
53
|
+```
|
|
54
|
+
|
|
55
|
+`fdisk -l /dev/loop0`
|
|
56
|
+
|
|
57
|
+```
|
|
58
|
+Disk /dev/loop0: 80 GiB, 85899345920 bytes, 167772160 sectors
|
|
59
|
+Units: sectors of 1 * 512 = 512 bytes
|
|
60
|
+Sector size (logical/physical): 512 bytes / 512 bytes
|
|
61
|
+I/O size (minimum/optimal): 512 bytes / 512 bytes
|
|
62
|
+Disklabel type: dos
|
|
63
|
+Disk identifier: 0x677d5646
|
|
64
|
+```
|
|
65
|
+
|
|
66
|
+```
|
|
67
|
+Device Boot Start End Sectors Size Id Type
|
|
68
|
+/dev/loop0p1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
|
|
69
|
+/dev/loop0p2 206848 167770111 167563264 79,9G 7 HPFS/NTFS/exFAT
|
|
70
|
+```
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+at us on an image of 2 sections.<br>
|
|
74
|
+each partition is: sda1 and sda2<br>
|
|
75
|
+the offset for each section is obtained by computing:<br>
|
|
76
|
+
|
|
77
|
+**sda1 offset :( 512 x 2048 = 1048576)**<br>
|
|
78
|
+**sda2 offset :( 512 x 206848 = 105906176)**<br>
|
|
79
|
+
|
|
80
|
+the result is added to the section of the script manual_parameters<br>
|
|
81
|
+Now the script itself can both save and restore data from the virtual machine image.<br>
|
|
82
|
+**Attention!!**<br>
|
|
83
|
+**Before using the script, I recommend that you first make a copy of the image file (example: /kvm/win7x64/disk_c.img)**<br>
|
|
84
|
+and only if everything went well, a copy can be deleted.<br>
|
|
85
|
+The script dialog supports 2 languages: RU and EN<br>
|