Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

dd if=/dev/hda of=/dev/hda

Name: Anonymous 2006-08-19 21:51

dd if=/dev/hda of=/dev/hda bs=512
cat /dev/urandom > /dev/hdb and then cat /dev/zero > /dev/hdb

Someone on Slashdot says this will fix damaged sectors somehow. http://ask.slashdot.org/comments.pl?sid=194486&cid=15938141

Is it true? They explain the details behind it, but what exactly do the commands do? Can I just boot a Knopppix disc and type that?

I have a drive with thousands of bad sectors, yet I'm still using it because the first 20 gigs work.. But it'd be nice to get the 80g back.

Name: Anonymous 2006-08-19 22:34

It's an inefficient way to force the drive to remap bad sectors that are still in use (I don't really see why you'd want to do this, drives act this way for a reason). Most of the data in the sectors will probably be lost. Only very little can be remapped, 80% of your drive is way too much. Buy a new drive.

Name: Anonymous 2006-08-19 23:03

I don't want to keep any data. If I do this I'll wipe the drive and start fresh. Are you saying it won't help at all?

And it's not 80%, but it's about 10 gigs in the middle, and I haven't bothering to make a jump over those sectors to get the rest, which also contain a break.

And it might spread if I do that. I was just wondering if this was a real fix for broken sectors. I don't care what happens to them, I just want to get rid of them.

Name: Anonymous 2006-08-19 23:42

Well, just do a normal complete format then. 10GB still sounds like way too much, but you could try.

Name: Anonymous 2006-08-20 1:59

>>3
No, it just copies things. dd copies the contents of "if" to "of". cat outputs the contents of FILE, and > redirects a command's output to the given file. The commands you posted will copy /dev/hda's (first IDE hard drive) content to itself, then overwrite /dev/hdb (second IDE drive) with random data and then overwrite it with all null data (all 0s).

There's no way to "fix" damaged sectors. If a sector is damaged, it means the sector's area on the disk is physically corrupted. Most modern drives include some spare sectors, and the drive's firmware transparently remaps damaged sectors to the spare sectors if they're detected (but any data that was in the damaged sector is unrecoverable).

If you have a disk with 80 gigs worth of bad sectors, it means that drive is basically already junk. Putting data on the remaining good sectors would be like throwing it onto a highway and hoping it'll be intact when you come back later to get it. Toss the drive.

Name: Anonymous 2006-08-20 6:05

>>1
Shit sux, buy a new drive goddamnit, you can't risk having valuable data in a crashed, absolutely unreliable HD to save what, €90?

Name: Anonymous 2006-08-20 6:21

put reiser4 on it for maximum damage

Name: Anonymous 2006-08-20 10:54

>>7
Care to explain? (I'm seriously interested in knowing why ReiserFS 4 is supposed to cause damage.)

Name: Anonymous 2006-08-20 14:25

Just use the badblocks utility. Sounds like the harddrive is at the end of its life though..

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List