LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 02-09-2006, 06:01 AM   #1
Jayaraghavendran
LQ Newbie
 
Registered: Feb 2006
Posts: 16

Rep: Reputation: 0
Find Hard Disk Information


Hi,

Is there a command(other than "badblocks") to find the number of bad sectors in the hard disk in Unix??

I tried badblocks. But it is too time consuming. I need something which will tell me the already scanned result.

Or Is there a file in which hard disk related information is stored which also includes the bad sector count??

Thanks in advance!!

Regards,
Jay
 
Old 02-09-2006, 07:04 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
The current list of badblocks could be extracted from a ext2/ext3 system by using the command "dumpe2fs -b /dev/yourblockdevicehere"

e2fsck [-l|-L] could be used to add/set news bad blocks on a partition.
 
Old 02-09-2006, 11:34 PM   #3
Jayaraghavendran
LQ Newbie
 
Registered: Feb 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Regarding Hard Disk Information..

Hi,

Thanks for the reply.

But,

"#dumpe2fs -b /dev/hda"

gives the following :

dumpe2fs 1.28 (31-Aug-2002)
dumpe2fs: Bad magic number in super-block while trying to open /dev/hda
Couldn't find valid filesystem superblock.


And.....

"#dumpe2fs -b /dev/hda1"

gave the following :

dumpe2fs 1.28 (31-Aug-2002)


Running "badblocks" command directly on /dev/hda1 reported
two badblocks. In that case, why the same is not being reflected on
dumpe2fs??

Also, do the number of "Bad blocks" map directly to the number of "Bad Sectors" in hard disk?? If "badblocks" command reports 2 bad blocks.. does that mean there are two bad sectors on my hard disk??

I am unable to make out.. Please help..

Thanks in Advance!!

Regards,
Jay
 
Old 02-13-2006, 05:01 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
As I noted, this works only for ext2/ext3 filesystems.
Are you sure /dev/hda1 is a ext2 or ext3 filesytem ? Type:
# mount | grep /dev/hda1

see'ya,
 
  


Reply



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
Debian cant find hard disk Kroenecker Debian 6 06-08-2006 10:30 AM
Can't find hard disk recursv Slackware - Installation 4 06-08-2006 03:10 AM
Installation can't find my hard disk lloyd_dm Linux - Software 3 06-08-2006 01:16 AM
Why Sun not find my 72G hard disk....? jsnch Solaris / OpenSolaris 5 06-13-2005 02:05 AM
Hard disk Information alint7 Linux - Hardware 7 04-11-2005 09:16 AM

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

All times are GMT -5. The time now is 02:47 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