badblocks is the command or utility in linux like operating system which can scan or test our hard disk and external drive for bad sectors. Bad sectors or bad blocks is the space of the disk which can’t be used due to the permanent damage or OS is unable to access it.
Badblocks command will detect all bad blocks(bad sectors) on our hard disk and save them in a text file so that we can use it with e2fsck to configure Operating System(OS) to not store our data on these damaged sectors.
Step:1 Use fdisk command to identify your hard drive info
# sudo fdisk -l
Step:2 Scan your hard drive for Bad Sectors or Bad Blocks
# sudo badblocks -v /dev/sdb > /tmp/bad-blocks.txt
Just replace “/dev/sdb” with your own hard disk /partition. When we execute above command a text file “bad-blocks” will be created under /tmp , which will contains all bad blocks.
Example :
Step:3 Inform OS not to use bad blocks for storing data
Once the scanning is completed , if the bad sectors are reported , then use file “bad-blocks.txt” with e2fsck command and force OS not to use these bad blocks for storing data.
# sudo e2fsck -l /tmp/bad-blocks.txt /dev/sdb
Note : Before running e2fsck command , you just make sure the drive is not mounted.
For any futher help on badblocks & e2fsck command , read their man pages
# man badblocks# man e2fsck
The network is often dropped. Many technicians think that the router is unstable. The ac
When reading apue, the shared storage area is not used for instance. For this reason, I wrote a smal
ifconfig -a View all NIC information of Linuxifconfig eth0 down Turn off eth0 network cardifconfig e
1. Lock the redundant self-built account in the systemCheck method:Execute the command#cat /etc/pas
Linux modify the keyboard mapping capslock to ctrl
Analyze the normal shutdown command under Linux system
Run DOS commands in Linux environment
Minicom can't input the problem solution
Linux compulsory bit and adventure position tips introduction
Introduction to APMD parameters and usage in Linux
Introduction to the ISO boot method of the hard disk under Linux system
Commonly used Linux system monitoring commands introduction
What new features will the Linux 4.1 release bring?
Outlook Express mail application skills two
Windows 7 can't solve the problem of partitioning
What if I can't disable the Universal Volume?
New ideas to restore system administrator password with Gene (1)
How to use the compact compression technology of win10 system to save hard disk space?
Win8.1 off screen brightness automatically adjusts not to be affected by light
Sexy Win7 installation optimization strategy (on)