ClamAV not finisihing download on Host PC



  • Hi i am having problem with my FoG server. i can see that its downloading the file on host PC the problem is when it reaches around 70++ percent. It will show an error that unable to write some bytes to file. i have googled everything about this and to no avail. Please help… Thanks!



  • @Tom Elliott, post: 41986, member: 7271 said:

    You can maintain the same size at 150, or 500.

    However, you will need to upsize the amount of ram. I forget if this is even possible on 0.32. Basically FOG Configuration->FOG Settings->General Settings->TFTP Server->FOG_KERNEL_RAMDISK_SIZE

    Change it from 127000 to say 600000 (to allow the size of 500MB if you wanted it.

    Thanks again sir tom, i have tried it again and it always failed around 80 percent again failed to write again. the space is @ 250mb is it still the size of the acocated space on tftp that causes this? if i cant make this work can you recommend me some newer version of fog that doesn’t need to update the ClamAV


  • Senior Developer

    You can maintain the same size at 150, or 500.

    However, you will need to upsize the amount of ram. I forget if this is even possible on 0.32. Basically FOG Configuration->FOG Settings->General Settings->TFTP Server->FOG_KERNEL_RAMDISK_SIZE

    Change it from 127000 to say 600000 (to allow the size of 500MB if you wanted it.



  • well now i have tried it on 100mb and still having problems on 80 percent. it says failed to write again. i raised the capacity to 150 and this error shows up. even if i raised it up until 500mb i still have this same error please see the picture for references thanks!

    init.gz problem.JPG



  • Thanks sir Tom. i have manage to resize the init.gz files with the instructions that you have provided. will try later if i could sucessfully download the clamAV

    resized init.JPG


  • Senior Developer

    I think you have to first format the img file you’re working with:

    mkfs.ext2 new.img
    

    Then you can mount it with:

    mount -o loop new.img new
    

    run your commands to rsync the data.

    Then you can unmount.

    Run fsck on the new img file with:

    fsck.ext2 new.img
    

    Then rename the file to make gzip easier and knowledgable:

    mv new.img init
    gzip -9 init
    

    Hopefully this helps.



  • mounting.JPG


  • Senior Developer

    @Uncle Frank, post: 41904, member: 28116 said:

    This is untested and probably not supported but you can give it a try. You’ll find that file in ‘/var/www/fog/service/ipxe’ (this is in version 1.2.0, hope it hasn’t changed).

    Yes it has changed, but to help out the location for 0.32 is:

    # cd /tftpboot/fog/images/
    # gunzip init.gz
    # mkdir original
    # mount -o loop init original
    

    Now you can see and change the files in init.gz. But to increase the size you’d have to create a new one. So check the size of the old one first, create a new bigger one, mount that and copy all contents:

    # df -h
    ...
    /dev/loop0            57M  49M  4.7M  92% /tftpboot/fog/images/original
    # dd if=/dev/zero of=new.img bs=1M count=100
    # mkdir new
    # mount -o loop new.img new
    # df -h
    ...
    # rsync -av original/ new/
    

    [B]Make sure that you have the slashes right when running ‘rsync’ or you’ll end up with a broken directory structure inside the init-file.[/B]

    # unmount original
    # unmount new
    # mv init init_original
    # gzip init_original
    # mv new.img init
    # gzip init
    

    Try booting your clients…[/quote]


  • Developer

    This is untested and probably not supported but you can give it a try. You’ll find that file in ‘/var/www/fog/service/ipxe’ (this is in version 1.2.0, hope it hasn’t changed).

    # cd /var/www/fog/service/ipxe
    # gunzip init.gz
    # mkdir original
    # mount -o loop init original
    

    Now you can see and change the files in init.gz. But to increase the size you’d have to create a new one. So check the size of the old one first, create a new bigger one, mount that and copy all contents:

    # df -h
    ...
    /dev/loop0             57M   49M  4.7M  92% var/www/fog/service/ipxe/original
    # dd if=/dev/zero of=new.img bs=1M count=100
    # mkdir new
    # mount -o loop new.img new
    # df -h
    ...
    # rsync -av original/ new/
    

    [B]Make sure that you have the slashes right when running ‘rsync’ or you’ll end up with a broken directory structure inside the init-file.[/B]

    # unmount original
    # unmount new
    # mv init init_original
    # gzip init_original
    # mv new.img init
    # gzip init
    

    Try booting your clients…



  • Is there a way to increase the size of init.gz on fog 0.32?



  • @Tom Elliott, post: 41890, member: 7271 said:

    What version of FOG are you using?

    It sounds like you’re using a version where clamav is embedded in the init.gz/xz file. This issue isn’t due to the hard disk directly. It’s most likely due to it trying to put the clamav database file on the init sections itself. The Init is capped at a specific size. Minor text edits can be done, but files over say 10mb will have issues.

    Hi sir is there a way to work around on this? how do i resize the init.gz file? i am using fog 0.32 with ubuntu 12.04 LTS


  • Senior Developer

    What version of FOG are you using?

    It sounds like you’re using a version where clamav is embedded in the init.gz/xz file. This issue isn’t due to the hard disk directly. It’s most likely due to it trying to put the clamav database file on the init sections itself. The Init is capped at a specific size. Minor text edits can be done, but files over say 10mb will have issues.



  • Hi Thanks for the Reply Junkhacker on the FOG Home page i am only using 4 percent of the hard drive. it doesnt have any images or what so ever. im kinda having trouble making this work. i think i am only using around 5GB of space on my hard drive. and it has a total of 50 GB


  • Developer

    could there be a problem with the disk you’re trying to download to?


  • Developer

    Maybe your disk space is exceeded? Run this command on your FOG server to see how much space is left:

    df -h
    


  • By the way i am using ubuntu 12.04 LTS and my FOG server version is 0.32 THanks!


Log in to reply
 

414
Online

38746
Users

10569
Topics

100055
Posts

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