LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-27-2015, 08:15 PM   #1
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Rep: Reputation: Disabled
How to hard format a sata drive


Howdy;

What tools and procedures are available for doing a hardware level format on a usb3 sata external hard drive? I'm not talking about simply re-installing an ext4 file system, that allready hasn't worked for getting rid of bad blocks.

Bill
 
Old 04-27-2015, 08:30 PM   #2
kmhuntly
Member
 
Registered: Mar 2015
Location: Cheektowaga, NY
Distribution: ArchLinux
Posts: 34

Rep: Reputation: 7
You could zerofill. dd if=/dev/zero of=/dev/sdYX BS=4M. Or if you really want to destroy change zero to random and then do the zero.
 
1 members found this post helpful.
Old 04-27-2015, 08:34 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by billvance View Post
I'm not talking about simply re-installing an ext4 file system, that allready hasn't worked for getting rid of bad blocks.
So you used "-c" (twice) ?.
Else
Code:
man badblocks
 
Old 04-27-2015, 09:01 PM   #4
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
So you used "-c" (twice) ?.
Else
Code:
man badblocks
This is the first time I've heard of, "badblocks".

Please try to be a little less obscure. Used, "-c",
twice on/with what?
 
Old 04-27-2015, 09:12 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
It has been several years since I low level formated a hard drive. When I last did it I had to use a utility program supplied by the manufacturer and it took 2 or 3 hours to run. So I googled to see if the hard drive manufacturers still provide low level formatting utilities. Seagate for one still supplies such a utility:

http://knowledge.seagate.com/article...S/FAQ/203931en

-------------------------
Steve Stites
 
2 members found this post helpful.
Old 04-27-2015, 09:17 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The consumer can not perform a true low level format. You can run e2fsck with the -c to check for bad blocks or try running the manufacture's diagnostic program which are usually DOS or windows programs. As far as I know smartctl does not work via USB.

Can you provide some information or error messages pertaining to the drive?

Last edited by michaelk; 04-27-2015 at 09:21 PM.
 
1 members found this post helpful.
Old 04-27-2015, 09:17 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I quoted your reference
Code:
man mkfs.ext4
 
1 members found this post helpful.
Old 04-27-2015, 10:08 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Writing zeros is the modern low level for most users. I'm sure someone does have a real low level format tool.
 
1 members found this post helpful.
Old 04-27-2015, 10:30 PM   #9
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
The consumer can not perform a true low level format. You can run e2fsck with the -c to check for bad blocks or try running the manufacture's diagnostic program which are usually DOS or windows programs. As far as I know smartctl does not work via USB.

Can you provide some information or error messages pertaining to the drive?
Perhaps I should back up a ways before going forwards. My
machine has just had a 32 to 64 bit hardware upgrade, an
upgrade from 32 to 64 bit Kubuntu 12.04, and a new intel i7
quad processor. This, finally, after many financial delays.

Mostly I'm liking it, aside from minor av quibbles.

Two real similar problems, though near as I can figure they stem from different sources. Anyway, one thing at a time. Error messages for both my Sony scsi DAT tape drive, and my transcend usb 3.0 StoreJet 25M3 1TB external hard drive, are mostly that they are, "read only", though I've also seen, "write protected". This has nothing to do with the little tab on the tape cartridge. Looking around the web
told me the only thing for drives in that condition, was to
format them. Gparted, and kpartition manager wouldn't touch
the usb drive. Looking around some more, I found some raves
about a gnome util called, "palimpsest". I couldn't seem to get it to work, so I rebooted to give everything a fresh
start, and it told me I had over 1400 bad blocks. I then used it to format it, and while it initially looked ok, it
still gave me, "read only", errors.

So now I'm here consulting with you folks. Looks like the
only thing left is to try the zeroing out trick, and then
reformating, yes?

Bill
 
Old 04-28-2015, 08:26 AM   #10
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: Disabled
Well, it looks like its a goner. I zeroed it out, formated
it, and tried it out. Still has the errors. Thanks anyway,
for all the help.

On to the other problem. Anyone got a clue as to why a scsi
tape drive would have a, "read only", problem? The only
thing I can think of that might trigger it, would be the
difference in buffer size between 32 and 64 bit systems. but
if that was the problem tar would be able to make it work
with the, "-b <size>", option, but it isn't cutting the
mustard.

Bill
 
Old 04-28-2015, 09:00 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The device /dev/st0 permissions might be read only. Has the tape drive worked at all since the switch to 64bit OS
 
Old 04-28-2015, 12:32 PM   #12
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
The device /dev/st0 permissions might be read only. Has the tape drive worked at all since the switch to 64bit OS
No it hasn't. Here's what it shows:

ls -l /dev/st0
crw-rw---- 1 root tape 9, 0 Apr 28 05:14 /dev/st0

Bill
 
Old 04-28-2015, 03:25 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Some mechanical cover or switch on tape cassette causing it to be write protect or the mechanical switch causing it? As above, when noted?
 
Old 04-28-2015, 06:24 PM   #14
billvance
Member
 
Registered: Sep 2013
Location: Bothell, Washington USA
Distribution: Kubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Some mechanical cover or switch on tape cassette causing it to be write protect or the mechanical switch causing it? As above, when noted?
I allready mentioned that's not the case. Tried the cassette switch both ways just to be sure.
 
Old 04-28-2015, 08:10 PM   #15
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Switch?
 
  


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
Format a hard drive to work on machine (dell 32-bit). Have installed new 1 TB drive geoffreywolfe Linux - Newbie 4 02-18-2015 11:29 PM
format hard drive and add to existing hard drive to extend the capacity in linux boby.kumar Linux - Newbie 1 04-10-2013 07:18 AM
[SOLVED] transfer data from a SATA external hard drive to a IDE internal hard drive Cabtech Linux - Newbie 7 04-22-2012 02:55 PM
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
Clone a dual booting IDE hard drive to a SATA hard drive namida12 Linux - Distributions 1 07-14-2008 10:01 AM

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

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