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!



  • [quote=“Tom Elliott, post: 41986, member: 7271”]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.[/quote]

    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!

    [url="/_imported_xf_attachments/1/1670_init.gz problem.JPG?:"]init.gz problem.JPG[/url]



  • 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

    [url="/_imported_xf_attachments/1/1669_resized init.JPG?:"]resized init.JPG[/url]


  • Senior Developer

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

    [code]mkfs.ext2 new.img[/code]

    Then you can mount it with:

    [code]mount -o loop new.img new[/code]

    run your commands to rsync the data.

    Then you can unmount.

    Run fsck on the new img file with:

    [code]fsck.ext2 new.img[/code]

    Then rename the file to make gzip easier and knowledgable:

    [code]mv new.img init
    gzip -9 init[/code]

    Hopefully this helps.



  • [quote=“Tom Elliott, post: 41906, member: 7271”]Yes it has changed, but to help out the location for 0.32 is:
    [CODE]# cd /tftpboot/fog/images/

    gunzip init.gz

    mkdir original

    mount -o loop init original[/CODE]

    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:
    [CODE]# 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/[/CODE]

    [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]
    [CODE]# unmount original

    unmount new

    mv init init_original

    gzip init_original

    mv new.img init

    gzip init[/CODE]

    Try booting your clients…[/quote][/quote]

    Hi sir tom Thanks,

    im having trouble mounting the new image that will replace the init.gz it always says that it needs to specify a file type please see the picture for reference i dont know what file system init.gz use

    [url="/_imported_xf_attachments/1/1668_mounting.JPG?:"]mounting.JPG[/url]


  • Senior Developer

    [quote=“Uncle Frank, post: 41904, member: 28116”]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).
    [/quote]

    Yes it has changed, but to help out the location for 0.32 is:
    [CODE]# cd /tftpboot/fog/images/

    gunzip init.gz

    mkdir original

    mount -o loop init original[/CODE]

    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:
    [CODE]# 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/[/CODE]

    [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]
    [CODE]# unmount original

    unmount new

    mv init init_original

    gzip init_original

    mv new.img init

    gzip init[/CODE]

    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).
    [CODE]# cd /var/www/fog/service/ipxe

    gunzip init.gz

    mkdir original

    mount -o loop init original[/CODE]

    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:
    [CODE]# 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/[/CODE]

    [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]
    [CODE]# unmount original

    unmount new

    mv init init_original

    gzip init_original

    mv new.img init

    gzip init[/CODE]

    Try booting your clients…



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



  • [quote=“Tom Elliott, post: 41890, member: 7271”]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.[/quote]

    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:
    [CODE]df -h[/CODE]



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


Log in to reply
 

461
Online

39.4k
Users

11.1k
Topics

105.4k
Posts

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