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

    How to manually upload an existing image

    Scheduled Pinned Locked Moved
    General
    4
    15
    4.8k
    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.
    • dolfD
      dolf
      last edited by dolf

      WOW thanks for the advice. I’ll try that soon.

      I think the 1MB space between the partitions is just for alignment.

      Wayne WorkmanW 1 Reply Last reply Reply Quote 1
      • Wayne WorkmanW
        Wayne Workman @dolf
        last edited by

        @dolf I’d urge you to try a non-resizable image in fog first. See if it works. If all the computers are identical they will all have the same size HDD. It’ll either work or not. If it works, that’s how you do it for this model.

        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/

        1 Reply Last reply Reply Quote 0
        • dolfD
          dolf
          last edited by

          OK so while the imaging runs, I’m reading code.

          CloneZilla saves the partition like this (from the log file clonezilla-img😞

          partclone.ntfs -z 10485760 -N -L /var/log/partclone.log -c -s /dev/sda2 --output - | pigz -c --fast -b 1024 -p 16 --rsyncable | split -a 2 -b 4096MB - /home/partimag/2016-07-12-21-img-eelabtest/sda2.ntfs-ptcl-img.gz. 2> /tmp/split_error.TMVF3J
          

          Fog does it like this (from savePartition() in src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh)

          partclone.$fstype -fsck-src-part -c -s $part -O $fifoname -N -f 1
          

          I’m not really sure how the FIFO buffer works, but it’s called /tmp/pigz1, so I guess it’s the same as piping the output of partclone through pigz, which is exactly what CloneZilla does. Therefore, maybe this would be sufficient to “convert from CloneZilla format to Fog format”:

          cat sda2.ntfs-ptcl-img.gz.* > d1p2.img
          

          In other words, no recompression is needed. Am I missing something here?

          1 Reply Last reply Reply Quote 3
          • dolfD
            dolf
            last edited by

            I created a new image in the Fog web interface, copied the d1.* files from a very similar image, and replaced d1p*.img with concatenated versions of the CloneZilla images. Currently deploying, and partclone seems happy thus far. Just wondering whether the resize will work…

            By the way:
            Sorry for the delayed responses. It typically takes me 45 minutes to deploy a 65GB image. Without compression the shortest time should be around ((65×1024)MB ÷ (100÷8)MB/s) ÷ 60s = 88 minutes. There’s a 100MB switch somewhere between here and the server 😞

            Q 1 Reply Last reply Reply Quote 1
            • dolfD
              dolf
              last edited by

              It works! 🙂 The minimum partition size is probably wrong, but I will only deploy to larger drives in any case.

              Wayne WorkmanW 1 Reply Last reply Reply Quote 2
              • Wayne WorkmanW
                Wayne Workman @dolf
                last edited by

                @dolf Wow awesome man, way to go! I had serious doubts about this being easy!

                Can you please lay out details on all your steps to help people in the future?

                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/

                1 Reply Last reply Reply Quote 0
                • Q
                  Quazz Moderator @dolf
                  last edited by

                  @dolf Could also be a CAT 5 cable somewhere.

                  1 Reply Last reply Reply Quote 0
                  • dolfD
                    dolf
                    last edited by

                    Feel free to put this in the wiki if you think it’s worthy.

                    I’m working with a Windows 7 installation, where sda1 is a small boot partition and sda2 is the large partition called C:.

                    1. Use GParted (from your favourite linux disc or GParted Live) to resize sda2 to a minimum.
                    2. Use CloneZilla to capture the disk. I used beginner mode with the savedisk option. I transferred it to /home/user/czimg/… on the FOG server over ssh, but you could use a USB HDD or any other method.
                    3. Create a new resizable image on the FOG web interface. Note the image location.
                    4. Create the location specified in the previous step, e.g. mkdir /images/fogimg
                    5. Do magic:
                    cp /home/user/czimg/sda-pt.sf /images/fogimg/d1.minimum.partitions
                    cp /home/user/czimg/sda-pt.sf /images/fogimg/d1.partitions
                    cp /home/user/czimg/sda-mbr /images/fogimg/d1.mbr
                    echo "1" > /images/fogimg/d1.fixed_size_partitions
                    echo "/dev/sda2 ntfs" > /images/fogimg/d1.original.fstypes
                    cp /home/user/czimg/sda1.ntfs-ptcl-img.gz.aa /images/fogimg/d1p1.img
                    cat /home/user/czimg/sda2.ntfs-ptcl-img.gz.* > /images/fogimg/d1p2.img
                    

                    The last command will take the longest. If you want to see something happening, install pipe viewer and replace the last command with:

                    cat /home/user/czimg/sda2.ntfs-ptcl-img.gz.* | pv > /images/fogimg/d1p2.img
                    

                    Have fun

                    Tom ElliottT 1 Reply Last reply Reply Quote 2
                    • Tom ElliottT
                      Tom Elliott @dolf
                      last edited by

                      @dolf Maybe, with this addition, I can create some code that can do this automagically? May not be a while but I think it could be very useful. Of course I don’t know if gunzip will work if say the CloneZilla image is not already compressed.

                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      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

                      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman @Tom Elliott
                        last edited by

                        @Tom-Elliott Or if something besides beginner mode is used in CloneZilla

                        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/

                        1 Reply Last reply Reply Quote 0
                        • dolfD
                          dolf
                          last edited by

                          If the CloneZilla image is not compressed, it will not have the .gz extention (easy to check for), and the last command becomes:

                          cat /home/user/czimg/sda2.ntfs-ptcl-img.* | pigz -stdout > /images/fogimg/d1p2.img
                          

                          If CloneZilla was invoked using dd, we can concatenate and pipe to partclone:

                          cat /home/user/czimg/sda2.ntfs-dd-img.* | partclone.$fstype -fsck-src-part -c -s - -O - | pigz -c > /images/fogimg/d1p2.img
                          

                          etc… There might be a few more cases to consider.

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

                          113

                          Online

                          12.1k

                          Users

                          17.3k

                          Topics

                          155.4k

                          Posts
                          Copyright © 2012-2024 FOG Project