Home » Questions » Computers [ Ask a new question ]

Full physical hd check

Full physical hd check

I would like to run a full, sector-by-sector, physical check on some external hard drives. As far as I know,chkdsk does not supply this option.

Asked by: Guest | Views: 249
Total answers/comments: 3
Guest [Entry]

"In Windows NT/XP/Vista/7, you can open a CMD prompt and use

chkdsk /r x:

where x is the drive letter of your USB drive, assuming the drive is partitioned and has a drive letter assigned to it.

I'd suggest getting an Ubuntu live CD and booting into Linux, then using badblocks to scan for physical defects.

Use sudo fdisk -l to list all the drives and their partitions. For each drive:

sudo badblocks -nvs /dev/sdx

where your hard drive is /dev/sdx. This will perform a non-destructive read/write test on the disk without doing a filesystem check.

If you don't care about the data, you can do this instead, to do a more thorough scan:

sudo badblocks -wvs /dev/sdx

The -w option tells badblocks to write a known pattern, then read back the data to make sure it matches the pattern. It does this 4 times, using the patterns 0xaa, 0x55, 0xff, and 0x00 (alternating 0's and 1's, then all 1's, then all 0's). Note that this will overwrite all data on the drive and wipe out all the partitions, as well.

If you happen to have a Linux filesystem on the drive, you can check for filesystem errors and run badblocks at the same time. First, get the list of all the drives and their partitions:

sudo fdisk -l

Then for each partition:

sudo e2fsck -fcc /dev/sdx#

Again, /dev/sdx is the hard drive you want to scan. # is the number of the partition (e.g., /dev/sdb1). Specifying c twice will force fsck to run, and will use badblocks to do a non-destructive read-write test. If you just use the c option once, badblocks will do a read-only test.

I run badblocks -wvs on every new hard drive I purchase before putting it into service."
Guest [Entry]

Many drive manufactureers like Western Digital and Seagate provide tools that will do this kind of check. Usually a Windows tool.
Guest [Entry]

"I've never been too keen on USB external drives, because they didn't really exist when some of the best tools like ScanDisk were written. I particularly like the version of ScanDisk that comes with Windows 98 SE.

So, if it is an external drive, you should probably put it into a computer and then run fsck -f on the drive from a Linux LiveCD such as the PLD Rescue CD."