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

    Copy Sectors 5-7 from HDD

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    6
    12
    1.9k
    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.
    • kaiK
      kai
      last edited by

      Server
      • FOG Version: 1.3.5
      • OS: Debian 9
      Client
      • Service Version: ?
      • OS: Win7 x64
      Description

      When capturing an image I need to make sure that sectors 5,6 and 7 of the HDD/SSD are stored, because the so-called “Wächterkarte” from Dr. Kaiser GmbH stores its configuration in those sectors. I also need to make sure that the sectors are recreated while deploying.
      There has been an option somewhere™ which sounded like it was the one I need, but I can’t find it any more.
      What might work? I can recapture the image.
      (if the sectors are not there I have to configure every PC manually which is some pita, as the f**** Smarttech-Beamers are not intelligent enough to display 640x480/BIOS)

      Kind regards
      Kai

      x23piracyX 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        I think for this I would use the raw disk capture/deploy option. With locating specific sectors, any type of resizing may potentially change these file locations.

        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!

        kaiK 1 Reply Last reply Reply Quote 0
        • kaiK
          kai @george1421
          last edited by

          @george1421 regarding the locations: I tend to not thinking in files here, because the card relies on the sectors 5 to 7 being present (and outside of a filesystem) and filled with the expected data, otherwise it asks to be installed.
          Raw capture/deploy might be an option - but does this come with compression? Otherwise I might get stuck as I can only use 100 MBit/s-switchports here 😕

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @kai
            last edited by

            @kai yes raw mode has compression before its uploaded to the fog server. You just can’t shrink or expand the volume. As for compression if you are using fog 1.3.5 you can use zstd compression which will take longer to upload, but you will get a somewhat smaller file on the FOG server and quicker decompression speeds over the fog standard gzip compression.

            In your case I would take an image and see if you can use raw disk format to get what you need.

            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!

            JunkhackerJ 1 Reply Last reply Reply Quote 0
            • JunkhackerJ
              Junkhacker Developer @george1421
              last edited by Junkhacker

              @george1421 if he’s only got a 100Mbit connection, zstd might actually be faster on the upload too, since the bandwidth will be the major bottleneck, not cpu utilization.

              signature:
              Junkhacker
              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

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

                Assuming a 512 byte sector size, this is the dd command to read sectors 5 through 7 to a file from disk 1.

                dd if=/dev/sda of=/images/someImage/sectors5_7 skip=5 count=3 bs=512
                

                To write that file back to those sectors:

                dd if=/images/someImage/sectors5_7 of=/dev/sda skip=5 count=3 bs=512
                

                You would need to capture these sectors manually - then you would need to write a postdownloadscript to check for this file sectors5_7 in the image you’re deploying. and if it’s there, to write it.

                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/

                george1421G 1 Reply Last reply Reply Quote 1
                • george1421G
                  george1421 Moderator @Wayne Workman
                  last edited by george1421

                  @Wayne-Workman You could use a postinit script function of FOG, a little bash shell programming and your script to capture those sectors before image capture too. That way the process would be fully automated.

                  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 1
                  • Tom ElliottT
                    Tom Elliott
                    last edited by

                    The way imaging happens is block for block. As long as there’s data on a sector, and those blocks are used, it will be copied. Is there a reason for this request, or is this more just information gathering trying to make sure if you make an image of this device the elements you need will be copied.

                    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

                    george1421G 1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator @Tom Elliott
                      last edited by

                      @Tom-Elliott The way I understand this is their copy protection software writes specific values in sectors 5-7 on the disk. If those sectors are not there or damaged then the copy protected software will think the license is invalid. So if we set aside the legality of what the OP is doing (I assume he is properly licensed). When you image something with single disk resizable, there is a potential on an image resize the contents that were in sectors 5-7 may be skewed a bit by the image being resized.

                      Now in reality these are the very first sectors on the disk and the likelihood of them being shifted about is very small (and actually I’m a bit surprised that the master boot record doesn’t occupy those locations on the disk right now.

                      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
                      • Wayne WorkmanW
                        Wayne Workman
                        last edited by

                        Well, we’re only going on what we’re told. It might be sectors 5-7 of the boot partition, or the recovery partition, or of the entire disk. Maybe the software replaces the MBR. Who knows.

                        I posted those below commands so he could manually test this first - and see if it would even work or not. My bet is doing so would make the system not boot.

                        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
                        • x23piracyX
                          x23piracy @kai
                          last edited by

                          @kai any news? Topic is interesting 😉

                          ║▌║█║▌│║▌║▌█

                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            First I feel I should clarify, “Sectors 5-7” is always going to be in regards to the disk. I’m not aware of any system that refer’s to “Sectors” on a “partition” basis. Sector 5-7 will remain Sector 5-7 irrespective of the partition those sectors may reside in.

                            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

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

                            173

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project