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

    SVN 4103 Cloud 4848 Lenovo L420 manufacturer base image

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    2
    8
    2.3k
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by Wayne Workman

      Getting a strange error while uploading a non-resizable Win7 image. The video of it is below. I believe that this image trying to be captured is based on a manufacturer-image.

      It’s a Lenovo L420. FYI I’ve taken images from this model in my building successfully using scratch-images. Another building is getting this error.

      Do the @Developers know if this has been solved in the latest?

      Video:
      https://drive.google.com/file/d/0B30HraDw5zU5emxIUlJhSG5CWU9ncHFxQjdtYXZwMHMwTkww/view?usp=sharing

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

        Looking at the actual file from this revision here: http://sourceforge.net/p/freeghost/code/4103/tree/trunk/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh#l903

        Line 896 is what sets the count:

        local count=`sfdisk -d "${disk}" 2>/dev/null | \
            awk /start=\ *[1-9]/'{print $4+0}' | sort -n | head -n1`;
        

        Then it’s checked to see if it’s under two MB on line 904:

          if [ "$count" -gt 2048 ]; then
                count=2048;
            fi
        
        

        Looking at the latest revision’s copy of this file, I can see that the code is still the same here:

           local count=`sfdisk -d "${disk}" 2>/dev/null | \
            awk /start=\ *[1-9]/'{print $4+0}' | sort -n | head -n1`;
            local has_grub=`dd if=$1 bs=512 count=1 2>&1 | grep GRUB`;
            if [ "$has_grub" != "" ]; then
                local hasgrubfilename=`hasGrubFileName "${imagePath}" "${disk_number}"`;
                touch "$hasgrubfilename";
            fi
            # Ensure that no more than 1MiB of data is copied (already have this size used elsewhere)
            if [ "$count" -gt 2048 ]; then
                count=2048;
            fi
        

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

          The “Hack note” is especially interesting in svn 4103 of this file: trunk / src / buildroot / package / fog / scripts / usr / share / fog / lib / funcs.sh

          saveGRUB() {
              local disk="$1";
              local disk_number="$2";
              local imagePath="$3";
              # Determine the number of sectors to copy
              # Hack Note: print $4+0 causes the column to be interpretted as a number
              #            so the comma is tossed
              local count=`sfdisk -d "${disk}" 2>/dev/null | \
              awk /start=\ *[1-9]/'{print $4+0}' | sort -n | head -n1`;
              local has_grub=`dd if=$1 bs=512 count=1 2>&1 | grep GRUB`;
              if [ "$has_grub" != "" ]; then
                  local hasgrubfilename=`hasGrubFileName "${imagePath}" "${disk_number}"`;
                  touch "$hasgrubfilename";
              fi
              # Ensure that no more than 1MiB of data is copied (already have this size used elsewhere)
              if [ "$count" -gt 2048 ]; then
                  count=2048;
              fi
              local mbrfilename=`MBRFileName "${imagePath}" "${disk_number}"`;
              dd if="$disk" of="$mbrfilename" count="${count}" bs=512 &>/dev/null;
          }
          

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

            So on line 904, we have this:

            if [ "$count" -gt 2048 ]; then
                    count=2048;
                fi
            

            which is basically saying if sectors of the MBR is greater than 2048, then set the sector count to 2048.

            But the error in the above video says “Integer expression expected”. So we can assume what count contains in this instance is not an integer…

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

              @Developers What do you think of this?

              —edited—

              if [ "$count" -eq "$count" ] 2>/dev/null
              then
                  if [ "$count" -gt 2048 ]; then
                      count=2048;
                  fi
              else
                  echo "ERROR: The sector count of the MBR was not returned properly, assuming 2048."
                  count=2048;
              fi
              

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

                So, in a debug upload, in the variable dump, the HD is listed as /dev/sda as usual.

                However, sfdisk -d /dev/sda has no useful output.

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

                  Could one of the @Developers help me understand what is done with the files inside of /trunk/src/buildroot/package/fog/scripts/usr/share/fog/lib during installation ?
                  The only place I can find them on my server is in that location.

                  What is done with those during the installation? Where do they go? Where are they placed?

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

                    Those are nothing more than the source files to what/how our inits work. They’re not installed anywhere and nothing is done with them during installation.

                    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 0
                    • 1 / 1
                    • First post
                      Last post

                    207

                    Online

                    12.1k

                    Users

                    17.3k

                    Topics

                    155.3k

                    Posts
                    Copyright © 2012-2024 FOG Project