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

    Image Deployment - Add Argument from GUI?

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    10
    511
    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.
    • N
      needtofog
      last edited by

      Trying to image a android devices that runs windows 10, BeeLink T4. I have tried using a resizable image and this bricked 3 devices. No biggy I can pull the drives and wipe them.

      I am trying to do a Raw image because I believe there are partitions FOG is not capturing due to android hiding them in some way. When I run the RAW Deploy I get an error along the lines of “Target disk size is X, Image size is XX, use -C argument (Warning not recommended”. I am not worry about the tail end disappearing and the fact the RAW is larger than the target tells me FOG was definitely missing something.

      My question, is there anyway to add an Argument from the web GUI when deploying an image? I have looked in every nook and cranny and the only thing I can find is Kernel Args which I know are not what I am looking for. Any help appreciated.

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

        @needtofog That command -C would need to be added when partclone was called in RAW mode. You will need to hack the fos linux code to do this. Is it possible yes, it will take some time to find the right spot.

        I’m a bit more curious about the hardware. Will you help us kind of spec out that hardware?

        If yes lets do this.

        1. Schedule another deploy, but before you hit the schedule task button tick the debug checkbox. Then schedule the task.
        2. PXE boot the target computer, you will need to press the enter key several times to reach the fos linux command prompt.

        Remote debugging tip:

        1. At the fos linux command prompt give root a password with passwd make it something simple like hello It will be reset at the next reboot so no worries.
        2. Key in ip a s to get the current IP address of the target computer.
        3. Now use putty or ssh from a workstation to the FOS Linux engine.

        Lets first start out with this command to show us the disk structure of the target computer (I’d like you to do this on the golden image computer too so we can compare what was captured vs what got deployed in single disk resizable or single disk non-resizable). Post the results here. You can use putty to copy the text and then you can paste the results here. Stay in the FOG Linux debug mode because I should have more commands for you.

        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!

        N 1 Reply Last reply Reply Quote 0
        • N
          needtofog @george1421
          last edited by

          @george1421 Thank you for your response. I will start off by I am kind of new to all of this. I was impressed I could even get the server off the ground. I apologize for my rookieness in advance. I have used this to image quite a bit of hardware, and can usually self iron out problems in an hour with some good old fashion digging. This one is just beyond me.

          I am running on unbuntu (GUI) with FOG 1.5.9. I registered the device as a “Host” with the quick option, and when selecting the host tab > click deploy icon next to host > it list the mac and a few other items. I do not see a debug option.

          I attempted to terminal openssh into local@127.0.0.1 (this is how I access the fog terminal - localhost/fog/etc) and none of the passwords seem to allow me connection.

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

            @needtofog said in Image Deployment - Add Argument from GUI?:

            when selecting the host tab > click deploy icon next to host > it list the mac and a few other items. I do not see a debug option.

            You should the a checkbox named “Schedule as debug task” right where you can schedule a deploy task in the FOG web UI. Let the device boot up via PXE as usual but instead of starting the deploy it will offer a console (after you hit ENTER twice) on that machine. Now here you can check the IP (ip a s), set a temporary root password (passwd) and then login to that PC via SSH.

            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

            N 2 Replies Last reply Reply Quote 0
            • N
              needtofog @Sebastian Roth
              last edited by

              @sebastian-roth Thank you Sebastian. I am unfortunately not goin gto be at work the rest of this week due to child health issues. I will do this first thing Monday morning.

              1 Reply Last reply Reply Quote 0
              • N
                needtofog @Sebastian Roth
                last edited by Sebastian Roth

                @sebastian-roth @george1421 The following is off the “Golden” device.

                [Mon Feb 14 root@fogclient ~]# lsblk
                NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
                mmcblk0      179:0    0 58.2G  0 disk 
                |-mmcblk0p1  179:1    0  100M  0 part 
                |-mmcblk0p2  179:2    0   16M  0 part 
                |-mmcblk0p3  179:3    0 57.3G  0 part 
                `-mmcblk0p4  179:4    0  837M  0 part 
                mmcblk0boot0 179:8    0    4M  1 disk 
                mmcblk0boot1 179:16   0    4M  1 disk 
                
                [Mon Feb 14 root@fogclient ~]# fdisk -l
                Disk /dev/ram0: 268.57 MiB, 281600000 bytes, 550000 sectors
                ...
                
                Disk /dev/mmcblk0: 58.25 GiB, 62537072640 bytes, 122142720 sectors
                Units: sectors of 1 * 512 = 512 bytes
                Sector size (logical/physical): 512 bytes / 512 bytes
                I/O size (minimum/optimal): 512 bytes / 512 bytes
                Disklabel type: gpt
                Disk identifier: 0F6696F7-1C72-437B-84D1-F25962414616
                
                Device             Start       End   Sectors  Size Type
                /dev/mmcblk0p1      2048    206847    204800  100M EFI System
                /dev/mmcblk0p2    206848    239615     32768   16M Microsoft reserved
                /dev/mmcblk0p3    239616 120426495 120186880 57.3G Microsoft basic data
                /dev/mmcblk0p4 120426496 122140671   1714176  837M Windows recovery environment
                
                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @needtofog Is the disk of the destination device smaller than the one you have in this “golden” device? That would explain the “Target disk size is X, Image size is XX” error.

                  If you really want to give adding the “-C” argument a try you can edit /usr/share/fog/lib/funcs.sh while you are in the debug shell. Hope you are fine using VI on the console. Jump to line 785 and add the argument to the partclone.restore call. Line 785 is for when you use Zstd compression. Line 804 for Gzip compressed image type.

                  I have tried using a resizable image and this bricked 3 devices.

                  On the other hand we might look into what’s causing this. It should not happen.

                  Which version of FOG do you use? As well which init version exactly?

                  This sounds like you are using the 1.5.9 FOG default init or maybe even an older one. You can download the latest init here and give that a try: https://github.com/FOGProject/fos/releases/latest

                  It would be great if you could give the latest init a try and if it still bricks your device I would be really interested in getting the ouput of sfdisk -d /dev/mmcblk0 before and after it’s bricked.

                  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

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    needtofog @Sebastian Roth
                    last edited by needtofog

                    @sebastian-roth The devices are all the exact same, even internal branding. I double checked that as that was my initial assumption.

                    I will attempt the C argument, I am not to great with consoles.

                    This is the golden image (only unbricked device we have currently)

                    [Mon Feb 14 root@fogclient ~]# sfdisk -d /dev/mmcblk0
                    label: gpt
                    label-id: 0F6696F7-1C72-437B-84D1-F25962414616
                    device: /dev/mmcblk0
                    unit: sectors
                    first-lba: 34
                    last-lba: 122142686
                    sector-size: 512
                    
                    /dev/mmcblk0p1 : start=        2048, size=      204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=8D5A7079-E907-408C-BC26-EB5B7BF2415C, name="EFI system partition", attrs="GUID:63"
                    /dev/mmcblk0p2 : start=      206848, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=82A8EDD5-2A65-46E8-8BE8-3F96EB0F0D7B, name="Microsoft reserved partition", attrs="GUID:63"
                    /dev/mmcblk0p3 : start=      239616, size=   120186880, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=CA45EFF7-43B4-436F-B05B-49D0E914BD9E, name="Basic data partition"
                    /dev/mmcblk0p4 : start=   120426496, size=     1714176, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=35B6FD12-C8E4-43C3-8D41-841AFC57202D, name="Basic data partition", attrs="RequiredPartition GUID:63"
                    

                    This is a bircked unit. I can’t even run sfdisk

                    Disk /dev/ram0: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram1: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram2: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram3: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram4: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram5: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram6: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram7: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram8: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram9: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram10: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram11: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram12: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram13: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram14: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/ram15: 268.57 MiB, 281600000 bytes, 550000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 4096 bytes
                    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                    
                    
                    Disk /dev/mmcblk0: 57.63 GiB, 61865984000 bytes, 120832000 sectors
                    Units: sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 512 bytes
                    I/O size (minimum/optimal): 512 bytes / 512 bytes
                    

                    In VI line 785 and 786, not sure where to add the -C

                    local imgPartitionType= "$4"
                    [[ -z $disk ]] && handleErrror "No disk passed (${FUNCNAME[0]})\n Args Passed: $*"
                    

                    I am not sure how to check which init I am on. Not real sure which one I should download, I will go check the fog project site.

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

                      @needtofog said in Image Deployment - Add Argument from GUI?:

                      The devices are all the exact same, even internal branding.

                      That is interesting. Then capture and deploy in RAW should not cause trouble.

                      This is the golden image (only unbricked device we have currently)

                      Ok, thanks for the output.

                      This is a bircked unit. I can’t even run sfdisk

                      What you you mean by can’t even run sfdisk? Error message or plain empty output?

                      In VI line 785 and 786, not sure where to add the -C
                      local imgPartitionType= “$4”
                      [[ -z $disk ]] && handleErrror “No disk passed (${FUNCNAME[0]})\n Args Passed: $*”

                      Ok, your FOS init is really old, from 2020 as far as I can see from the code you posted. Probably you run FOG 1.5.9 with the default init. In that case you need to jump to line 687 (Zstd) or 706 (Gzip) to add the -C.

                      I am not sure how to check which init I am on.

                      In that same file you edit take a look at line 2. The initversion number is defined there.

                      Not real sure which one I should download, I will go check the fog project site.

                      You mean which file(s)!? init.xz is for 64 bit (Intel/AMD), init_32.xz is for 32 bit and arm_init.cpio.gz is for 64 bit ARM CPUs. Not sure what CPU your devices have. Best to download all three and put those into /var/www/html/fog/service/ipxe on your FOG server.

                      PXE boot into debug again and verify you have the newer version number.

                      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

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        needtofog @Sebastian Roth
                        last edited by

                        @sebastian-roth I will install those inits tomorrow. I got confused on the inits due to all of the other files in that repository, in hindsight a lot of it is hash check files. Again, kind of new to all of this. I really appreciate all of your assistance.

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

                        205

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project