I want to know if I have badblocks on my sdb5 HDD.

Steven Vollom stevenvollom at sbcglobal.net
Thu Nov 20 16:06:45 UTC 2008


I did the following in the Shell:
steven at Studio25:~$ e2fsck -c
Usage: e2fsck [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]
               [-I inode_buffer_blocks] [-P process_inode_size]
               [-l|-L bad_blocks_file] [-C fd] [-j external_journal]
               [-E extended-options] device

Emergency help:
-p                   Automatic repair (no questions)
-n                   Make no changes to the filesystem
-y                   Assume "yes" to all questions
-c                   Check for bad blocks and add them to the badblock list
-f                   Force checking even if filesystem is marked clean
-v                   Be verbose
-b superblock        Use alternative superblock
-B blocksize         Force blocksize when looking for superblock
-j external_journal  Set location of the external journal
-l bad_blocks_file   Add to badblocks list
-L bad_blocks_file   Set badblocks list
steven at Studio25:~$

The following was included in a search:

*Important note:* If the output of *badblocks* is going to be fed to the 
*e2fsck* or *mke2fs* programs, it is important that the block size is 
properly specified, since the block numbers which are generated are very 
dependent on the block size in use by the filesystem. For this reason, 
it is strongly recommended that users *not* run *badblocks* directly, 
but rather use the *-c* option of the *e2fsck* and *mke2fs* programs.


Does the size of the blocks show here:

255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x47a447a3

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1824    14651248+  83  Linux
/dev/sda2            1825       24792   184490460    f  W95 Ext'd (LBA)
/dev/sda5           16523       24792    66428775   83  Linux
/dev/sda6            1825        2006     1461852   82  Linux swap / 
Solaris
/dev/sda7            2007       16522   116599738+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xffffffff

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2591    20812176   83  Linux
/dev/sdb2            2592        2856     2128612+  82  Linux swap / 
Solaris
/dev/sdb3            2857        9964    57095010    5  Extended
/dev/sdb5            2857        9964    57094978+  83  Linux
steven at Studio25:~$               
If there are badblocks and they are identified on the HDD, can the HDD 
still be used?  If I format the HDD, will the badblocks be wiped and 
usable after format?  TIA.

Steven




More information about the kubuntu-users mailing list