LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-30-2006, 11:53 AM   #1
MikeBike
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Displaying bad blocks list on ext2/ext3


It appears that when the badblocks (or e2fsck) program is run, a list of the bad blocks on the drive is written to the "bad blocks list". I have also heard that once there are a few (non-contigious) blocks in the list, it's time to replace the hard drive, as there are surely more to come.

So my question is: how do I just display the bad blocks list, without actually running badblocks or e2fsck, (which appear to only display newly found bad blocks)?

Thanks, Mike
 
Old 05-31-2006, 03:55 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
According to the badblocks man pages, there is nothing that states only new-found bad blocks are written to standard output. I get the impression that all found bad blocks are written to standard output unless an output file is specified. The -o <output file> option will cause badblocks to write output to the named file. So, I'd assume that 'badblocks -o badblocks.txt' would write the found badblocks to the file badblocks.txt.

The only thing to be wary of, per the man pages, is don't run badblocks on a mounted partition. The default is non-destructive reads. Non-destructive read-write can be specified with the -n option.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
mkfs.ext3 nearly stops at about 61% of blocks ejkeebler Linux - Newbie 1 04-27-2006 06:23 PM
list known bad blocks. bruse Linux - Software 1 02-19-2006 08:50 AM
ext2, ext3 bad magic number in superblock shuuhen Linux - General 1 12-13-2005 01:29 AM
Noncontiguous blocks in ext2 filesystem kwisi Red Hat 3 04-27-2005 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration