Go Back   The UNIX and Linux Forums > Operating Systems > Linux
google site



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-10-2010
Registered User
 

Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Not able to remove virus from a pen drive

Hello Friends,

My pendrive (FAT32 filesystem) consist of following files+viruses.


Code:
-rwxr-xr-x 1 chinmay root        0 2010-03-10 01:29 autorun.inf
dr-xr-xr-x 2 chinmay root     4096 2010-03-09 23:51 Docs
-rwxr-xr-x 1 chinmay root  4726162 2010-03-08 15:02 java_ee_sdk-5_03-javadocs.zip
-rwxr-xr-x 1 chinmay root 46191338 2008-03-20 18:18 jdk-1_5_0-doc.zip
-rwxr-xr-x 1 chinmay root 54898268 2008-03-20 18:25 jdk-6-doc.zip
drwxr-xr-x 2 chinmay root     4096 2010-03-09 17:41 jvm my notes
-rwxr-xr-x 1 chinmay root  1070753 2006-01-01 08:20 New Folder .exe
dr-xr-xr-x 3 chinmay root     4096 2010-03-10 01:29 recycler
-r-xr-xr-x 1 chinmay root  1070753 2006-01-01 08:20 regsvr.exe
-r-xr-xr-x 1 chinmay root   103781 2008-01-28 11:44 xo8wr9.exe


Am facing a problem while formatting my pendrive on Windows XP, it says unable to format. Then I used 'attrib' to change the properties of files, and then 'del' but still not able to remove them.

Then i tried to remove the same files on my linux (Fedora10, OpenSuse11.1) m/c, but still its not able to remove them, terminal hangs out while unmounting the drive.

On Fedora 12, It deletes all the files, unmounts the drive, but when i mount it again, it shows all the files.

- One thing i dont understand why linux is not able to remove these exe files.

Pls help.

Thanks in advance.

Last edited by pludi; 03-10-2010 at 07:27 AM.. Reason: code tags, please...
Sponsored Links
  #2  
Old 03-10-2010
mark54g mark54g is offline Forum Advisor  
Registered User
 

Join Date: May 2008
Location: Northeastern United States
Posts: 459
Thanks: 0
Thanked 2 Times in 2 Posts
try using fdisk on linux to remove the partition on the device and recreate a new partition, then change the partition type to vfat and format.
  #3  
Old 03-11-2010
Registered User
 

Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Code:
[root@localhost ~]# fdisk /dev/sdb 

Command (m for help): p

Disk /dev/sdb: 4040 MB, 4040724480 bytes
125 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
Disk identifier: 0x6f20736b

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?      100405      247697   570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(100404, 79, 11)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(247696, 24, 51)
Partition 1 does not end on cylinder boundary.
/dev/sdb2   ?       21767      271577   968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(21766, 48, 47)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(271576, 60, 42)
Partition 2 does not end on cylinder boundary.
/dev/sdb3   ?      241276      491086   968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(241275, 3, 30)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(491085, 14, 39)
Partition 3 does not end on cylinder boundary.
/dev/sdb4   ?      372346      372354       27749+   d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(372345, 119, 25)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(372353, 14, 33)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Then i have deleted all the partitions


Code:
Command (m for help): d
No partition is defined yet!

Command (m for help): p

Disk /dev/sdb: 4040 MB, 4040724480 bytes
125 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
Disk identifier: 0x6f20736b

   Device Boot      Start         End      Blocks   Id  System


Command (m for help): v
7892039 unallocated sectors

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

No reponse, terminal hangs, ie. am not able to save/read partition table on usb drive...

I also tried mkfs command for create file system...


Code:
[root@localhost chinmay]# mkfs -V -t ext3 /dev/sdb 
mkfs (util-linux-ng 2.14.1)
mkfs.ext3 /dev/sdb 
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
247008 inodes, 986505 blocks
49325 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1010827264
31 block groups
32768 blocks per group, 32768 fragments per group
7968 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                            
Creating journal (16384 blocks):


After this, No reponse, terminal hangs...

Pls help.....



Last edited by pludi; 03-11-2010 at 04:57 AM.. Reason: code tags, please...
  #4  
Old 03-11-2010
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 3,095
Thanks: 6
Thanked 51 Times in 51 Posts
All your work in fdisk was wiped out when you just reformatted /dev/sdb directly. That device had no partitions at all, it was all just one big VFAT system, like an old-fashioned floppy. Which is why fdisk showed garbage, it was reading the filesystem itself instead of a partition table. /dev/sdb is the disk, /dev/sdb1 etc. would be partitions on that disk if it had any. You'd almost never see a hard drive without a partition table, but some flash drives still obnoxiously come formatted this way.

That said, you've got bigger problems. A virus would need supernatural properties to stop linux from formatting the drive. I think your flash drive's malfunctioning. It's locking up and not taking legitimate writes.

Last edited by Corona688; 03-11-2010 at 11:21 AM..
  #5  
Old 03-12-2010
Registered User
 

Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Ooppsss... any ways thanks guys.
Sponsored Links
Reply

Bookmarks

Tags
windows virus linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Apple products and storage drive manufacturers report drive capacity differently Linux Bot OS X Support RSS 0 11-24-2008 06:40 PM
Mac OS X 10.2: Remove Microsoft Office v.X Test Drive before installing Microsoft Off Linux Bot OS X Support RSS 0 10-13-2008 10:20 PM
mounting USB floppy drive /Flash drive in OSR 6.0 sureshdrajan SCO 5 02-29-2008 11:36 AM
Map Drive From Windows To Apache Shared Drive? gseyforth UNIX for Dummies Questions & Answers 0 02-23-2008 06:56 PM
Virus !!!!!!!!!!!!!!!!!!! amicrawler2000 UNIX for Dummies Questions & Answers 4 10-09-2002 08:23 PM



All times are GMT -4. The time now is 07:47 AM.