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

    Win7x64 : Golden Image : partitions problems ... again

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    4
    56
    9.5k
    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

      @Jonathan-Cool Too bad to hear this has not worked for you! I remember having that weird feeling when this was added that those accents might cause an issue. Can you please do another debug session an run the following command: blkid -po udev $part | grep FS_LABEL

      Let’s see how the label looks like on your machine.

      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
      • Jonathan CoolJ
        Jonathan Cool
        last edited by Jonathan Cool

        Hi !
        I ran a new debug task on a client …

        [Wed Sep 12 root@fogclient ~]# blkid -po udev $part | grep FS_LABEL
        blkid: The low-level probing mode requires a device
        
        
        [Wed Sep 12 root@fogclient ~]# blkid                               
        /dev/ram0: UUID="885cb2cc-e11f-4e88-8182-ee60a35f43d1" TYPE="ext2"
        /dev/sda1: LABEL="RM-CM-)servM-CM-) au systM-CM-(me" UUID="8E4C92C44C92A70D" TYPE="ntfs" PARTUUID="c91a5cff-01"
        /dev/sda2: LABEL="System" UUID="46E2941BE29410F3" TYPE="ntfs" PARTUUID="c91a5cff-02"
        

        On the 2nd command, we can see the very strange label of /dev/sda1 … !

        Edit : I deployed a classic image on o7010 and tried the same commands : same results … :

        [Wed Sep 12 root@fogclient ~]# blkid
        /dev/ram0: UUID="885cb2cc-e11f-4e88-8182-ee60a35f43d1" TYPE="ext2"
        /dev/sda1: LABEL="RM-CM-)servM-CM-) au systM-CM-(me" UUID="A27C916A7C9139CD" TYPE="ntfs" PARTUUID="3f61e1ac-01"
        /dev/sda2: LABEL="System" UUID="34C09543C0950BEC" TYPE="ntfs" PARTUUID="3f61e1ac-02"
        [Wed Sep 12 root@fogclient ~]# blkid -po udev $part | grep FS_LABEL
        blkid: The low-level probing mode requires a device
        
        

        My stuff :
        Server :
        FOG Version : Running Version 1.5.9
        OS : Debian GNU/Linux 10
        FOG Client Version : 0.12
        Specifications :
        > All images are on a Synology NAS storage : mounted with NAS_ip:/images
        > French user :)
        > “If everything would work the first time, what would you have learned?”
        Challenges make knowledge growth … by George1421 ;)

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

          @Jonathan-Cool Ok, should have listened to my intuition - those character encoding things are just a nightmare.

          I think it’s wise to step back and try the route mentioned earlier. Edit /images/dev/postinitscripts/fog.postinit on your FOG server and add a single line to the end of that script so it would look like this:

          #!/bin/bash
          ## This file serves as a starting point to call your custom pre-imaging/post init loading scripts.
          ## <SCRIPTNAME> should be changed to the script you're planning to use.
          ## Syntax of post init scripts are
          #. ${postinitpath}<SCRIPTNAME>
          
          sed -i -e "s#\\[Rr\\]\\[Ee\\]\\[Ss\\]\\[Ee\\]\\[Rr\\]\\[Vv\\]\\[Ee\\]\\[Dd\\]#RM-CM-\\\)servM-CM-\\\)#gi" /usr/share/fog/lib/funcs.sh
          

          You know, regular expressions are just a bit tricky and those triple backslashes really look confusing. But I kind of tested this and I am fairly sure this should work if you get it all right.

          Save the file and boot up your client with a debug upload task. When you get to the shell run fog and right after it said “Running post init scripts” you want to stop it for the moment (ctrl+c). Then check to see if the script did its work: grep label /usr/share/fog/lib/funcs.sh and you should see something like this:

                      local label=$(getPartitionLabel "$part")
                      if [[ $label =~ [Rr][Ee][Cc][Oo][Vv][Ee][Rr][Yy] ]]; then
                      if [[ $label =~ RM-CM-\)servM-CM-\) || $label =~ [Rr][Éé][Ss][Éé][Rr][Vv][Éé] ]]; then
          # Gets the volume group name/label.
          # Get's volume labels from volume group.
          

          If your third line looks like this I would give it a try, just start the task again using the fog command. If it does not, play with the postinitscript and try again.

          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

          Jonathan CoolJ 2 Replies Last reply Reply Quote 0
          • Jonathan CoolJ
            Jonathan Cool @Sebastian Roth
            last edited by

            @Sebastian-Roth said in Win7x64 : Golden Image : partitions problems ... again:

            Save the file and boot up your client with a debug upload task

            i understand your way and your test … but if i really understood, i do the debug upload task on my VM ? Because you said “upload task” …

            My stuff :
            Server :
            FOG Version : Running Version 1.5.9
            OS : Debian GNU/Linux 10
            FOG Client Version : 0.12
            Specifications :
            > All images are on a Synology NAS storage : mounted with NAS_ip:/images
            > French user :)
            > “If everything would work the first time, what would you have learned?”
            Challenges make knowledge growth … by George1421 ;)

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

              @Jonathan-Cool said in Win7x64 : Golden Image : partitions problems ... again:

              but if i really understood, i do the debug upload task on my VM ?

              Yes, exactly what I meant! 🙂

              Ohh dang, I forgot the patch for fog.upload. So please edit your /images/dev/postinitscripts/fog.postinit again and make it look like this:

              #!/bin/bash
              ## This file serves as a starting point to call your custom pre-imaging/post init loading scripts.
              ## <SCRIPTNAME> should be changed to the script you're planning to use.
              ## Syntax of post init scripts are
              #. ${postinitpath}<SCRIPTNAME>
              
              sed -i -e "s#\\[Rr\\]\\[Ee\\]\\[Ss\\]\\[Ee\\]\\[Rr\\]\\[Vv\\]\\[Ee\\]\\[Dd\\]#RM-CM-\\\)servM-CM-\\\)#gi" /bin/fog.upload
              sed -i -e "s#\\[Rr\\]\\[Ee\\]\\[Ss\\]\\[Ee\\]\\[Rr\\]\\[Vv\\]\\[Ee\\]\\[Dd\\]#RM-CM-\\\)servM-CM-\\\)#gi" /usr/share/fog/lib/funcs.sh
              

              Hopefully I got it all right this time and it will upload the image for you in a way that you don’t have to change p1.fixed_size_partitions manually anymore.

              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

              Q 1 Reply Last reply Reply Quote 1
              • Jonathan CoolJ
                Jonathan Cool @Sebastian Roth
                last edited by Jonathan Cool

                Hi,

                I’m back after few off days …

                I tried your patch on the VM, upload the new image and tried a new download … it’s didn’t work.

                I tried to play with backslashes and no more sucess …

                BUT, i have an other idea :

                • run the VM
                • go to the Disks Management tool
                • right click on the “Partition réservé au système”
                • rename this damn partition to “System Reserved” (<-- it is the right US/english name ?)
                • upload the image on FOG
                • try a new DL on client …

                What do you think about that idea ?

                My stuff :
                Server :
                FOG Version : Running Version 1.5.9
                OS : Debian GNU/Linux 10
                FOG Client Version : 0.12
                Specifications :
                > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                > French user :)
                > “If everything would work the first time, what would you have learned?”
                Challenges make knowledge growth … by George1421 ;)

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

                  @Jonathan-Cool That should straight up work, but ofc doesn’t really help us prevent this problem in the future for new people.

                  1 Reply Last reply Reply Quote 0
                  • Jonathan CoolJ
                    Jonathan Cool
                    last edited by

                    You totally right …
                    I will try the download with the modified name partition.
                    If it’s works, we can realize new tests with the “sed” command hack to permanently fix this issue for all french people.

                    My stuff :
                    Server :
                    FOG Version : Running Version 1.5.9
                    OS : Debian GNU/Linux 10
                    FOG Client Version : 0.12
                    Specifications :
                    > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                    > French user :)
                    > “If everything would work the first time, what would you have learned?”
                    Challenges make knowledge growth … by George1421 ;)

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

                      @Sebastian-Roth Just wondering, but would it be possible to use unicode here for the accented characters?

                      edit: Just tested and no…

                      Though I wonder, can we just use the characters directly? My small test seems to think so. Which means:

                      if [[ $label =~ [Rr][Ee][Ss][Ee][Rr][Vv][Ee][Dd] || $label =~ [Rr][�~Ié][Ss][�~Ié][Rr][Vv][�~Ié] ]]; then
                      

                      Can be rewritten and simplified to:

                      if [[ $label =~ [Rr][EeÉé][Ss][EeÉé][Rr][Vv][EeÉé][Dd]? ]]; then
                      

                      I’m guessing the encoding gets messed up somewhere along the road �~Ié likely simply means é. Don’t know how or when this happens/happened, but that’s my guess (I’ve seen this before trying to sort out data in different languages)

                      1 Reply Last reply Reply Quote 0
                      • Jonathan CoolJ
                        Jonathan Cool
                        last edited by

                        Hm, we are close to find the issue … I can confirmed … when i renamed the system partition in my Golden Image, the reserved partition has the good size after a deploy on a o7010 …
                        So, the intuition was good … !

                        Screenshot on o7010 : https://drive.google.com/file/d/1btji1AQSUx7SmOQU5JsplMbENy6DFl1u/view?usp=sharing

                        My stuff :
                        Server :
                        FOG Version : Running Version 1.5.9
                        OS : Debian GNU/Linux 10
                        FOG Client Version : 0.12
                        Specifications :
                        > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                        > French user :)
                        > “If everything would work the first time, what would you have learned?”
                        Challenges make knowledge growth … by George1421 ;)

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

                          @Quazz said:

                          I’m guessing the encoding gets messed up somewhere along the road

                          Exactly what is happening. I don’t fancy trying to get the encodings right because this will break sooner than later again.

                          @Jonathan-Cool said:

                          I tried your patch on the VM, upload the new image and tried a new download … it’s didn’t work.

                          Can you please do another test, same way but do a debug upload and when you get to the shell run grep label /usr/share/fog/lib/funcs.sh, take a picture of the screen and post here. Just so we get an idea if the patching really works.

                          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
                          • Jonathan CoolJ
                            Jonathan Cool
                            last edited by

                            Hi !

                            @Sebastian-Roth I ran an upload debug task on VM and did the command : https://drive.google.com/file/d/1s1CVoUuPlNNCEK7bcn6TBpclbK4hc2bK/view?usp=sharing

                            What do you think about the result ?

                            My stuff :
                            Server :
                            FOG Version : Running Version 1.5.9
                            OS : Debian GNU/Linux 10
                            FOG Client Version : 0.12
                            Specifications :
                            > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                            > French user :)
                            > “If everything would work the first time, what would you have learned?”
                            Challenges make knowledge growth … by George1421 ;)

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

                              I wanna smack myself in the head.

                              I think the problem is simply that the second e is accented in the test whereas it shouldn’t be.

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

                                @Quazz said in Win7x64 : Golden Image : partitions problems ... again:

                                I think the problem is simply that the second e is accented in the test whereas it shouldn’t be.

                                Why do you think it shouldn’t be?? Reading what Jonathan posted a while ago I see two encoded e’s…

                                @Jonathan-Cool Looks good but… hmm?? Sorry for the forth and back here but can you please do another debug capture and run the following three commands:

                                grep label /usr/share/fog/lib/funcs.sh
                                grep label /bin/fog.upload
                                blkid -po udev | grep sda1
                                

                                Again take a picture and post here. Just so we have it all on one screen.

                                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

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

                                  @Sebastian-Roth Yes, the first and third e should be é but, the second e should just be a plain e!

                                  Observe

                                  if [[ $label =~ [Rr][Ee][Ss][Ee][Rr][Vv][Ee][Dd] || $label =~ [Rr][�~Ié][Ss][�~Ié][Rr][Vv][�~Ié] ]];
                                  

                                  The word it should look for is Réservé

                                  It will never match under these conditions and explains why the problem remains unsolved, imo.

                                  1 Reply Last reply Reply Quote 0
                                  • Jonathan CoolJ
                                    Jonathan Cool
                                    last edited by

                                    Hi !

                                    You right @Quazz … the good word is “Réservé” and not “Résérvé”.

                                    I’m back with the results of commands (on VM Golden Img) :
                                    https://drive.google.com/file/d/13gj87dVq2SThjy5IYdbmtiyOCZuXXtDu/view?usp=sharing

                                    my fog.postint :

                                    #!/bin/bash
                                    ## This file serves as a starting point to call your custom pre-imaging/post init loading scripts.
                                    ## <SCRIPTNAME> should be changed to the script you're planning to use.
                                    ## Syntax of post init scripts are
                                    #. ${postinitpath}<SCRIPTNAME>
                                    
                                    sed -i -e "s#\[Rr\]\[Ee\]\[Ss\]\[Ee\]\[Rr\]\[Vv\]\[Ee\]\[Dd\]#RM-CM-\\\)servM-CM-\\\)#gi" /bin/fog.upload
                                    sed -i -e "s#\[Rr\]\[Ee\]\[Ss\]\[Ee\]\[Rr\]\[Vv\]\[Ee\]\[Dd\]#RM-CM-\\\)servM-CM-\\\)#gi" /usr/share/fog/lib/funcs.sh```

                                    My stuff :
                                    Server :
                                    FOG Version : Running Version 1.5.9
                                    OS : Debian GNU/Linux 10
                                    FOG Client Version : 0.12
                                    Specifications :
                                    > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                    > French user :)
                                    > “If everything would work the first time, what would you have learned?”
                                    Challenges make knowledge growth … by George1421 ;)

                                    1 Reply Last reply Reply Quote 0
                                    • Jonathan CoolJ
                                      Jonathan Cool
                                      last edited by

                                      I think, this fix is not good : https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L493

                                      Maybe the good fix is : line 493 :

                                      if [[ $label =~ [Rr][Ee][Ss][Ee][Rr][Vv][Ee][Dd] || $label =~ [Rr][Éé][Ss][Ee][Rr][Vv][Éé] ]]; then
                                      

                                      My stuff :
                                      Server :
                                      FOG Version : Running Version 1.5.9
                                      OS : Debian GNU/Linux 10
                                      FOG Client Version : 0.12
                                      Specifications :
                                      > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                      > French user :)
                                      > “If everything would work the first time, what would you have learned?”
                                      Challenges make knowledge growth … by George1421 ;)

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

                                        @Jonathan-Cool I created a pull request for this, but in the mean time you can of course edit those files on your own install already. Should do the trick, I reckon.

                                        edit: Although, looking back, part of the problem is how blkid spits out the label when using é

                                        blkid | grep /dev/sda1
                                        

                                        Should spit it out.

                                        I’ve tested a bit myself and the same thing happens on my French installs.

                                        Will need further looking into.

                                        I also noticed I can’t type in certain characters in FOS such as é, perhaps related, will look into it later.

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

                                          @Jonathan-Cool Arghhhh, I got it wrong again. My bad!

                                          grep Vv /usr/share/fog/lib/funcs.sh
                                          grep Vv /bin/fog.upload
                                          blkid -po udev /dev/sda1 | grep LABEL
                                          

                                          Keeping my fingers crossed I get it right this time…

                                          @Quazz Thanks for finding the tripple é’s. Didn’t notice that. My guess is that it won’t help much because the label printed is not in the same character encoding as you noticed already. Thanks for the pull request. Shall I merge? I still hope we can come up with a way to pinpoint those partitions without labels. See my detailed comment here: https://github.com/FOGProject/fogproject/issues/195 (looking for files on the partitions might be way more reliable I hope)

                                          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

                                          Q 1 Reply Last reply Reply Quote 0
                                          • Jonathan CoolJ
                                            Jonathan Cool
                                            last edited by

                                            Hi,

                                            Thank you both for you precious help …

                                            Back with the results : https://drive.google.com/file/d/1hJXQ-H7C4gZPvAUlPlVz9CzmFmBeVLK2/view?usp=sharing

                                            @Quazz : How i can fix my funcs.sh ? i can hack it with my fog.postinit i think ? With sed tool …

                                            My stuff :
                                            Server :
                                            FOG Version : Running Version 1.5.9
                                            OS : Debian GNU/Linux 10
                                            FOG Client Version : 0.12
                                            Specifications :
                                            > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                            > French user :)
                                            > “If everything would work the first time, what would you have learned?”
                                            Challenges make knowledge growth … by George1421 ;)

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

                                            159

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project