[opensuse] Trying to open a clonezilla image in openSUSE
Hi, I am trying to restore or at least browse the contents of a clonezilla made image. I found the pertinent question in the FAQ: <https://drbl.org/faq/fine-print.php?path=./2_System/43_read_ntfsimg_content.faq#43_read_ntfsimg_content.faq> For example, I try this method: +++............... Method 3: Use the tool partclone-utils to mount the image directly. (//NOTE// This program is not maintained by Clonezilla team. However, it will be included in the future release of partclone when the new release, e.g. 0.2 is released.). The example to use partclone-utils to mount the image, and still you need to prepare enough disk space for that: * Boot Clonezilla live * Mount the image repository, as normal usage when restoring. However, do not restore the image. Here we just need to read the image * The following commands have to be run as root (administrator). Therefore run "sudo -i" to become root. Say if your image is /home/partimag/YOURIMAGE/, if the image is like /home/partimag /YOURIMAGE/sda1.ext4-ptcl-img.gz*, from the file name you know its file system is ext4, and is gzipped. You can run cat /home/partimag/YOURIMAGE/sda1.ext4-ptcl-img.gz.aa* | gzip -d -c > /home/partimag/my-sda1-img This command will generate a single uncompressed image file "my-sda1-img" in the dir /home/partimag/. * modprobe nbd * imagemount -d /dev/nbd0 -f /home/partimag/my-sda1-img * mount -t ext4 /dev/nbd0 /mnt Now you have all the files in the dir /mnt/. * When everything is done, you can: umount /mnt/ pkill imagemount ...............++- The problem here is that the command "imagemount" I can not find on openSUSE (Leap 15.0). (I installed partclone) So I try another method. ...............++- Method 2: 1 Prepare a large disk in Linux 2 Say if your image is /home/partimag/YOURIMAGE/, if the image is like /home/partimag/YOURIMAGE/*-ptcl-img.* (e.g. /home/partimag/YOURIMAGE/sda1.ext4-ptcl-img.gz.aa), follow this to restore the image. If the the image is like /home/partimag/YOURIMAGE/sda1. ntfs-img.aa, sda1.ntfs-img.ab..., run "file /home/partimag/YOURIMAGE/sda1.ntfs-img.aa" to see it's gzip, bzip or lzop image. Say it's gzip, then you can run cat /home/partimag/YOURIMAGE/sda1.ntfs-img.* | gzip -d -c | ntfsclone --restore-image -o sda1.img - Then you will have a "sda1.img" which you can mount it by mount -o loop -t ntfs sda1.img /mnt Then all the files are in /mnt/ You can do the similar thing for the ext3, ext4 or reiserfs file system. ...............++- Ok, this step works: #cat sdb1.xfs-ptcl-img.gz.aa* | gzip -d -c > my-sdb1-img # cat sdb2.xfs-ptcl-img.gz.aa* | gzip -d -c > my-sdb2-img Telcontar:/mnt/test/aa_test/2014-04-07-15-img-3T-casi_vacio # l -h my* -rw-r--r-- 1 root root 697M Jul 24 23:34 my-sdb1-img -rw-r--r-- 1 root root 193G Jul 25 00:30 my-sdb2-img This is simply expanding the clonezilla image. It is not accessible as is: # file my* my-sdb1-img: data my-sdb2-img: data # hexdump -C my-sdb2-img | head 00000000 70 61 72 74 63 6c 6f 6e 65 2d 69 6d 61 67 65 58 |partclone-imageX| 00000010 46 53 00 00 00 00 00 00 00 00 00 00 00 00 30 30 |FS............00| 00000020 30 31 00 00 00 10 00 00 00 00 30 b2 d2 01 00 00 |01........0.....| 00000030 00 23 2b 1d 00 00 00 00 9c b6 00 03 00 00 00 00 |.#+.............| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001040 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| * 003fc850 01 01 01 01 01 01 01 01 01 01 00 01 01 01 01 01 |................| 003fc860 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| # hexdump -C my-sdb1-img | head 00000000 70 61 72 74 63 6c 6f 6e 65 2d 69 6d 61 67 65 58 |partclone-imageX| 00000010 46 53 00 00 00 00 00 00 00 00 00 00 00 00 30 30 |FS............00| 00000020 30 31 00 00 00 10 00 00 00 00 00 ef e7 00 00 00 |01..............| 00000030 00 f0 7e 0e 00 00 00 00 f2 cf 01 00 00 00 00 00 |..~.............| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001040 01 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 |................| 00001050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 039fcc40 01 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 |................| I look at the FAQ and at "man partclone" and "man partclone.xfs". So I do: # cat my-sdb1-img | partclone.xfs --restore -o my-sdb1-xfs.img Partclone v0.3.11 http://partclone.org Starting to restore image (-) to device (my-sdb1-xfs.img) device (my-sdb1-xfs.img) is mounted at error exit Partclone fail, please check /var/log/partclone.log ! # The log just contains the same text. "man partclone.xfs" has examples: EXAMPLES clone /dev/hda1 to hda1.img and display debug information. partclone.ext3 -c -d -s /dev/hda1 -o hda1.img restore /dev/hda1 from hda1.img and display debug information. partclone.extfs -r -d -s hda1.img -o /dev/hda1 restore image from clonezilla(split, gzip,) with stdin source cat sda1.ext3-ptcl-img.gz.a* | gunzip -c | partclone.ext3 -d -r -s - -o /dev/sda1 The only difference is that I'm not dumping to disk device, but to file. Trying to use the original file from clonezilla, as the third example above - I tried several combinations: # cat sdb1.xfs-ptcl-img.gz.a* | gunzip -c | partclone.xfs -d -r -s - -o sdb1_xfs.img Partclone v0.3.11 http://partclone.org Starting to restore image (-) to device (sdb1_xfs.img) device (sdb1_xfs.img) is mounted at error exit <================================================== Partclone fail, please check /var/log/partclone.log ! # # cat sdb2.xfs-ptcl-img.gz.a* | gunzip -c | partclone.xfs -d -r -s - -o sdb2_xfs.img Partclone v0.3.11 http://partclone.org Starting to restore image (-) to device (sdb2_xfs.img) device (sdb2_xfs.img) is mounted at error exit <================================================== Partclone fail, please check /var/log/partclone.log ! # cat /var/log/partclone.log Partclone v0.3.11 http://partclone.org Starting to restore image (-) to device (sdb2_xfs.img) UID is root. source=-, target=sdb2_xfs.img open source file/device - open target file/device sdb2_xfs.img device (sdb2_xfs.img) is mounted at error exit Telcontar:/mnt/test/aa_test/2014-04-07-15-img-3T-casi_vacio # l total 337766012 drwxr-xr-x 2 root root 4096 Jul 24 23:35 ./ drwxr-xr-x 3 root root 59 Jun 7 2014 ../ ... -rw-r--r-- 1 root root 730333368 Jul 24 23:34 my-sdb1-img -rw-r--r-- 1 root root 207041433640 Jul 25 00:30 my-sdb2-img ... -rw------- 1 root root 4015224 Apr 7 2014 sdb1.xfs-ptcl-img.gz.aa -rw------- 1 root root 138096386697 Apr 7 2014 sdb2.xfs-ptcl-img.gz.aa Telcontar:/mnt/test/aa_test/2014-04-07-15-img-3T-casi_vacio # df -h . Filesystem Size Used Avail Use% Mounted on /dev/sdf6 902G 323G 579G 36% /mnt/test/aa_test Telcontar:/mnt/test/aa_test/2014-04-07-15-img-3T-casi_vacio # man partclone says to get support at <http://partclone.org> Here they point to a mail list <https://partclone.org/help/>, which is at <https://sourceforge.net/p/partclone/mailman/partclone-user/> It got 3 mails on 2018 and 1 this year. So dead end, they don't reply to questions. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (1)
-
Carlos E. R.