LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-24-2011, 06:23 AM   #1
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
Question 0/Low level format


Hi,

As i am using opensuse11.3, i have a another 160GB HDD which has to be formatted in low level.

Mainly its very important to me is when formatted my HDD, no one should be able to recover the data, I heard there are recovery softwres which can get back our data.
so using data recovery software also no one should be able to get data again. Data has to be completely deleted fro HDD.

can anyone tell me how can i do this???

Last edited by varunb; 08-24-2011 at 06:25 AM.
 
Old 08-24-2011, 07:04 AM   #2
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 548

Rep: Reputation: 116Reputation: 116
I'd use the dd command along with /dev/random - do it several times over to ensure that the data is completely gone (it can still be retrieved after a single wipe sometimes due to resident magnetic charge left on the drive platters). There is a thread in this forum I believe regarding the dd command - an excellent resource.
 
1 members found this post helpful.
Old 08-24-2011, 07:13 AM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
You can use
Code:
dd if=/dev/zero of=/dev/sd?
where ? is to be substituted with the correct character. Be careful not to delete the wrong partition!!!

Markus
 
1 members found this post helpful.
Old 08-25-2011, 03:34 AM   #4
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Original Poster
Rep: Reputation: 1
Wink

Quote:
Originally Posted by devnull10 View Post
I'd use the dd command along with /dev/random - do it several times over to ensure that the data is completely gone (it can still be retrieved after a single wipe sometimes due to resident magnetic charge left on the drive platters). There is a thread in this forum I believe regarding the dd command - an excellent resource.
Hi

Thankx for the reply. .

I have done format using DD command. I hope all the data has been erased.
 
Old 08-25-2011, 05:25 AM   #5
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Original Poster
Rep: Reputation: 1
Wink

Quote:
Originally Posted by markush View Post
You can use
Code:
dd if=/dev/zero of=/dev/sd?
where ? is to be substituted with the correct character. Be careful not to delete the wrong partition!!!

Markus
Hi,

Thankx for u too. .

I have used the same command as u have mentioned, actually i formatted thrice and i was very careful while doing it. .
 
Old 08-25-2011, 06:42 AM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
There are multiple threads around here about this--getting a disk "empty" so no files could be recovered from it--so you might want to look them up as well. The bottom line in them is:
- "formatting" does not help, as is usually means just writing a filesystem on the disk, which does practically nothing to the actual data (so often "file recovery" means just figuring out where on the disk is what, and then creating a working file out of it to a working filesystem)
- the only surefire way is to put the disk into parts (drill, cut, melt, ...) so it's physically not possible to get it working anymore; the bigger the damage, the better the result
- the software way is to overwrite very many times the whole disk, and hope that the result makes the disk contents look random enough to make recovery process so long and difficult that it's practically useless; this is time-consuming and, given the disk prices today, in my opinion useless as well

The thing is, even if your average program can't right away get any data out of your shredded-three-times-over disk, physically there may still be (faint) patterns which can be used to get some of the data back, or make guesses about what there may have been. I think some standards require 10-30 overwrite rounds, but I think it's still only very probable that the contents are "fully erased", not a fact. If you're paranoid, a couple dozen dollars/euros, or even a hundred-something, is a small price to pay for getting a factory-clean disk and trashing the old one to oblivion. Especially after you've tried overwriting a 1TB disk 30 times on a typical home computer configuration

Last edited by b0uncer; 08-25-2011 at 06:44 AM.
 
1 members found this post helpful.
Old 08-25-2011, 07:28 AM   #7
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
There is a command to do what you need, it is called shred. Do a man shred to learn more.
 
Old 08-25-2011, 07:32 AM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello,
Quote:
Originally Posted by rodrifra
There is a command to do what you need, it is called shred. Do a man shred to learn more.
shred maybe a good idea, but it handles files, but not partitions or the whole disk. So you don't have any access to files which are already deleted with rm.

As I've understood the OP he wants to get rid of any data which ever have been stored on the disk. This is (referring to the manpage) not possible.

Markus
 
Old 08-25-2011, 09:44 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
I'd take a hammer to it. That usually stops the average hacker.
 
Old 08-26-2011, 02:38 AM   #10
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
Hi Markush.

Since *nix uses all devices as files, you can erase a device as if it was a file, so

shred -zvn10 --random-source=/dev/random /dev/sda

will write random data to your HD and will repeat the process 10 times, after that it will write 0s on your drive.

Last edited by rodrifra; 08-26-2011 at 07:05 AM.
 
Old 08-26-2011, 02:50 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
See also scrub & dban http://linux.die.net/man/1/scrub
 
Old 08-26-2011, 03:38 AM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
A simple dd with /dev/zero would suffice, unless your enemy works at the NSA and in this case we probably shouldn't be helping you at all.

It's true that, if you know the current status of a bit, it's relatively easy to know the previous one (provided the current you use to change it is a constant). That's maths. But in a disk there are maybe billions of bits (thousands of millions of bytes), and the fact that a bit changed doesn't mean the next one has also changed, in other words: you can't be sure what bit pattern to choose, you can only look at a single bit each time and then try to make out of it something that makes any sense, which is complicated because to start with you don't even know if you are inside the position of a meaningful file of any kind or in the middle of an "empty" area of the disk surrounded by random crap. This is a work that takes not only specialized hardware (that alone would sort out the average joe from spying you) but also a lot of manual work, time, money, and a huge exercise in logic.

When all the paranoid crew in the net talks about this they usually forget that they are talking about what's physically possible in theory, over the papers. But that's one thing, and the real world and the limited lifetime of a human being makes it practically impossible; unless you have all the technology and money it takes at your hands, and you are seeking truly worthwhile information.

That probably means that you are as safe rewriting with /dev/zero as you would be if you disintegrated your HD with a LASER beam.

Last edited by i92guboj; 08-26-2011 at 03:45 AM.
 
  


Reply


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
low-level format soft???? macaal Linux - Software 3 02-14-2008 10:07 AM
low level format juanb Linux - General 1 02-08-2006 04:16 AM
low-level format DanTaylor Linux - Newbie 7 01-22-2006 04:52 PM
Low-level format under Linux with an AHA-1522 rcase5 Linux - Hardware 2 04-12-2005 03:33 PM
Low Level format a Compact Flash ? K@rl` Linux - Hardware 4 09-07-2004 09:05 AM


All times are GMT -5. The time now is 05:09 AM.

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