· 6 years ago · Apr 19, 2019, 02:44 PM
1Do you want to clone the boot loader (executable code area, the first 446 bytes) to: sdc ?
2[Y/n]
3The first partition of disk /dev/sda starts at 2048.
4Saving the hidden data between MBR (1st sector, i.e. 512 bytes) and 1st partition, which might be useful for some recovery tool, by:
5dd if=/dev/sda of=/tmp/ocs_onthefly_local.0NPhFl/src-hidden-data.img skip=1 bs=512 count=2047
62047+0 records in
72047+0 records out
81048064 bytes (1.0 MB, 1.0 MiB) copied, 0.143125 s, 7.3 MB/s
9*****************************************************.
10Collecting partition /dev/sda1 info...
11Collecting partition /dev/sda2 info...
12Collecting partition /dev/sda3 info...
13Collecting partition /dev/sda4 info...
14Outputing swap UUID/LABEL of sda3...
15Saving swap /dev/sda3 info in /tmp/ocs_onthefly_local.0NPhFl/swappt-sdc3.info...
16*****************************************************.
17*****************************************************.
18Searching for data partition(s) in source disk: sda ...
19Excluding busy partition or disk...
20Unmounted partitions (including extended or swap): sda1 sda2 sda3 sda4
21Collecting info..... done!
22*****************************************************.
23Running file system check and repair for /dev/sda1...
24Running: fsck -f /dev/sda1
25fsck from util-linux 2.33.1
26e2fsck 1.44.6 (5-Mar-2019)
27Pass 1: Checking inodes, blocks, and sizes
28Pass 2: Checking directory structure
29Pass 3: Checking directory connectivity
30Pass 4: Checking reference counts
31Pass 5: Checking group summary information
32/dev/sda1: 442911/3203072 files (0.4% non-contiguous), 6001953/12800000 blocks
33Running file system check and repair for /dev/sda2...
34Running: fsck -f /dev/sda2
35fsck from util-linux 2.33.1
36e2fsck 1.44.6 (5-Mar-2019)
37Pass 1: Checking inodes, blocks, and sizes
38Inode 7738183 extent tree (at level 1) could be narrower. Optimize<y>? yes
39Pass 1E: Optimizing extent trees
40Pass 2: Checking directory structure
41Pass 3: Checking directory connectivity
42Pass 4: Checking reference counts
43Pass 5: Checking group summary information
44
45/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
46/dev/sda2: 1075014/26525696 files (0.3% non-contiguous), 46925533/106092544 blocks
47Running file system check and repair for /dev/sda4...
48Running: fsck -f /dev/sda4
49fsck from util-linux 2.33.1
50e2fsck 1.44.6 (5-Mar-2019)
51Pass 1: Checking inodes, blocks, and sizes
52Pass 2: Checking directory structure
53Pass 3: Checking directory connectivity
54Pass 4: Checking reference counts
55Pass 5: Checking group summary information
56/dev/sda4: 374/32768 files (1.3% non-contiguous), 29825/131072 blocks
57*****************************************************.
58Will create the partition on the target machine...
59/usr/share/drbl/sbin/ocs-functions: line 2794: service: command not found
60Shutting down the Logical Volume Manager
61Finished Shutting down the Logical Volume Manager
62Trying to clean the MBR and GPT partition table on the destination disk first: /dev/sdc
63Informing the OS of partition table changes... done!
64Creating MBR type's partition table...
65No partition table exists in target disk /dev/sdc, try to initialize one so that we can get the disk size by parted... Running: parted -s /dev/sdc mklabel msdos
66done!
67sfdisk --force /dev/sdc < /tmp/ocs_onthefly_local.0NPhFl/tgt-pt.sf
68Partition #1 contains a ext4 signature.Checking that no-one is using this disk right now ... OK
69
70Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
71Disk model:
72Units: sectors of 1 * 512 = 512 bytes
73Sector size (logical/physical): 512 bytes / 4096 bytes
74I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
75Disklabel type: dos
76Disk identifier: 0xf0ecb17d
77
78Old situation:
79
80>>> Script header accepted.
81>>> Script header accepted.
82>>> Script header accepted.
83>>> Script header accepted.
84>>> Created a new DOS disklabel with disk identifier 0x62c50f1e.
85/dev/sdc1: Created a new partition 1 of type 'Linux' and of size 48.8 GiB.
86
87Partition #4 contains a ext4 signature.
88/dev/sdc2: Created a new partition 2 of type 'Linux' and of size 404.7 GiB.
89/dev/sdc3: Created a new partition 3 of type 'Linux swap / Solaris' and of size 11.7 GiB.
90/dev/sdc4: Created a new partition 4 of type 'EFI (FAT-12/16/32)' and of size 512 MiB.
91All partitions used.
92
93New situation:
94Disklabel type: dos
95Disk identifier: 0x62c50f1e
96
97Device Boot Start End Sectors Size Id Type
98/dev/sdc1 1050624 103450623 102400000 48.8G 83 Linux
99/dev/sdc2 103450624 952190975 848740352 404.7G 83 Linux
100/dev/sdc3 952190976 976768064 24577089 11.7G 82 Linux swap / Solaris
101/dev/sdc4 * 2048 1050623 1048576 512M ef EFI (FAT-12/16/32)
102
103Partition table entries are not in disk order.
104
105The partition table has been altered.
106Calling ioctl() to re-read partition table.
107Syncing disks.
108This was done by "sfdisk --force /dev/sdc < /tmp/ocs_onthefly_local.0NPhFl/tgt-pt.sf"
109Informing the OS of partition table changes.... done!
110Checking the integrity of partition table in the disk /dev/sdc...
111done!
112*****************************************************.
113The first partition of disk /dev/sdc starts at 2048.
114Restoring the hidden data between MBR (1st sector, i.e. 512 bytes) and 1st partition, which might be useful for some recovery tool, by:
115dd if=/tmp/ocs_onthefly_local.0NPhFl/tgt-hidden-data.img of=/dev/sdc seek=1 bs=512 count=2047
1162047+0 records in
1172047+0 records out
1181048064 bytes (1.0 MB, 1.0 MiB) copied, 0.0529168 s, 19.8 MB/s
119*****************************************************.
120*****************************************************.
121Cloning the boot loader (executable code area) from "sda" to "sdc"...
122/usr/bin/ocs-onthefly: line 473: [: : integer expression expected
123*****************************************************.
124*****************************************************.
125Searching for data partition(s) in source disk: sda ...
126Excluding busy partition or disk...
127Unmounted partitions (including extended or swap): sda1 sda2 sda3 sda4
128Collecting info..... done!
129*****************************************************.
130Source partition file system is ext4...
131Cloning the /dev/sda1 to /dev/sdc1...
132Clean filesystem header in device /dev/sdc1...
133/dev/sdc1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
134*****************************************************.
135Using partclone to clone...
136Run partclone: partclone.ext4 -z 10485760 -N -L /var/log/partclone.log -b -s /dev/sda1 -O /dev/sdc1
137Cloned successfully.
138*****************************************************.
139Source partition file system is ext4...
140Cloning the /dev/sda2 to /dev/sdc2...
141Clean filesystem header in device /dev/sdc2...
142*****************************************************.
143Using partclone to clone...
144Run partclone: partclone.ext4 -z 10485760 -N -L /var/log/partclone.log -b -s /dev/sda2 -O /dev/sdc2
145Cloned successfully.
146*****************************************************.
147Source partition file system is ext4...
148Cloning the /dev/sda4 to /dev/sdc4...
149Clean filesystem header in device /dev/sdc4...
150/dev/sdc4: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
151*****************************************************.
152Using partclone to clone...
153Run partclone: partclone.ext4 -z 10485760 -N -L /var/log/partclone.log -b -s /dev/sda4 -O /dev/sdc4
154Cloned successfully.
155*****************************************************.
156*****************************************************.
157Searching for data partition(s) in target disk for post process: sdc...
158Excluding busy partition or disk...
159Unmounted partitions (including extended or swap): sdc1 sdc2 sdc3 sdc4
160Collecting info..... done!
161*****************************************************.
162Creating the swap partition if exists...
163Found the swap partition /dev/sdc3, create it by:
164mkswap -U 93fe6c4f-c0a0-4b9f-b963-fcadbbbd88ef /dev/sdc3
165Setting up swapspace version 1, size = 11.7 GiB (12583464960 bytes)
166no label, UUID=93fe6c4f-c0a0-4b9f-b963-fcadbbbd88ef
167*****************************************************.
168Trying to remove udev hardware record in the restored OS...
169The specified destination device: sdc1 sdc2 sdc3 sdc4
170Trying to remove udev persistent files. The devices to be searched: sdc1 sdc2 sdc3 sdc4...
171Now searching possible device /dev/sdc1...
172removed '/tmp/hd_img.M9s9wS/var/lib/dbus/machine-id'
173Now searching possible device /dev/sdc2...
174Skip /dev/sdc3 (swap).
175Now searching possible device /dev/sdc4...
176done!
177*****************************************************.
178Device /dev/sdc1 is not a FAT partition.
179Skip updating syslinux on that.
180Device /dev/sdc2 is not a FAT partition.
181Skip updating syslinux on that.
182Device /dev/sdc3 is not a FAT partition.
183Skip updating syslinux on that.
184Device /dev/sdc4 is not a FAT partition.
185Skip updating syslinux on that.
186*****************************************************.
187Running: ocs-install-grub -s sdc auto
188Found grub partition: /dev/sdc4
189Found boot loader grub in the MBR of disk /dev/sdc.
190There is a separate boot partition in target device. Trying to mount root partition for grub-install to work with that...
191/dev/sda1 is mounted as root partition for grub-install...
192Found grub 2 installed in the restored OS.
193Test if we can chroot the restored OS partition /dev/sda1...
194Yes, we are able to chroot the restored OS partition /dev/sda1.
195Trying to use the grub2 in the restored OS...
196Running: run_grub2_from_restored_os "/dev/sdc4" "/dev/sda1" "/dev/sdc"
197Re-installing grub2 on disk/partition /dev/sdc with grub2 dir in partition /dev/sdc4 and root partition /dev/sda1...
198The options for grub2-install in the chroot: --force --recheck --no-floppy /dev/sdc
199No grub2 program (e.g. update-grub2 or grub2-install) is found in the restored OS!
200Skipping grub2 reinstallation!
201Unable to use the grub 2 in the restored OS, trying another method...
202/dev/sda1 is mounted as root partition for grub-install...
203Trying to use the grub2 from the running OS...
204Checking grub-install version...
205Running: grub-install --force --recheck --root-directory=/tmp/hd_img.KbYwpJ /dev/sdc
206Installing for i386-pc platform.
207Installation finished. No error reported.
208done!
209*****************************************************.
210Try to run partclone.ntfsfixboot for NTFS boot partition if it exists. Scanning partition(s): sdc1 sdc2 sdc3 sdc4...
211The NTFS boot partition was not found or not among the restored partition(s). Skip running partclone.ntfsfixboot.
212*****************************************************.
213/usr/bin/ocs-onthefly: line 2545: /var/lib/clonezilla/ocs-vars: No such file or directory
214/usr/bin/ocs-onthefly: line 2546: /var/lib/clonezilla/ocs-vars: No such file or directory
215/usr/bin/ocs-onthefly: line 2547: /var/lib/clonezilla/ocs-vars: No such file or directory
216Checking if udevd rules have to be restored...
217Now syncing - flush filesystem buffers...
218Ending /usr/bin/ocs-onthefly at 2019-04-09 07:25:24 UTC...
219Press "Enter" to continue......
220[manjaro@manjaro ~]$