15
Mar

Write To or Read From a Given Sector Using dd

This comes in handy when trying to troubleshoot a drive. If you’re met with an error message like “I/O Error: Bad sector 40003″, then you can use ‘dd’ to verify that it’s bad. For example, to write to a given sector/block, use the following command:

dd if=/dev/urandom of=/dev/sdb seek=<sector_number> count=1 bs=512

To read from a given sector/block, use the following command (skip instead of seek):

dd if=/dev/sdb of=/dev/null skip=<sector_number> count=1 bs=512

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 0 Comment So Far

Share your thoughts, leave a comment!