Menu

How to get a file from Clonezilla image?

2025-03-29
2025-04-03
  • Ricardo Gunawan

    Ricardo Gunawan - 2025-03-29

    Hi....
    I previously backed-up partitions using Clonezilla 3.2.0-5 with zst compression. Those partitions are local and backed-up to a different local partition in same disk. I have an external USB HDD, too, it's about 2TB free space.
    The question:
    I want a file, only a single file , it's a configuration file. How do i get that file?

    I was trying to use this command so later I can mount this image to /mnt or somewhere else, but had no luck:

    zstd -dc -T0 /media/akrogun/DATA/IMAGE/Kubuntu/sda7.ext4-ptcl-img.zst 2> /media/akrogun/WD\ 3TB/sda7/unzip_cmd_error.log | LC_ALL=C sudo partclone.ext4 --buffer_size 10485760 --logfile /media/akrogun/WD\ 3TB/sda7/partclone.log --source - --restore --no_check --overwrite /media/akrogun/WD\ 3TB/sda7/sda7.img

    How do I fix it?
    Thanks.

    Ah yes,
    Also, I was reading here and here, but did not mentioned using zst compression.

    FYI, I got command above from Clonezilla itself while using no-GUI restoring procedure.

    [SOLVED]
    Finally, I figured it out to use VirtualBox to get that configuration file. (This link on methode 1)
    Here are how I did it:
    1. Create virtual disk with Clonezilla Live iso.
    2. Create virtual hardisk and add to storage.
    3. Prepare Samba server from your host OS, and point to your image directory.
    4. Boot Clonezilla Live. Use samba_server.
    5. Restore
    6. Mount the virtual hardisk to /mnt or somewhere else.
    7. Grab your file.

    [UPDATE]
    Yes, I finally can extract that zst compression image and then mount to /mnt by following this link on methode 3.

     

    Last edit: Ricardo Gunawan 2025-04-07
  • Steven Shiau

    Steven Shiau - 2025-03-29

    "I was trying to use this command so later I can mount this image to /mnt or somewhere else, but had no luck:" -> What were the error messages there?
    Another method is you can try to restore the image to a virtual machine (e.g., Virtualbox or VMWare). Then mount the virtual disk/partition to read that.

    Steven

     
    • Ricardo Gunawan

      Ricardo Gunawan - 2025-04-03

      Hi @steven_shiau, thanks for your reply.
      Sorry for late reply.

      Here is the command I've typed:

       ┗━━ $❱ zstd -dc -T0 /media/akrogun/DATA/IMAGE/Kubuntu/sda10.ext4-ptcl-img.zst 2> /home/kubuntu/akrogun/Downloads/sda10/unzip_cmd_error.log | LC_ALL=C sudo partclone.ext4 --buffer_size 10485760 --logfile /home/kubuntu/akrogun/Downloads/sda10/partclone.log --source - --restore --no_check --overwrite /home/kubuntu/akrogun/Downloads/sda10/sda10.img
      [sudo] password for akrogun:
      Partclone v0.3.27 http://partclone.org
      Starting to restore image (-) to device (/home/kubuntu/akrogun/Downloads/sda10/sda10.img)
      Calculating bitmap... Please wait...
      done!
      File system:  EXTFS
      Device size:  838.3 GB = 204673536 Blocks
      Space in use:  59.2 GB = 14464097 Blocks
      Free Space:   779.1 GB = 190209439 Blocks
      Block size:   4096 Byte
      Elapsed: 00:08:10, Remaining: 00:00:00, Completed: 100.00%, Rate:   7.25GB/min,
      Current block:  204673527, Total block:  204673536, Complete: 100.00%
      Total Time: 00:08:10, Ave. Rate:   7.25GB/min, 100.00% completed!
      Syncing... OK!
      Partclone successfully restored the image (-) to the device (/home/kubuntu/akrogun/Downloads/sda10/sda10.img)
      Cloned successfully.
      
       ┗━━ $❱ sudo mount -o loop "/home/kubuntu/akrogun/Downloads/sda10/sda10.img" /mnt
      mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop11, missing codepage or helper program, or other error.
             dmesg(1) may have more information after failed mount system call.
      

      It said succesfully cloned, but can not mount to /mnt.

      You mentioned using VM, I was trying add that .img using VirtualBox and no luck either, with error message here:

      Could not get the storage format of the medium '/home/kubuntu/akrogun/Downloads/sda10/sda10.img' (VERR_NOT_SUPPORTED).
      
      
      Result Code:
      VBOX_E_IPRT_ERROR (0X80BB0005)
      Component:
      MediumWrap
      Interface:
      IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}
      Callee:
      IVirtualBox {7682d5eb-f00e-44f1-8ca2-99d08b1cd607}
      Callee RC:
      VBOX_E_OBJECT_NOT_FOUND (0X80BB0001)
      

      I give an information from lsblk also:

       ┗━━ $❱ lsblk --output NAME,MAJ:MIN,SIZE,FSUSED,FSUSE%,MOUNTPOINTS,FSTYPE --sort NAME
      NAME   MAJ:MIN   SIZE FSUSED FSUSE% MOUNTPOINTS                   FSTYPE
      loop0    7:0    10,7M  10,8M   100% /snap/canonical-livepatch/286 
      loop1    7:1       4K   128K   100% /snap/bare/5                  
      loop10   7:10   44,4M  44,5M   100% /snap/snapd/23771             
      loop2    7:2    73,9M    74M   100% /snap/core22/1748             
      loop3    7:3    10,7M  10,8M   100% /snap/firmware-updater/127    
      loop4    7:4    73,9M    74M   100% /snap/core22/1802             
      loop5    7:5    11,1M  11,3M   100% /snap/firmware-updater/167    
      loop6    7:6   505,1M 505,1M   100% /snap/gnome-42-2204/176       
      loop7    7:7     516M 516,1M   100% /snap/gnome-42-2204/202       
      loop8    7:8    91,7M  91,8M   100% /snap/gtk-common-themes/1535  
      loop9    7:9    38,8M  38,9M   100% /snap/snapd/21759             
      sda      8:0     1,8T                                             
      sda1     8:1       1G  31,7M     3% /boot/efi                     vfat
      sda10    8:10  780,8G  64,2G     8% /home                         ext4
      sda2     8:2      16M                                             
      sda3     8:3    26,7G                                             ntfs
      sda4     8:4     240G                                             ntfs
      sda5     8:5   323,3G  44,2G    14% /media/akrogun/DATA           ntfs
      sda6     8:6      24G                                             swap
      sda7     8:7   347,2G  32,3G     9% /                             ext4
      sda8     8:8      60G                                             ext4
      sda9     8:9      60G                                             ext4
      sdb      8:16    2,7T                                             
      sdb1     8:17  234,5G                                             exfat
      sdb2     8:18     32M                                             vfat
      sdb3     8:19    2,5T 434,3G    17% /media/akrogun/WD 3TB         exfat
      sr0     11:0    1024M     
      
       

      Last edit: Ricardo Gunawan 2025-04-03
  • Ricardo Gunawan

    Ricardo Gunawan - 2025-04-03

    Hi again @steven_shiau....
    The problem is solved.

    I finally figured out how to get that configuration file using VirtualBox.

    Thanks.

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.