LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2010, 04:30 PM   #1
shanghaiguy
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
Software for finding bad sectors on a usb drive


Hi, I can't seem to find any programs or applications for linux that will find bad sectors of a usb drive. I have seen plenty for Windows, but I was wondering if there are any for linux. Thanks in advance!
 
Old 08-06-2010, 07:21 PM   #2
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
bad blocks

I think you might be referring to something similar to a surface scan done by scandisk on win 98.'Ultimate boot disk cd' might help with that but you might want to try the 'badblocks' in info or man, or even howto on line.

Fred.
 
Old 08-06-2010, 10:13 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,882
Blog Entries: 18

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Have you looked into fsck?
 
Old 08-07-2010, 12:57 PM   #4
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware, Arch
Posts: 386

Rep: Reputation: 41
Make sure to unmount your USB drive (!) before running fsck over it. You can unmount using your Desktop environment, or with the "umount" command.

-A
 
Old 08-07-2010, 01:39 PM   #5
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,796

Rep: Reputation: 213Reputation: 213Reputation: 213
Hardware at a more basic level...

If your system supports Smart you can activate and use it to check a USB HDD.

http://en.wikipedia.org/wiki/S.M.A.R.T.

You may also use a command such as "lshw" to identify your HDD and then google for the manufacturers HDD utility. There is SeaTools for Seagate, ESTOOL for Samsung, and probably one for your HDD too. They are usually available both as a live-cd and as a dos diskette and should be able to scan the surface of the disk for errors.

http://www.samsung.com/global/busine...s/ES_Tool.html

Last edited by thorkelljarl; 08-07-2010 at 01:55 PM.
 
Old 08-07-2010, 01:48 PM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by shanghaiguy View Post
Hi, I can't seem to find any programs or applications for linux that will find bad sectors of a usb drive. I have seen plenty for Windows, but I was wondering if there are any for linux. Thanks in advance!
Code:
badblocks -wv [device]
But be sure to backup all your data from that drive because this command will erase flash-drive. Don't misprint to rewrite your HDD! Be careful!

Last edited by Mr. Alex; 08-08-2010 at 07:46 AM.
 
Old 08-08-2010, 06:53 AM   #7
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
badblocks

I'm told that running badblock commands from bash can take some time to complete. It occurs to me that many pendrives come with an encrypted partition that may be difficult to remove and interfere with reformating and bootability.

Fred.
 
Old 08-08-2010, 07:48 AM   #8
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
This indeed will take some time. Maybe even a whole day. I think it depends on stick's amount of GB.
 
Old 08-09-2010, 10:52 AM   #9
shanghaiguy
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I've tried using the badblocks command on a couple of smaller flash drives that definitely have some bad blocks but for whatever reason, it keeps saying that there are none. As for the fsck command, perhaps I need to use an option, but it doesn't show how many bad blocks there are?
 
  


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
Bad sectors in hard drive Johnnio Linux - Hardware 5 07-31-2007 04:38 PM
Software Raid, Bad sectors (drive DOA) Diablo3d Linux - Hardware 2 08-02-2005 06:44 PM
How to I check a Linux formated hard drive for bad sectors NewtoLinuxWorld Linux - Hardware 1 02-27-2004 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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