[Ilugc] 1D1C - badblocks

  • From: tkdhanasekar@xxxxxxxxx (Dhana Sekar)
  • Date: Thu, 15 Aug 2013 19:06:37 +0530

command: badblocks
usage: It is used to check for bad sectors on a disk drive

examples:

1. for options and info

    $ man badblocks

2. To check for badblocks on a specific partition sda6

    # badblocks /dev/sda6

    if there are no badblocks it will not show any output on the screen
    use this command on a unmounted partition and as a root

3. To display what is and how much it has scanned

    # badblocks -v /dev/sda6

4. To specify a blocksize

    # badblocks -v -b 2048 /dev/sda6

    by default badblocks command use 1024 as block size

5. To customize the check of badblocks for a size of 200 badblocks

    # badblocks -v -e 200 /dev/sda6

    otherwise badblocks command will keep on till the test is finished

6. To make the badblocks output to a log file

    # badblocks -v -o badsectors.log /dev/sda6


regards,
dhanasekar

Other related posts: