• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Mount and Extract files from images

Scheduled Pinned Locked Moved
Feature Request
8
47
26.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Sebastian Roth Moderator
    last edited by Sebastian Roth May 26, 2016, 1:26 PM May 26, 2016, 7:25 PM

    @BedCruncher You mean partclone-nbd? Well I am actually not very interested in this kind of feature so I didn’t really dig into this. Just tried to help you finding something. Sorry if it sounded like I’d be pushing this. Not saying that we shouldn’t add it but I don’t have the time to do it! Feel free to play with it and let us know if it is working properly.

    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

    B 1 Reply Last reply May 27, 2016, 1:55 PM Reply Quote 0
    • B
      BedCruncher @Sebastian Roth
      last edited by May 27, 2016, 1:55 PM

      @Sebastian-Roth
      No worries there. I just knew that you were looking at it some. It’s no biggie. I’ll try to track it down and work with it, but at a slower pace, don’t want to roll something like that out and possibly mess up my prod server. Thanks for all your help with this manner.

      1 Reply Last reply Reply Quote 0
      • P
        pr1m0
        last edited by Aug 22, 2016, 8:40 AM

        Hi, I’m partclone-nbd developer. I know this thread is quite old, but maybe I could help (or you could help me in solving some issues :)). I used partclone-nbd to read several ext4 images, and I’ve never experienced any problems.

        Furthermore, it is strange that you have to change the code. Defining the loop counter inside the for loop is a C99 extension, and CMakeLists.txt states clearly:

        set( CMAKE_C_STANDARD 99 )
        

        @Sebastian-Roth It would be amazing if you could tell me which version of partclone was used to create dummy images. Or maybe you could share those dummy test images?

        @BedCruncher Have you already tried partclone-nbd?

        B 1 Reply Last reply Aug 22, 2016, 12:42 PM Reply Quote 1
        • B
          BedCruncher @pr1m0
          last edited by Aug 22, 2016, 12:42 PM

          @pr1m0
          I haven’t tried that sadly. All of the times I’ve had to get files out of images, it’s not been too much of a hassle. Although I would be open to trying it if you might could provide some pointers on getting it going in Centos 7.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Aug 22, 2016, 1:03 PM

            @pr1m0 Thank’s a lot for getting in touch here! The images I used back then where created using partclone 0.2.88 or maybe 0.2.80. Unfortunately I do not have much time these days to do some extensive testing. Hope this information can help in getting this to work for BedChruncher…

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • B
              BedCruncher
              last edited by May 12, 2017, 4:37 PM

              @Sebastian-Roth @Wayne-Workman @Junkhacker @george1421 @x23piracy @pr1m0

              Sorry to dredge up an old topic, but I went back and tried to redo the steps that I had originally done to restore an image using purely the server. While the steps I listed will work, I did originally mention it, but didn’t specifically include the steps to restore the image on the server. Here is the current working 100% steps to make this all work properly.

              Without the touch command below it will error out. So otherwise this works as expected.

              cd /images/IMAGENAME/
              touch d1p2_extracted.img
              cat d1p2.img | pigz -d -c | partclone.restore -C -s - -O d1p2_extracted.img
              mount -t ntfs-3g d1p2_extracted.img /mnt
              
              G 1 Reply Last reply May 12, 2017, 4:44 PM Reply Quote 2
              • G
                george1421 Moderator @BedCruncher
                last edited by May 12, 2017, 4:44 PM

                @BedCruncher Very interesting…

                Thank you for the additional clarity on making this work smoothly.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                1 Reply Last reply Reply Quote 0
                • W
                  Wayne Workman
                  last edited by May 13, 2017, 4:01 AM

                  #wiki worthy because this has use cases. All the components needed are in this thread - but I’ll approach it from a workstation perspective - don’t want to monkey around too much on potentially a production fog server.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  B 1 Reply Last reply May 15, 2017, 1:14 PM Reply Quote 0
                  • B
                    BedCruncher @Wayne Workman
                    last edited by BedCruncher May 15, 2017, 7:15 AM May 15, 2017, 1:14 PM

                    @Wayne-Workman

                    In my case I actually did the following so that I didn’t mess up the working directory or it’s file contents

                    touch /tmp/d1p2_extracted.img
                    cat d1p2.img | pigz -d -c | partclone.restore -C -s - -O /tmp/d1p2_extracted.img
                    mount -t ntfs-3g /tmp/d1p2_extracted.img /mnt
                    

                    just dumped it to /tmp so that it would be deleted during normal system processes and not fill up my images directory with double images.

                    G 1 Reply Last reply May 15, 2017, 4:00 PM Reply Quote 1
                    • G
                      george1421 Moderator @BedCruncher
                      last edited by May 15, 2017, 4:00 PM

                      @BedCruncher This is only an FYI note for those who may find this thread in the future.
                      The developers have added a new and faster compression/decompression tool in the current release of fog (1.3.5 and later). This is the zstd compression tool instead of the pigz tool. You just have to be aware of this. The zstd tool should read pigz compressed files no problem. But pigz can not read zstd compressed files.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      B 1 Reply Last reply May 15, 2017, 4:46 PM Reply Quote 0
                      • B
                        BedCruncher @george1421
                        last edited by May 15, 2017, 4:46 PM

                        @george1421

                        I will look into modifying those instructions to work with the new compression method. Not sure when I will get that accomplished, but I am sure I can get it done within the next little bit. Thanks for letting me know.

                        1 Reply Last reply Reply Quote 1
                        • B
                          BedCruncher
                          last edited by BedCruncher May 24, 2017, 7:05 AM May 23, 2017, 3:14 PM

                          @george1421 @Wayne-Workman

                          I have tested using the Partclone Zstd image compression method on an image under Centos 7 and was able to get it working with one small thing. I had to download ZSTD as it wasn’t native to the base OS.

                          yum install zstd -y
                          

                          I was then able to extract and mount the image using the commands

                          touch /tmp/d1p2_extracted.img
                          cat d1p2.img | zstd -dcf | partclone.restore -C -s - -O /tmp/d1p2_extracted.img
                          mount -t ntfs-3g /tmp/d1p2_extracted.img /mnt/
                          

                          I also added the -f flag to zstd to force it. I don’t think this is necessary, but as a testing scenario it worked.

                          1 Reply Last reply Reply Quote 1
                          • 1
                          • 2
                          • 3
                          • 3 / 3
                          • First post
                            Last post

                          187

                          Online

                          12.2k

                          Users

                          17.3k

                          Topics

                          155.5k

                          Posts
                          Copyright © 2012-2024 FOG Project