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

    Bug deploying image in multidisk system

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    3
    10
    2.7k
    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.
    • F
      Fernando Gietz Developer
      last edited by Fernando Gietz

      Hi support,

      Finally I can upload images multidisk to the server. I have one question. If you have a multidisk computer, and in the first disk you have installed W7 with recovery partition, system partition and another one for data and the other disk Ubuntu, What type of image do you must setup in the image definition?

      -rwxrwxrwx  1 root root 1,0M feb 26 16:02 d1.mbr
      -rwxrwxrwx  1 root root 8,6M feb 26 16:02 d1p1.img
      -rwxrwxrwx  1 root root 5,0G feb 26 16:11 d1p2.img
      -rwxrwxrwx  1 root root  190 feb 26 16:02 d1.partitions
      -rwxrwxrwx  1 root root    0 feb 26 16:11 d2.has_grub
      -rwxrwxrwx  1 root root 1,0M feb 26 16:11 d2.mbr
      -rwxrwxrwx  1 root root   47 feb 26 16:13 d2.original.swapuuids
      -rwxrwxrwx  1 root root 1,4G feb 26 16:13 d2p1.img
      -rwxrwxrwx  1 root root  512 feb 26 16:13 d2p2.ebr
      -rwxrwxrwx  1 root root  512 feb 26 16:11 d2p5.ebr
      -rwxrwxrwx  1 root root  250 feb 26 16:11 d2.partitions
      
      

      When I try to download this image to the computer, I get different errors.

      If I setup the image type like “Other(99)”, the error that appears is

      0_1456504577235_Error_Other99_setup.png

      Ig I setup image like “Windows 7” or “Windows Other”, I can download the first disk image but when partclone try to download the first partition of the second disk fails because FOG tries to copy the d2p1.img file in /dev/sda1.

      Partclone error

      0_1456504907085_Error_Partclone_Windows_setup.png

      And the error log

      0_1456504927880_Error_Windows_setup.png

      Edite: I could dowload image multidisk before December versions

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Sebastian Roth

        @Fernando-Gietz Please don’t use OS type “Other (99)”. Unfortunately there are a lot of checks that don’t consider osid=99. @Tom-Elliott Should we get rid of 99 altogether? So many switch/case statements that miss on setting variables correctly when osid=99…

        Please try using Windows 7 for example! FOG should be able to detect the GRUB bootloader on the second disk even if OSID is not set to Linux.

        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
        • S
          Sebastian Roth Moderator
          last edited by

          @Fernando-Gietz You definitely found a bug there. I could fix it but I am not absolutely sure why the script was written the way it is - there might be something I am not aware of. I’ll post two fixes here and we see what @Tom-Elliott thinks is the better solution.

          First possible patch would be to simply remove that check at the end of the function. The variable $restoreparts is just not empty when we get to the second disk. Do you remember why you used this check?

          diff --git a/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh b/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          index b3b0e9f..7b4acfa 100644
          --- a/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          +++ b/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          @@ -715,7 +715,7 @@ getValidRestorePartitions() {
                   ls $imgpart >/dev/null 2>&1
                   [[ $? -eq 0 ]] && valid_parts="$valid_parts $part"
               done
          -    [[ -z $restoreparts ]] && restoreparts=$(echo $valid_parts | uniq | sort -V)
          +    restoreparts=$(echo $valid_parts | uniq | sort -V)
           }
           # Makes all swap partitions and sets uuid's in linux setups
           #
          

          Second possible patch if you want to keep the check at the end of the function. Just empty $restoreparts every time this function is called:

          diff --git a/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh b/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          index b3b0e9f..05ec710 100644
          --- a/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          +++ b/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
          @@ -677,6 +677,7 @@ getValidRestorePartitions() {
               [[ -z $disk ]] && handleError "No disk passed (${FUNCNAME[0]})\n   Args Passed: $*"
               [[ -z $disk_number ]] && handleError "No disk number passed (${FUNCNAME[0]})\n   Args Passed: $*"
               [[ -z $imagePath ]] && handleError "No image path passed (${FUNCNAME[0]})\n   Args Passed: $*"
          +    [[ ! -z $restoreparts ]] && restoreparts=""
               local valid_parts=""
               local parts=""
               local part=""
          
          

          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
          • F
            Fernando Gietz Developer
            last edited by

            Thanks, Sebastian, for your quick answer 😉

            I will wait then for the definitive patch and test it.

            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @Tom-Elliott Which way should we go with this you think?

              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

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

                @Sebastian-Roth I went the route of the first patch. This should be all there now too.

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

                  @Fernando-Gietz Push has been sent, just need to know if it is working 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! 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
                  • F
                    Fernando Gietz Developer
                    last edited by

                    I have update the version and it seems that it works fine. The second disk is recovering the image. I need to do more test but windows 7 and windows 7 disks works fine.

                    If I have in the first disk Windows7 and in the second disk Ubuntu, How do I setup the image type?

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

                      @Fernando-Gietz Setup for Windows 7, I imagine. THough I’m still not certain resizable will work on a multidisk setup. At that point, it’d be good as is anyway.

                      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
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @Fernando-Gietz Thanks for testing and reporting! Marking this solved now but please keep on testing an let us know if you find another issue with this - as we usually don’t have the setup to test multidisk stuff all the time!

                        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

                        125

                        Online

                        12.1k

                        Users

                        17.3k

                        Topics

                        155.4k

                        Posts
                        Copyright © 2012-2024 FOG Project