Mailing List Archive

[clamav-users] LibClamAV Error: cli_scangpt: could not determine sector size
I recently had to reinstall clamav after an errant MacPorts reclaim removed my installation.

After reinstalling I’m now getting this error:

LibClamAV Error: cli_scangpt: could not determine sector size

I’ve searched around, but can’t find an explanation anywhere.

What does it mean and what do I have to do about it?

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] LibClamAV Error: cli_scangpt: could not determine sector size [ In reply to ]
Hi there,

On Sun, 10 Nov 2019, Michael Newman via clamav-users wrote:

> I recently had to reinstall clamav after an errant MacPorts reclaim removed my installation.
>
> After reinstalling I?m now getting this error:
>
> LibClamAV Error: cli_scangpt: could not determine sector size
>
> I?ve searched around, but can?t find an explanation anywhere.
>
> What does it mean and what do I have to do about it?

I guess it means that libclamav can't determine the sector size of a
disc partition which I guess you told it to scan. I can't even guess
if you need to do anything about it or not; it would be much better if
there were less guesswork. Exactly what do you do in order to obtain
this message? Does it appear in a terminal session, in a log file,...?

How did you install ClamAV originally? I'm not familiar with MacPorts
and I wonder if your 'reclaim' removed only part of the installation.
Sometimes things can go wrogn if pieces of an old installation are
left lying around after a new installation replaces it. Are you sure
that you completely uninstalled and purged (or whatever might be the
MacPorts equivalent of those) the old ClamAV installation(s)?

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] LibClamAV Error: cli_scangpt: could not determine sector size [ In reply to ]
> On Nov 11, 2019, at 00:00,G.W. Haywood wrote:
>
> Exactly what do you do in order to obtain
> this message? Does it appear in a terminal session, in a log file,…?

I run clamscan from a bash script with this command:

/opt/local/bin/clamscan -r --quiet -i -l $log $scandir --exclude-dir="$exclude" --exclude-dir="$exclude2" --stdout >>$log 2>&1

The message appears in the log file.

I’ve been using clamav for about a year now and didn’t have this error message before the reinstall.

I originally installed clamav using MacPorts about a year ago.

I have no idea if the MacPorts reclaim removed all of clamav. "reclaim" is used to remove ports that do not have any dependents and which were not originally installed based on a user request. Since I did install clamav, the fact that clamav was not listed as requested may be a bug in MacPorts which seems to have already been reported.

Is there something I can do to have clamscan give me more information about the sector size problem?

Mike Newman
Korat, Thailand
Re: [clamav-users] LibClamAV Error: cli_scangpt: could not determine sector size [ In reply to ]
Hi there,

On Mon, 11 Nov 2019, Michael Newman via clamav-users wrote:
>> On Nov 11, 2019, at 00:00,G.W. Haywood wrote:
>>
>> Exactly what do you do in order to obtain
>> this message? Does it appear in a terminal session, in a log file,…?
>
> I run clamscan from a bash script with this command:
>
> /opt/local/bin/clamscan -r --quiet -i -l $log $scandir --exclude-dir="$exclude" --exclude-dir="$exclude2" --stdout >>$log 2>&1

That leaves quite a lot to the imagination. :/ Ideally we'd want to
know the values of all the variables in the command. It doesn't much
matter about $log, but $scandir and the two '$exclude's are important.

> I have no idea if the MacPorts reclaim removed all of clamav.

I think you might need to look into that, I'm sure there must be
adequate documentation. But to avoid any geese-chasing it would be
better not to jump to any conclusions about broken installations at
this stage. It might not be broken, it might just be scanning in a
different way from how it used to be, or something in the filesystem
might have changed. The error message seems to be telling us that
you're scanning a disc partition rather than a file, and I wonder if
for example one of the '$exclude's is not being set correctly - this
might for example result in asking to scan something like partitions
in '/dev' when you don't intend to. If they're scanning filesystems,
most people will just scan the files, not the partitions. You may
have particular requirements, but if you do I'd have expected that you
would have mentioned that by now.

> Is there something I can do to have clamscan give me more
> information about the sector size problem?

The 'man' pages for the various ClamAV tools are a very good resource.
If you remove the '-i' it may let you see what's being scanned at the
time of the error. If it's as simple as something that shouldn't be
scanned then maybe you'll see that and that might lead to something
like a failure to set an $exclude in the script or whatever calls it.
If that doesn't help you might replace '--quiet' with '--debug' and
run the command, but I don't know how much help that will be. And be
aware that making deductions from what you see in the log files isn't
always straightforward.

I have to say I'm no fan of scanning Unix-type filesystems like this.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml