LinuxQuestions.org
Register a domain and help support LQ
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, 07: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, 08:04 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
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-10-2006, 12:34 AM   #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, 06:01 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
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


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


All times are GMT -5. The time now is 04:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration