Questions about Defragging or Antivirus? Look here first!

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Re: Questions about Defragging or Antivirus? Look here first

Postby craig10x on Sat Dec 14, 2013 9:25 pm

Very true...i have been running linux since 2008 (so that is a total of 6 years) and never had any kind of anti-virus scanner installed...and have never gotten anything...and i do web surfing like mad every day :D I'm sure that has been the experience with the majority of linux users...
craig10x
Level 6
Level 6
 
Posts: 1482
Joined: Fri Jul 03, 2009 12:44 pm

Linux Mint is funded by ads and donations.
 

Re: Questions about Defragging or Antivirus? Look here first

Postby ImpliedConsent on Mon Dec 16, 2013 3:33 am

Question about defrag and SSDs: since W7, the defrag option has been turned off (default) of the drive containing an SSD. I'm pretty sure that the reason is so TRIM and GC collection won't be in conflict with a defrag operation. Is this potentially the same with LM (currently running 'Petra' 32)? My LM install is on an old-old laptop with a MHDD - but when I get home - I plan on rebuilding a PC with LM16 64bit on an SSD sda. I guess I'm more curious about TRIM and GC of an SSD v. defrag.
User avatar
ImpliedConsent
Level 1
Level 1
 
Posts: 10
Joined: Tue Dec 18, 2012 11:04 am

Re: Questions about Defragging or Antivirus? Look here first

Postby powerhouse on Thu Dec 19, 2013 3:24 pm

ImpliedConsent wrote:Question about defrag and SSDs: since W7, the defrag option has been turned off (default) of the drive containing an SSD. I'm pretty sure that the reason is so TRIM and GC collection won't be in conflict with a defrag operation. Is this potentially the same with LM (currently running 'Petra' 32)? My LM install is on an old-old laptop with a MHDD - but when I get home - I plan on rebuilding a PC with LM16 64bit on an SSD sda. I guess I'm more curious about TRIM and GC of an SSD v. defrag.


You should never defrag an SSD !!! Not only does it nothing to improve performance or disk usage, it actually harms your SSD and can severely reduce its life time.

I could go into some lengthy explanation about how data is stored, managed/indexed, and deleted on an SSD, but let's just say it's totally different from conventional disks that divide its storage into disk platters, cylinders, and sectors. Moreover, SSDs have a finite number of writes per storage unit, after which the storage unit cannot be used anymore. This is why defragmentation to SSDs is harmful.

In general, modern Linux distros like Linux Mint 13... are well aware of SSDs and their requirements (e.g. boundary alignment) and will do most of the setup right without user interference. You may want to add noatime to your /etc/fstab entry for your SSD. For more on that see the link below.

EDIT: Here the link to the SSD howto: http://forums.linuxmint.com/viewtopic.php?f=42&t=112450
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 572
Joined: Thu May 03, 2012 3:54 am

Re: Questions about Defragging or Antivirus? Look here first

Postby ImpliedConsent on Mon Dec 23, 2013 11:49 am

powerhouse wrote:You should never defrag an SSD !!! Not only does it nothing to improve performance or disk usage, it actually harms your SSD and can severely reduce its life time.

Oh, I wasn't asking whether an SSD needs to be defrag or not - and said as much and am aware of the wear levels - my question is more geared to TRIM support on LM. I know the kernal supports TRIM - but does LM automatically enable it for background GC? My comment on defrag was more a comparison with W7+ being turned off by default when the drive reports itself to the OS as an SSD. Does this also happen in LM?
User avatar
ImpliedConsent
Level 1
Level 1
 
Posts: 10
Joined: Tue Dec 18, 2012 11:04 am

Re: Questions about Defragging or Antivirus? Look here first

Postby powerhouse on Mon Dec 23, 2013 2:02 pm

ImpliedConsent wrote:
powerhouse wrote:You should never defrag an SSD !!! Not only does it nothing to improve performance or disk usage, it actually harms your SSD and can severely reduce its life time.

Oh, I wasn't asking whether an SSD needs to be defrag or not - and said as much and am aware of the wear levels - my question is more geared to TRIM support on LM. I know the kernal supports TRIM - but does LM automatically enable it for background GC? My comment on defrag was more a comparison with W7+ being turned off by default when the drive reports itself to the OS as an SSD. Does this also happen in LM?


I suggest you check the link I posted. Here is my /etc/fstab configuration for reference:

Code: Select all
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/lm16-root /               ext4    noatime,nodiratime,discard,errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
/dev/sda1 /boot           ext2    defaults,noatime,nodiratime        0       2
/dev/mapper/lm16-home /home           ext4    noatime,nodiratime,discard,defaults        0       2
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# My SSD has /dev/sda1, and several LVM volumes:
/dev/mapper/lm16-root /               ext4    noatime,nodiratime,discard,errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
/dev/sda1    /boot           ext2    defaults,noatime,nodiratime        0       2
/dev/mapper/lm16-home /home           ext4    noatime,nodiratime,discard,defaults        0       2

# Regular HDD:
# lm16-data on /dev/sdb1 as /home/<user name>/data
/dev/mapper/lm16-data       /home/<user name>/data      ext4   errors=remount-ro   0 1
/dev/mapper/lm16-swap none            swap    sw              0       0

#force temporary files to be stored in memory instead of on disk
none /tmp     tmpfs nodev,nosuid,mode=1777 0 0
none /var/tmp tmpfs nodev,nosuid,mode=1777 0 0

For ext2 partitions it's: ext2 defaults,noatime,nodiratime

For ext3 or ext4 partitions: ext4 noatime,nodiratime,discard,defaults

"discard" activates the trim function. It is quite possible that this is done automatically with modern Linux distributions, but I don't know for sure.

"noatime" prevents Linux to write the access time to the file, which greatly reduces write access on SSDs. "nodiratime" is the same for directories, but "noatime" implies "nodiratime" so it's actually not required. But it won't harm.

The swap partition resides on a regular HDD !

Another important part is setting up a virtual tmp file system in memory for /tmp and /var/tmp


And here the relevant line in /etc/default/grub file:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="profile elevator=deadline"


This defines the scheduler to be used. Not sure this makes a big difference.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 572
Joined: Thu May 03, 2012 3:54 am

Re: Questions about Defragging or Antivirus? Look here first

Postby powerhouse on Mon Dec 23, 2013 2:08 pm

ImpliedConsent wrote:...My comment on defrag was more a comparison with W7+ being turned off by default when the drive reports itself to the OS as an SSD. Does this also happen in LM?


Linux doesn't use defrag, not even on regular HDDs. It's usually not needed on Linux file systems like ext2, ext3, or ext4. fsck just checks the file system and - in case there are errors or inconsistencies - it tries to fix them.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 572
Joined: Thu May 03, 2012 3:54 am

Re: Questions about Defragging or Antivirus? Look here first

Postby mbutterman on Fri Jan 03, 2014 4:52 am

Thanks for the info Kaye. A lot of good info for the beginner or the otherwise curious
M
User avatar
mbutterman
Level 1
Level 1
 
Posts: 3
Joined: Thu Dec 26, 2013 2:12 am

Re: Questions about Defragging or Antivirus? Look here first

Postby andrew-lohmann on Mon Jan 27, 2014 2:05 pm

I think you need to be careful to not say that a windows virus will not run on a Linux machine. The arguement about Windows is that it has loopholes built in by act of US government But because Linux is a comunity project people would find out about those built in vunerabilites.

There are a number of programming languages and scripts that are common to many operating systems for example Java, Flash and native i8086 machine code. There is a possible of vunerability.

Although Linux is open source do you really think all of the source files have been read through or that just the complied object has been trusted and used? Even if that has happend it does not follow that what has been discovered is widely known? Windows 95 is crippled in a way that netscape runs more slowly than IE but netscape lost the arguement in court. The crippling can easily be tested and observed evenso.

In 2000 you did not need a virus scanner. I did not use one and my computer has been attacked but I have sorted it. It is quite possible that there are more web enabled Linux machines now than there were web enabled Windows machines in 2000. Linux users are not safe because they are a small comunity because they are not a small comunity any more.
Electronics Engineer,
Living in; South East, England.
Running; Linux Mint Mate 64 bit & Windows XP 32 bit
My PC is; an IBM xSeries 206m server but I use it as a desktop. It is 64 bit single processor. It is stated that the memory is 800MB/sec.
andrew-lohmann
Level 1
Level 1
 
Posts: 7
Joined: Sat Jan 25, 2014 12:42 pm
Location: Tunbridge Wells, Kent, UK

Re: Questions about Defragging or Antivirus? Look here first

Postby hal8000 on Mon Feb 17, 2014 4:34 pm

andrew-lohmann wrote:
Although Linux is open source do you really think all of the source files have been read through or that just the complied object has been trusted and used?


If you download files from a distributions repository then you are absolutely 100% safe and of course all the source code has been read.

If however, you decide to download and install 3rd party software there is always a chance that the source code may have been compromised. Although linux viruses
were created in a lab as "proof of concept" none exist on the internet. There is always a chance of a rootkit so its a good idea for everyone to install rootkit hunter
and run a periodic scan, maybe once a month.
To install

Code: Select all
sudo apt-get install rkhunter


To check

Code: Select all
sudo rkhunter --update

Code: Select all
sudo rkhunter -c
User avatar
hal8000
Level 4
Level 4
 
Posts: 226
Joined: Sun May 04, 2008 2:04 pm
Location: UK

Re: Questions about Defragging or Antivirus? Look here first

Postby andrew-lohmann on Mon Feb 17, 2014 4:47 pm

Thanks Hal

It is often what we, humans, do than what the computer has alledgely done that is the problem.
Electronics Engineer,
Living in; South East, England.
Running; Linux Mint Mate 64 bit & Windows XP 32 bit
My PC is; an IBM xSeries 206m server but I use it as a desktop. It is 64 bit single processor. It is stated that the memory is 800MB/sec.
andrew-lohmann
Level 1
Level 1
 
Posts: 7
Joined: Sat Jan 25, 2014 12:42 pm
Location: Tunbridge Wells, Kent, UK

Re: Questions about Defragging or Antivirus? Look here first

Postby mrushton on Fri Feb 21, 2014 1:50 pm

Does ClamAV come with Linux Mint or do you have to download it ? I can't find it on my desktop.

Is there any other AV for Linux Mint that you can recommend or point me to ?

Of course in the Windows world you you never think of running Windows *without* some kind of AV software.
mrushton
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 20, 2014 11:50 pm

Re: Questions about Defragging or Antivirus? Look here first

Postby powerhouse on Fri Feb 21, 2014 3:20 pm

mrushton wrote:Does ClamAV come with Linux Mint or do you have to download it ? I can't find it on my desktop.

Is there any other AV for Linux Mint that you can recommend or point me to ?

Of course in the Windows world you you never think of running Windows *without* some kind of AV software.


Unless you want to detect Windows viruses in emails, I can't see much use of ClamAV, or any other anti-virus software under Linux. Anti virus software under Linux was developed to filter Windows viruses, for example when you run a mail server on Linux and have Windows users accessing the mail server. If you install Linux for desktop/notebook use, forget about anti-virus software.

As said before, if you install software exclusively via the software manager / package manager, the chances of catching a virus are next to nil.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 572
Joined: Thu May 03, 2012 3:54 am

Re: Questions about Defragging or Antivirus? Look here first

Postby martin tudor on Wed Apr 02, 2014 7:34 pm

I need a script to run via Tampermonkey for a game I play. Is that safe?
martin tudor
Level 1
Level 1
 
Posts: 1
Joined: Fri Jan 10, 2014 11:25 pm

Re: Questions about Defragging or Antivirus? Look here first

Postby catilley1092 on Mon Apr 07, 2014 1:16 pm

ClamTK is a reliable AV for Mint & updates/scans can be scheduled. Scans will find browser objects and any possible malicious downloaded software. Any objects found should be quarantined for safety, rather than directly deleted.

rkhunter & chkrootkit are good for finding rootkits.

Linux Mint runs perfectly fine on SSD's & TRIM works if setup properly, these instructions can be found on this forum. Leave 10% of the SSD at the end unpartitioned for overprovisioning. This prevents overfilling of the SSD & will extend it's life. When a firmware update is needed, download the CD (ISO) version & boot from that CD to update the firmware. The .exe firmware update option is for Windows users. Be sure to backup the install beforehand & make sure that instructions are followed. Perform this task on AC power, not from battery.

Cat
"Making marijuana legal nationally would not only save valuable prison beds, but also pay down our national debt in a responsible manner"
User avatar
catilley1092
Level 1
Level 1
 
Posts: 38
Joined: Tue Mar 08, 2011 12:51 pm

Linux Mint is funded by ads and donations.
 
Previous

Return to Newbie Questions

Who is online

Users browsing this forum: Google Adsense [Bot] and 18 guests