LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 03: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, 06:21 PM   #2
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
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, 09:13 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Have you looked into fsck?
 
Old 08-07-2010, 11:57 AM   #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, 12:39 PM   #5
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
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 12:55 PM.
 
Old 08-07-2010, 12: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 06:46 AM.
 
Old 08-08-2010, 05:53 AM   #7
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
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, 06: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, 09: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



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

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

All times are GMT -5. The time now is 08:59 AM.

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