After upgrade to the latest dev-branch, partclone stopped to capture images in dd mode. My setup:
dual-boot Windows 10 / CentOS 6 (LVM).
lsblk -f output:
NAME FSTYPE LABEL UUID
sda
|-sda1 ntfs System-reserviert 6A1494EA1494BB11
|-sda2 ntfs 4C5E04DB5E04BFA6
|-sda3 ext2 4aef9246-b9cb-41b2-889f-2cd08fc5e966
`-sda4 LVM2_member gYEf27-xHDD-5oCl-qjHi-Uyvy-ScAv-BPAS86
lsblk output:
NAME MAJ:MIN RM SIZE RO TYPE
sda 8:0 0 477G 0 disk
|-sda1 8:1 0 500M 0 part
|-sda2 8:2 0 238G 0 part
|-sda3 8:3 0 105.9M 0 part
`-sda4 8:4 0 238G 0 part
The NTFS partitions get captured normally, so does the Ext2 partition, but when it comes to LVM (/dev/sda4), the partclone ends immediately without any error with the resulting size of partition image being almost zero. Almost because of compression overhead (70 bytes or so), but partclone.info reports the size of the image as zero.
/var/log/partclone.log (after doing debug capture):
Partclone v0.3.13 http://partclone.org
Starting to clone device (/dev/sda) to image (/tmp/pigz1)
UID is root.
source=/dev/sda, target=/tmp/pigz1
open source file/device /dev/sda
open target file/device /tmp/pigz1
Initiate image options - version 0002
Initial image hdr - get Super Block from partition
Reading Super Block
open source file/device /dev/sda
0 blocks per checksum
memory needed: 2097152 bytes
bitmap 0 bytes, blocks 2*1048576 bytes, checksum 0 bytes
initial main bitmap pointer 0x522d20
Initial image hdr - read bitmap table
Calculating bitmap... Please wait...
check main bitmap pointer 0x522d20
Writing super block and bitmap...
io_all: write 110, 0 left.
io_all: write 4, 0 left.
done!
print image information
MODE: clone
DEBUG: 3
SOURCE: /dev/sda
TARGET: /tmp/pigz1
OVERWRITE: 1
RESCUE: 0
CHECK: 1
QUIET: 0
FRESH: 1
FORCE: 0
BTFILES: 0
NCURSES: 0
OFFSET DOMAIN: 0x0
CHECKSUM: NONE
CS SIZE: 0
BLOCKS/CS: 0
NOTE:
File system: raw
Device size: 0 Byte = 0 Blocks
Space in use: 0 Byte = 0 Blocks
Free Space: 0 Byte = 0 Blocks
Block size: 512 Byte
Initial Progress bar
#
Buffer capacity = 2048, Blocks per cs = 0
#
Total block 0
start backup data...
Syncing... OK!
Partclone successfully cloned the device (/dev/sda) to the image (/tmp/pigz1)
What I tried:
- rebuilt FOS with the latest partclone (that’s why the log reports partclone 0.3.13):
diff --git a/Buildroot/package/partclone/partclone.mk b/Buildroot/package/partclone/partclone.mk
index 07c2022..3035cf2 100644
--- a/Buildroot/package/partclone/partclone.mk
+++ b/Buildroot/package/partclone/partclone.mk
@@ -4,9 +4,9 @@
#
################################################################################
-PARTCLONE_VERSION = 0.3.12
+PARTCLONE_VERSION = 58d138da6e0f473acd80a7c9b8544d104377d50f
PARTCLONE_SOURCE = partclone-$(PARTCLONE_VERSION).tar.gz
-PARTCLONE_SITE = http://partclone.nchc.org.tw/download/testing
+PARTCLONE_SITE = $(call github,Thomas-Tsai,partclone,$(PARTCLONE_VERSION))
PARTCLONE_INSTALL_STAGING = YES
PARTCLONE_AUTORECONF = YES
PARTCLONE_DEPENDENCIES += attr e2fsprogs libgcrypt lzo xz zlib xfsprogs ncurses host-pkgconf
- changed partclone.imager to partclone.dd in /bin/fog.upload
Here I got the message from partclone.dd that it doesn’t support options -c and -a. After removing these options image was captured sucessfully.
diff --git a/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload b/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload
index c1a1a4f..28ef51b 100755
--- a/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload
+++ b/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload
@@ -197,7 +197,7 @@ beginUpload() {
imgpart="$imagePath/$img"
mkfifo /tmp/pigz1 >/dev/null 2>&1
uploadFormat "/tmp/pigz1" "$imgpart"
- partclone.imager -c -s "$hd" -O /tmp/pigz1 -N -f 1 -a0
+ partclone.dd -s "$hd" -O /tmp/pigz1 -N -f 1
rm /tmp/pigz1 >/dev/null 2>&1
clearScreen
;;