LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-12-2015, 09:52 AM   #1
techdude
Member
 
Registered: Oct 2013
Distribution: Linux Mint
Posts: 66

Rep: Reputation: Disabled
Manually Resetting a HDD


I have a hdd that had some pretty bad Windows viruses. I want to put Windows 7 back on it. But first, I need to completely reset the hdd so no viruses can return. GParted only reformats, but doesn't override the whole drive. Any suggestions?
 
Old 05-12-2015, 10:31 AM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by techdude View Post
I have a hdd that had some pretty bad Windows viruses. I want to put Windows 7 back on it. But first, I need to completely reset the hdd so no viruses can return. GParted only reformats, but doesn't override the whole drive. Any suggestions?
Code:
dd of=/dev/your_device_here if=/dev/urandom bs=1M && dd of=/dev/your_device_here if=/dev/zero bs=1M
This will overwrite all data on this disk with random garbage, then overwrite that data with zeros.

This will effectively blank the disk with no hope for basic data recovery. This will not make the drive immune to viruses or any malicious content that is downloaded afterwards.
 
2 members found this post helpful.
Old 05-12-2015, 10:35 AM   #3
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 294

Rep: Reputation: 31
Reformatting would erase the entire drive contents as long as the proper partition is selected or just do a new installation of Windows and choose the option to reformat but I believe that is default. To keep viruses out upon installing the OS make sure you Windows update 1st then repeat until everything is up to date then install anti-virus and update that as well. Windows isn't virus proof by a long shot but with the right practices they are avoidable.
 
Old 05-12-2015, 10:46 AM   #4
techdude
Member
 
Registered: Oct 2013
Distribution: Linux Mint
Posts: 66

Original Poster
Rep: Reputation: Disabled
Thank you /dev/random. This might take a while, it's a 1Tb drive.
 
  


Reply

Tags
hdd



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
HDD/BUS problem ata1.00: status: { DRDY } ata1.00: hard resetting link inachomsky Linux - Hardware 1 08-13-2014 08:20 AM
[SOLVED] Manually assign a device name to a specific HDD Barx Slackware 12 10-29-2012 03:43 AM
How can I manually partition my 160 GB HDD after installing Ubuntu 9.10 on my PC cbl48 Linux - Newbie 5 02-11-2010 09:47 PM
How to manually add SATA driver manually when kernel boot? aixilin Linux - Kernel 6 08-15-2008 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:42 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
Open Source Consulting | Domain Registration