[Linux-disciples] Erasing a device node

Stephen R Laniel steve at laniels.org
Sat Dec 4 13:09:24 EST 2004


I was just following the directions to clear a bad sector
[1], and I got to this step:

dd if=/dev/zero of=/dev/hda3 bs=4096 count=1 seek=2269012

Of course I replaced /dev/hda3 with my own partition
(/dev/hdd1), and replaced the 'seek=' argument with the
block number of my own bad block. But as I was typing it in,
bash did something weird where it started writing my command
at the beginning of the command line rather than at the end;
the final command line ended up looking like

seek=47136440el at JeffTweedy:~$ sudo dd if=/dev/zero of=/dev/hdd1 bs=4096 count=1 s

Consequently, I'm not sure whether the 'dd' command went
through correctly. It gave me some output saying that it had
written one 4,096-byte record (I've unfortunately not saved
the output) ... so, should I assume it's written the correct
data? How could I check whether it has? If it didn't write
correctly, what would I expect to have happen? Might it have
written a block of zeroes to some unknown file?

I tried downloading the file that sits on that sector, and I
got a read error. So I ran dd again, this time making sure
that the right arguments went in. Now I get no read errors.
So it looks like it didn't fix the right file the first
time, but now it has.

What should I make of all this? Am I going to be screwed at
some point? Should I just mknod /dev/hdd?

[1] - http://shorl.com/fidrugripiprele

-- 
``But now it's just another show
  You leave them laughing when you go
  And if you care, don't let them know
  Don't give yourself away.''
 -Joni Mitchell, "Both Sides Now"



More information about the Linux-disciples mailing list