1.3.5 RC13 Error in Fog script when attempting to expand partitions



  • Server
    • FOG Version: 1.35.RC13
    • OS: Ubuntu 14.04
    Client
    • Service Version: 0.9.12
    • OS: Windows
    Description

    While deploying image, on expand/fill partitions phase the following error rises:
    "* Attempting to expand/fill partitions…awk: fatal: cannot open file ‘-v’ for reading (No such file or directory)"



  • @Tom-Elliott Thank you very much. Updated to RC14 and working perfect.



  • @Tom-Elliott Thanks!


  • Senior Developer

    I found this error last night and had already had it fixed in the working branch. Was hoping a good test with a couple of users who had 4k disks to test. I’ve pushed up RC-14 to fix this particular error.



  • While they fix this bug in future releases, a workaround is to edit the file fogproject/src/buildroot/package/fog/scripts/usr/share/fog/lib/partition-funcs.sh and modify this line of code

    local awkArgs="-v SECTOR_SIZE=$sectorsize CHUNK_SIZE=$chunksize -v MIN_START=$minstart"
    

    with this one:

    local awkArgs="-v SECTOR_SIZE=$sectorsize -v CHUNK_SIZE=$chunksize -v MIN_START=$minstart"
    

    And then in fogproject/src do a “make install-inits”. That will recompile the init.xz and init_32.xz in your actual installation (/var/www/fog/service/ipxe) with this fix.

    I have done it with my current installation and fixed the bug.



  • @michelsantana Absolutely. That’s it.
    Sure Fog guys are going to get a fix soon.



  • @Frank

    Seems that the problem come from the script that call the function procsfdisk. In the definition (procsfdisk.awk) you can find:

    # This is where it all begins (See->BEGIN) :)
    BEGIN {
        # Arguments - Use "-v var=val" when calling this script
        # CHUNK_SIZE;
        # MIN_START;
    

    And in the script partition-funcs.sh, in the same directory, you can find that the call to the procsfdisk function:

    local awkArgs="-v SECTOR_SIZE=$sectorsize CHUNK_SIZE=$chunksize -v MIN_START=$minstart"
    
     # process with external awk script
        /usr/share/fog/lib/procsfdisk.awk $awkArgs $data
    

    And as you can see, there is a missing “-v”. Perhaps that’s the problem.



  • @Frank said in 1.3.5 RC13 Error in Fog script when attempting to expand partitions:

    Server
    • FOG Version: 1.35.RC13
    • OS: Ubuntu 14.04
    Client
    • Service Version: 0.9.12
    • OS: Windows
    Description

    While deploying image, on expand/fill partitions phase the following error rises:
    "* Attempting to expand/fill partitions…awk: fatal: cannot open file ‘-v’ for reading (No such file or directory)"

    It seem the problem is in fog.download.
    When executing /usr/share/fog/lib/procsfdisk.awk it lacks “-v” before “CHUNK_SIZE=512”



  • Hello,

    Same problem here (Server on CentOS 7). I have done a capture from a computer with a small disk and three partitions (30MB, 45GB and 29,4 GB) using FOG 1.3.5RC13 and when I try to deploy it to another computer with a bigger HD, have the same error.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.