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

    How To: Make progress bars appear for multiple-partition tasks

    Scheduled Pinned Locked Moved
    FOG Problems
    11
    43
    23.0k
    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.
    • Lee RowlettL
      Lee Rowlett Developer
      last edited by

      i can’t remember who the original author was but, you have to change the “fog” file within the init.gz. i haven’t got the original to hand but it’s around line 450 depending on what version you’re running but this is what the code needs to change to:
      [CODE]
      if [ -f “$imgpart” ]; then
      if [ “$mc” = “yes” ]; then
      udp-receiver --nokbd --portbase ${port} --mcast-rdv-address ${storageip} 2>/dev/null | partimage -f3 -b restore $part stdin;
      else
      # NEW: Added to make progress bar work for multi-partition image, added on 8/17/2011
      if [ “$capone” == “1” ]; then
      export FOGSTATS=“0”;
      else
      export FOGSTATS=“1”;
      fi
      fog.statusreporter $mac $web &
      # CHANGED: next line add to end: 2>/tmp/status.fog
      partimage restore $part $imgpart -f3 -b 2>/tmp/status.fog
      fi
      else
      echo " * Partition File missing: $imgpart";
      fi
      [/CODE]

      added bigger chunk of the code so you can work out what needs to be changed.
      check out [URL=‘http://www.fogproject.org/wiki/index.php/Modifying_the_Init_Image’]Modifying the Init Image[/URL] in the wiki.

      hope this helps

      1 Reply Last reply Reply Quote 0
      • E
        Eclat2k
        last edited by

        Ok, I’ll try it.

        Thank you very much.

        1 Reply Last reply Reply Quote 0
        • C
          chad-bisd Moderator
          last edited by

          I moved this to tutorials and edited the code block to make it easier to see what needs to be changed. Thanks to the original author, I think their name got lost to the old forums or I just can’t find it.

          I can verify this works for my FOG 0.32 setup on Ubuntu 10.04, but since it’s a FOG script thing, it should work on just about any other OS you can run FOG on.


          If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

          1 Reply Last reply Reply Quote 0
          • S
            Snorty
            last edited by

            Hello,
            How can I change the “fog” file within the init.gz? Do I have to extract the init.gz and edit the file? This is what I’ve tried so far, but when I want to open the extracted init file it just shows me strange symbols.

            [img]http://www.tinyuploads.com/images/962izY.jpg[/img]

            1 Reply Last reply Reply Quote 0
            • J
              Jason Garrison
              last edited by

              Going to the Wiki page and doing a search for Changing inti.gz found this result.

              [url]http://www.fogproject.org/wiki/index.php/Modifying_the_Init_Image[/url]

              It show you what you want to know.

              1 Reply Last reply Reply Quote 0
              • J
                Jason Garrison
                last edited by

                Hey Lee, sorry I didn’t see that you had that link under your code post. So Snorty, did you run through the tutorial and are still having issues?

                1 Reply Last reply Reply Quote 0
                • S
                  Snorty
                  last edited by

                  Thank you, Jason!
                  I should use this good Wiki more often.

                  Edit: No, I didn’t go through the tutorial yet. Because I’m a little bit under pressure, I’ve just asked how to modify it in this forum. I’ll use your link now, thank you.

                  [img]http://www.tinyuploads.com/images/962izY.jpg[/img]

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jason Garrison
                    last edited by

                    I was just making sure that it wasn’t something the tutorial missed. I seem to always go back to that tutorial also, so you’re not alone! I hope it helps!

                    1 Reply Last reply Reply Quote 0
                    • S
                      Snorty
                      last edited by

                      The Tutorial explains everything I need to know, so it’s all fine 🙂
                      I just didn’t see Lee’s link.

                      [img]http://www.tinyuploads.com/images/962izY.jpg[/img]

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jason Garrison
                        last edited by

                        I also wanted to make it so that it showed the progress while uploading. It doesn’t show the status bar until about 14 seconds into the upload, but this makes it work for the multi partition choices. To do so I added the following:

                        First Add was around line 997

                        [CODE] if [ -n “$disk” ]
                        then
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        export FOGSTATS=“1”;
                        fog.statusreporter $mac $web &
                        macWinSafe=echo $mac | sed 's/://g';
                        echo -n " * Preparing backup location…";[/CODE]

                        Second Add was around line 1032

                        [CODE] mkfifo /tmp/pigz1
                        partNum=${part:$diskLength};
                        echo " * Processing Partition: $part (${partNum})“;
                        sleep 1;
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        export FOGSTATS=“1”;
                        fog.statusreporter $mac $web &
                        imgpart=”${tmpBackupPath}/d1p${partNum}.img";
                        pigz -p $cores $PIGZ_COMP < /tmp/pigz1 > $imgpart &
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        #Added 2>/tmp/status.fog on the next line.
                        partimage save $part /tmp/pigz1 --volume=9900000000 -z0 -o -d -f3 -b -c 2>/tmp/status.fog
                        mv ${imgpart}.000 ${imgpart} 2>/dev/null
                        chmod -R 777 $tmpBackupPath 2>/dev/null[/CODE]

                        Third Add was around line 1076

                        [CODE] echo -n " * Preparing backup location…“;
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        export FOGSTATS=“1”;
                        fog.statusreporter $mac $web &
                        macWinSafe=echo $mac | sed 's/://g';
                        tmpBackupPath=”/images/$macWinSafe";[/CODE]

                        Fourth Add was around line 1123

                        [CODE] mkfifo /tmp/pigz1
                        partNum=${part:$diskLength};
                        echo " * Processing Partition: $part (${partNum})“;
                        sleep 1;
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        export FOGSTATS=“1”;
                        fog.statusreporter $mac $web &
                        imgpart=”${tmpBackupPath}/d${intDisk}p${partNum}.img";
                        pigz -p $cores $PIGZ_COMP < /tmp/pigz1 > $imgpart &
                        #Added from the fix for mps and mpa deploying to fix uploading status bar.
                        #Added 2>/tmp/status.fog on the next line.
                        partimage save $part /tmp/pigz1 --volume=9900000000 -z0 -o -d -f3 -b -c 2>/tmp/status.fog
                        mv ${imgpart}.000 ${imgpart}
                        chmod -R 777 $tmpBackupPath[/CODE]

                        1 Reply Last reply Reply Quote 0
                        • x23piracyX
                          x23piracy
                          last edited by

                          Hey Jason,

                          can you upload your finished file please? my try causes the machine to reboot 😞
                          I have fog 0.32 do you use the same?
                          Since i cannot be sure if the position you mentioned are right all my trys went into a reboot of the test machine.

                          Greetz X23

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

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jason Garrison
                            last edited by

                            This is my fog file from tftpboot\fog\images\ and within the extracted init.gz file. I think it only has the Multi fix for the progress bar with uploading and downloading. Just use the line numbers I put to find where I have my code put in. Hopefully this helps, it is nice to have the multi progress bar in the GUI for uploading images now.

                            [url=“/_imported_xf_attachments/0/321_fog.zip?:”]fog.zip[/url]

                            1 Reply Last reply Reply Quote 0
                            • x23piracyX
                              x23piracy
                              last edited by

                              Hi,

                              [quote=“Jason Garrison, post: 12228, member: 1188”]This is my fog file…[/quote]

                              thank you jason 😄
                              I will compare the original file against yours with a comparision tool and post the accurate changes in form of search for xy append before or something so no confusion should happen 🙂

                              Greetz X23

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

                              1 Reply Last reply Reply Quote 0
                              • x23piracyX
                                x23piracy
                                last edited by

                                Hi,

                                these are the changes i found:

                                [B]==========================Change 1==========================[/B]
                                [IMG]http://i.imgur.com/Czb26ws.png[/IMG]

                                [B]==========================Change 2==========================[/B]
                                [IMG]http://i.imgur.com/WWLRp1D.png[/IMG]

                                [B]==========================Change 3==========================[/B]
                                [IMG]http://i.imgur.com/ySnh8cj.png[/IMG]

                                [B]==========================Change 4==========================[/B]
                                [IMG]http://i.imgur.com/wlHPUlK.png[/IMG]

                                [B]==========================Change 5==========================[/B]
                                [IMG]http://i.imgur.com/0N6GeHC.png[/IMG]

                                Anyway your file works 🙂

                                Greetz X23

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

                                1 Reply Last reply Reply Quote 0
                                • T
                                  The Dealman
                                  last edited by

                                  [quote=“x23piracy, post: 12240, member: 3982”]Hi,

                                  these are the changes i found:

                                  [B]==========================Change 1==========================[/B]
                                  [IMG]http://i.imgur.com/Czb26ws.png[/IMG]

                                  [B]==========================Change 2==========================[/B]
                                  [IMG]http://i.imgur.com/WWLRp1D.png[/IMG]

                                  [B]==========================Change 3==========================[/B]
                                  [IMG]http://i.imgur.com/ySnh8cj.png[/IMG]

                                  [B]==========================Change 4==========================[/B]
                                  [IMG]http://i.imgur.com/wlHPUlK.png[/IMG]

                                  [B]==========================Change 5==========================[/B]
                                  [IMG]http://i.imgur.com/0N6GeHC.png[/IMG]

                                  Anyway your file works 🙂

                                  Greetz X23[/quote]

                                  Fog 1.5.9 running currently on all servers

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    The Dealman
                                    last edited by

                                    What’s suppose to be in the init.gz file? I see the init file inside of mine, am i suppose to download the fog.zip file & overwrite the init.gz file ? or do i take out the fog file & add that to my init.gz file?

                                    As you can see i’m confused on this one

                                    Fog 1.5.9 running currently on all servers

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      smshahan
                                      last edited by

                                      [quote=“The Dealman, post: 12945, member: 53”]What’s suppose to be in the init.gz file? I see the init file inside of mine, am i suppose to download the fog.zip file & overwrite the init.gz file ? or do i take out the fog file & add that to my init.gz file?

                                      As you can see i’m confused on this one[/quote]

                                      Did you figure this out or do you still need assistance?

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        The Dealman
                                        last edited by

                                        [quote=“smshahan, post: 13196, member: 2574”]Did you figure this out or do you still need assistance?[/quote]

                                        I haven’t gotten it to work so i put init.gz file back how it was.

                                        Fog 1.5.9 running currently on all servers

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          The Dealman
                                          last edited by

                                          [quote=“smshahan, post: 13196, member: 2574”]Did you figure this out or do you still need assistance?[/quote]

                                          Do you have this working?

                                          Fog 1.5.9 running currently on all servers

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            smshahan
                                            last edited by

                                            [quote=“The Dealman, post: 13235, member: 53”]Do you have this working?[/quote]

                                            Haven’t fully tested my changes out but I’ll get back to you possibly Wednesday if I get this working. I’ve been busy with another fog server.

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

                                            190

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project