Results 1 to 9 of 9

Thread: formatting a pen drive with a Windows virus

  1. #1

    Default formatting a pen drive with a Windows virus

    My friend gave me a pen drive with regsvr.exe, autorun.inf and "New
    Folder.exe" on it. I think it is a virus and he said he was unable to
    format it. I tried to fdisk it using
    fdisk /media/sdb1
    However, there is an error mesasage as follows:
    last_lba(): I don't know how to handle files with mode 40500

    Unable to read /media/sdb1
    I tried to take ownership of the files but even that doesn't work.
    Help me format the pen drive so that we can use it again.

  2. #2
    Join Date
    Jun 2008
    Location
    Kentucky, USA
    Posts
    466

    Default Re: formatting a pen drive with a Windows virus

    I would try to use a partitioning tool to delete the partition. Then create a new one. There is one in Yast, or install gparted, it has an easy GUI interface. Just be sure to note what format it is currently in before deleting it so you will know what to reformat it to.
    Klaatu Barada Nikto

  3. #3
    Join Date
    Jul 2008
    Location
    SPAIN
    Posts
    132

    Default Re: formatting a pen drive with a Windows virus

    Hi,

    Want to wipe that virus file for ever?

    From a command line prompt, as the root user, run:

    # dd if=/dev/zero of=/dev/sdb

    Before running this command, be aware of the following:

    1) Every partition that happens to be in the usb device must be
    unmounted

    2) The parameter /dev/sdb must be replaced by the one in your system, eg, that used by the kernel to talk to the device.
    Be careful with what you type here...you don't want to destroy the data in other disks, do you?

    3) The command not only will wipe the virus: it will destroy every bit of data in the device, even the partition table.

    Once it is completed, you can use parted or fdisk to create partitions in it.

    Once the partitions are created, you probably will have to use the command mkfs -t vfat /dev/sdb1 to build a fat32 file system on it.
    For a ntfs fs, use mkfs -t ntfs /dev/sdb1 instead

    Double check that you have the package dosfstools installed.

    And.., you are done.

    Regards.

  4. #4

    Default Re: formatting a pen drive with a Windows virus

    67GTA wrote:

    >
    > I would try to use a partitioning tool to delete the partition. Then
    > create a new one. There is one in Yast, or install gparted, it has an
    > easy GUI interface. Just be sure to note what format it is currently in
    > before deleting it so you will know what to reformat it to.
    >
    >

    I had tried that some time before. What I did not like is that it added a
    line to /etc/fstab.

  5. #5
    Join Date
    Jun 2008
    Location
    Kentucky, USA
    Posts
    466

    Default Re: formatting a pen drive with a Windows virus

    Just use gparted. It is a stand alone partitioner, and won't write anything to fstab.
    Klaatu Barada Nikto

  6. #6
    Rikishi 42 NNTP User

    Default Re: formatting a pen drive with a Windows virus

    On 2008-08-02, Cross_AM <Cross_AM@no-mx.forums.opensuse.org> wrote:

    >> I would try to use a partitioning tool to delete the partition. Then
    >> create a new one. There is one in Yast, or install gparted, it has an
    >> easy GUI interface. Just be sure to note what format it is currently in
    >> before deleting it so you will know what to reformat it to.
    >>
    >>

    > I had tried that some time before. What I did not like is that it added a
    > line to /etc/fstab.


    Only if you define a mount point, which is not a requirement.

    The Yast partitioner should do the job nicely.
    Just unmout the partitions manually, beforehand.


    --
    The sand remembers once there was beach and sunshine
    but chip is warm too
    -- haiku from Effector Online, Volume 1, Number 6

  7. #7

    Default Re: formatting a pen drive with a Windows virus

    Rikishi 42 wrote:

    > On 2008-08-02, Cross_AM <Cross_AM@no-mx.forums.opensuse.org> wrote:
    >
    >>> I would try to use a partitioning tool to delete the partition. Then
    >>> create a new one. There is one in Yast, or install gparted, it has an
    >>> easy GUI interface. Just be sure to note what format it is currently in
    >>> before deleting it so you will know what to reformat it to.
    >>>
    >>>

    >> I had tried that some time before. What I did not like is that it added a
    >> line to /etc/fstab.

    >
    > Only if you define a mount point, which is not a requirement.
    >
    > The Yast partitioner should do the job nicely.
    > Just unmout the partitions manually, beforehand.
    >
    >

    Thank you. It worked.

  8. #8
    Marco Munderloh NNTP User

    Default Re: formatting a pen drive with a Windows virus

    Cross_AM wrote:
    > fdisk /media/sdb1

    I think your problem is that it has to be /dev/sdb, not /media/sdb.

    I don't know why you want to "format" the pen instead of just deleting
    the files - would be way more safe for your own data, but if you like
    to, why not. Just be careful to not mix up the device (sdb).

  9. #9

    Default Re: formatting a pen drive with a Windows virus

    Marco Munderloh wrote:

    > I think your problem is that it has to be /dev/sdb, not /media/sdb.
    >

    I will keep that in mind next time. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •