How to check for bad blocks
Scenario / Question:
How do I check my hard drive for bad blocks and if any bad blocks are found add them to the bad block inode to prevent them from being allocated in the future.
Solution / Answer:
Run fsck and have it run bad blocks program. This allows fsck to fix any bad blocks that are found.
Bad Blocks read only test (non-destructive):
**Recommended to run fsck command on an unmounted partition**
View this post for how to run fsck: “How should I run fsck on a Linux file system”
To run bad blocks with the read-only option and verbose output:
-c – use bad blocks read non-destructive
-v – verbose output
# fsck -vc /dev/sdb1
Bad Blocks read-wrte test (non-destructive):
**Recommended to run fsck command on an unmounted partition**
View this post for how to run fsck: “How should I run fsck on a Linux file system”
To run bad blocks with the read-write option and verbose output:
-cc – use bad blocks read-write non-destructive
-v – verbose output
# fsck -vcc /dev/sdb1



its useful
how to add bad blocks in super block inode? possible some examples.
fsck -vc/-vcc calls the program badblocks to do this test. Unfortunately (I’m pretty sure) fsck is only capable of doing this on Linux filesystems (ext 2/3/4?). If you want to do a full drive test, use badblocks directly:
badblocks -nvs /dev/hda
Unfortunately, I’m not sure this will record the badblocks. In fact I’m thinking it may not, but at least you can find if they exist. Badblock I believe are recorded in the filesystem metadata meaning that if, for example, you have an NTFS partition on the drive, you’ll probably have to use the MS toold like chkdisk.
Dear Sir,
I use to linux redhat operationg syestem
Looking for Linux Hosting? Start Here.
I have got 3 OSs on my laptop Latitude Dell D600 (Windows , FC3, Solaris 10)
I have got no problem to boot in any of these 3 OSs.
After while I tried to boot into linux I received this error message :
Run ‘setenforce 1′ to reenable.
Give root password for maintenance (or type Control-D to continue):
this error come to my pc, so pls solved my problem
Repair file system1#
[...] Check Partition for Bad Blocks | Fedora | Linux Tutorial View this post for how to run fsck: “ How should I run fsck on a Linux file system ” To run bad blocks with the read-only option and verbose output: **Recommended to run fsck command on an unmounted partition** -c – use bad blocks read non-destructive [...]