LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2009, 03:11 PM   #1
PixieGirl47
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: Disabled
Exclamation Reformatting winxp partition


Ihave 3 trojans and 275 worms in my windows partition. My brother set my computer into partitions but now the win partition is corrupt. Could someone please give me step-by-step instructions on how to reformat that partition and use the "badblocks random scrub" process. Thank you
 
Old 04-18-2009, 05:07 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
What else do you have on this computer? Other Operating Systems? a Linux version? How many partitions? You re-format and will likely lose all data, is that your intent?

You could download Parted Magic (free download) and re-format and re-partition or do pretty much whatever needs to be done with it. More information on what you have on your computer and the type of computer/hardware would be helpful to help you.
 
Old 04-18-2009, 06:57 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,822

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
if you are going to put linux on that "newly " formated partition i would use
GParted live cd http://gparted.sourceforge.net/
--- or
SystemRescueCd http://www.sysresccd.org/Main_Page
 
Old 04-18-2009, 07:52 PM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,787

Rep: Reputation: 211Reputation: 211Reputation: 211
Two problems...

You say that you have a trojan and worm problem. The standard cost free anti-virus program is AVG. It is quite good, but may not find everything. Try it and then google for other scanning tools, being mindful only to download from such sources as CNET or Tucows.

http://free.avg.com/download-avg-ant...s-free-edition

After you have cleaned up your Windows files, you can copy those Windows and linux files that you want to keep to another HDD or storage medium.

At that point you can use a partitioning live-cd as suggested to re-install Window or linux or both. Re-installing Windows will require that you either already have a Windows CD or that you make a restore CD from your rescue partition before you begin.

Formatting and beginning again may well solve your problem, but will require some thought and research if you have not tried it before.

You should post more information for a better and more detailed response. You might also try searching the forum posts for help and ideas.

http://www.linuxquestions.org/linux/...Ask_a_Question

Good Luck
 
Old 04-18-2009, 08:03 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
By simply reinstalling Windows XP from installation CD, you can relieve most worries. During the installation stage when you point the installer to use the same partition it will suggest leaving it as is if it is already formatted NTFS, but your best bet is to instruct it to reformat. By reformatting, Windows won't have access to the trojans and worms to allow them to be executed.
But, for a more paranoid approach, one should wipe the partition of all residual data. Root kits are malicious code which can be executed from slack space, which is space the operating system would not venture in as it is unallocated space. Who's to say there are no well designed viruses that can do the same. So it is always good to be overly cautious.
If you have a Linux or Mac OS X installation on the computer as well, or have a Linux live CD, from Linux you can figure out the device name of the Windows partition by issuing the command: fdisk -l from terminal as root or sudo fdisk -l from Ununtu terminal. Once you know which device it is, you can use dd to wipe the partition as in the examples below, in the examples below I assume the Windows partition is /dev/sda1, make sure to use the correct device as was found from the fdisk -l command or you may make matters worst by wiping out the wrong partition and loosing something precious. The first example will zero fill the partition, the second will write random data, both of which will overwrite all sectors in the partition, effectively overwriting the worms and all. If you are using Ubuntu or Ubuntu from live CD, precede the commands with sudo as in the fdisk -l command quoted above.
Code:
dd if=/dev/zero of=/dev/sda1
dd if=/dev/urandom of=/dev/sda1
Wait till the prompt returns, for a 60GB partition, it could take an hour or so. You can use dd in Mac OS X also, but the partition name would be similar to "/dev/disk0s1" or something rather than /dev/sda1.

Last edited by Junior Hacker; 04-18-2009 at 08:12 PM. Reason: Added some
 
Old 04-18-2009, 08:12 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by PixieGirl47 View Post
Ihave 3 trojans and 275 worms in my windows partition.
Could you tell us what software scanner you used that could find this stuff, but couldn't get rid of it? If you were informed that you had this malware by a screen that popped up on your browser, then you've been had. If I were in your place, I'd run the free anti-virus scanner at http://housecall.trendmicro.com/. Of course, if you want to completely wipe your disk and start all over, that's your choice. Boot a liveCD, then use the "dd" command to clear the disk. There's an intro to "dd" somewhere on the newbies forum, written by awesomemachine.
 
Old 04-18-2009, 08:24 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You can also use this shareware DOS mode GUI application to do the same as dd if you're not into command line stuff. Just create the bootable CD or floppy disk, boot the computer from the disk you created, hit cancel at the first window which prompts to install the boot manager, hit OK to go into maintenance, click on 'Partition work' icon, highlight the Windows partition and hit "Delete" on the right. Select 'Clear boot sector' and 'Wipe'. If you are worried about the law and want to make sure nothing can be found, select 'secure wipe'. Hit OK to begin.
When the progress finishes and it says it's done, you will now see "free space" where the partition was. Click on 'Create' on the right and select NTFS as the file system, leave the size as is and hit OK. Now you have a clean partition ready to install Windows on. Or you can select a different file system type depending on what you want to do with the partition.

As for the rest of the people who posted, the question asked is: Could someone please give me step-by-step instructions on how to reformat that partition and use the "badblocks random scrub" process. Why do you answer a question by asking questions?

Last edited by Junior Hacker; 04-18-2009 at 08:28 PM.
 
Old 04-18-2009, 08:55 PM   #8
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,787

Rep: Reputation: 211Reputation: 211Reputation: 211
All and Those

Those all there are, are part some who
know and others part another, all parts for all a whole.

Not all, that all, all know can, but that all, all better know, know better all, and better can.


With dedication to J. Hacker

Last edited by thorkelljarl; 04-18-2009 at 10:24 PM.
 
Old 04-19-2009, 01:41 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by Junior Hacker View Post
As for the rest of the people who posted, the question asked is: Could someone please give me step-by-step instructions on how to reformat that partition and use the "badblocks random scrub" process. Why do you answer a question by asking questions?
Because it's appropriate to ask those questions.
 
Old 04-21-2009, 01:10 PM   #10
PixieGirl47
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Original Poster
Rep: Reputation: Disabled
Reformatting winxp partition

Quote:
Originally Posted by PixieGirl47 View Post
Ihave 3 trojans and 275 worms in my windows partition. My brother set my computer into partitions but now the win partition is corrupt. Could someone please give me step-by-step instructions on how to reformat that partition and use the "badblocks random scrub" process. Thank you
I reformatted partition hda1(winxp) & reinstalled winxp but now it will not let me back into my Linux partitions. I have 4 partitions total. so I need a program that will allow me access to my linux partitions. I ran AVG antivirus on my puter 1st that was how I found the Trojans & worms. It was soon after that, that Windows crashed and burned. I like Linux but I need windows for my games.
 
Old 04-21-2009, 01:59 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Re-installing xp will overwrite your master boot record without notifying you or giving you any option. You can use this method to boot from windows: http://www.linux.com/articles/113945

This link describes booting Linux from windows on a second drive so you will need to make minor changes.

Or you can simply re-install Grub and boot Linux and windows. For specific instructions on how to do that, run 'fdisk -l' command and post the output here. That will give us your partition information. It's a lower case Letter L, not a number one. If your using Ubuntu or derivative, put sudo in front of the command.
 
Old 04-21-2009, 02:10 PM   #12
farouqp
LQ Newbie
 
Registered: Apr 2009
Location: Johannesburg South Africa
Distribution: Suse 11 & RedHat Enterprise 5.3
Posts: 11

Rep: Reputation: 0
to be honest I am one of the biggest sceptics on window$ scan tools because they always find something wrong. Best advise that i live up to is back up data and try have a boot partition for just that and a few programs. when ever a problem occurs its always a great feeling when windows runs faster, after re-installation doesnt it? anti-virus, avast has my vote & OS any linux
 
  


Reply

Tags
badblocks, random, reformat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
After reformatting Windows partition, Linux is corrupt and won't boot. JakeMH Linux - Software 3 05-31-2005 06:35 PM
Resizing/reformatting ext3 partition mark.johnson Linux - Hardware 3 04-25-2005 02:48 PM
dual boot system, reformatting winxp zippo85 Linux - Newbie 6 12-03-2004 01:42 AM
WinXP partition won't go away! mylo2003 Slackware 11 10-29-2003 03:09 PM
Reformatting /home/user partition to reiserfs procedures wrc1944 Linux - General 1 06-01-2003 09:15 PM


All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration