LinuxQuestions.org
Help answer threads with 0 replies.
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 01-26-2013, 01:41 PM   #1
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Rep: Reputation: 0
Unhappy Can not mkfs an external USB drive


Hi,

I have an external USB2.0 hard drive and I am unable to format it to ext4 or any other file system. The drive was preformated with NTFS, working perfectly under Windows.
If I try to format it with gparted to ext4, gparted tells me that everything was successfull, but shows the partitions file system still as "unallocated". Trying to mount the drive fails.
I tried nearly everything, using fdisk, cfdisk, parted, mkfs.ext4, nothing works.

So next I tried to format the drive under Windows to ext4 with "minitool". This was succesfull. I booted to Linux(Mint) again and plugged in the drive and it was mounted perfectly. But after unmounting and mounting again, the drive is again corrupt. After mounting again, not only the file system is corrupt, but also the partition table is always broken.

So I tried this several times with several Linux systems on different computers (Ubuntu, Mint, Raspian). Everythere the same. So I thought maybe the drive is defective (although working perfectly with NTFS under Windows) and bought a new one. A new complete external USB2.0 drive with housing and controller. And: still the same issue. I am running out of ideas and I found nothing helpful on googling

Does someone have an idea?

Here is what parted -l says (even after mkfs.ext4 /dev/sdb1):
Code:
Model:  Mass Storage Device (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  500GB  500GB  primary
Please see also the screenshots of gparted
Attached Images
File Type: png Screenshot from 2013-01-26 20:32:43.png (53.2 KB, 22 views)
File Type: png Screenshot from 2013-01-26 20:34:05.png (30.4 KB, 20 views)
 
Old 01-26-2013, 03:08 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,131

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
I tend to get free and loose with "dd" and /dev/zero in such circumstances - but let's see "fdisk -l" (root/sudo) first.
 
Old 01-26-2013, 04:22 PM   #3
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
I tend to get free and loose with "dd" and /dev/zero in such circumstances - but let's see "fdisk -l" (root/sudo) first.
No data to loose. Backups were made.

fdisk -l prints:

Code:
Disk /dev/sdb: 500.1 GB, 500107860992 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b5ed2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976773119   488385536   83  Linux
 
Old 01-26-2013, 07:07 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,131

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Quote:
Originally Posted by maikelmeyers View Post
A new complete external USB2.0 drive with housing and controller. And: still the same issue.
That's a worry.
See if you can actually write to the device from Linux
Code:
dd if=/dev/zero of=/dev/sdb1 count=100
(make sure there's no typo involved). I've found that sufficient usually, but you can also zero the device node itself - some of the partitioning tools seem to object to that these days. I think fdisk won't open the device so you can repartition it - it used to, but (I think) complains these days. Parted may be better.
I might test it later on an old disk.
 
Old 01-27-2013, 02:33 AM   #5
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I tried now to zero the complete device
Quote:
sudo dd if=/dev/zero of=/dev/sdb
but after that, still the same: after applying a new MSDOS partition table and trying to make a new primary partition with EXT4, ended up with the same result as before: "unknown file system". By the way, applying a ntfs partition works. I don't know whats wrong here. Both drives can be formatted correctly to NTFS or EXT4 under Windows, but using it with Linux after that destroys the partition table when unmounting. That's so weird. Everything works fine with my 16GB USB sticks. There is no such a problem
 
Old 01-27-2013, 11:32 PM   #6
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Original Poster
Rep: Reputation: 0
No ideas someone?
 
Old 01-28-2013, 01:29 PM   #7
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
Did you think to check the SMART report for errors?
sudo smartctl -a /dev/sdb
for the /dev/sdb drive.

and, perhaps, you can try the latest GParted live (cd or usb).
 
Old 01-30-2013, 03:31 AM   #8
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Now I gave it a third try and ordered another new USB drive: http://www.amazon.de/gp/product/B008...ls_o00_s00_i00
This one works as expected. No such problems.
It seems that there is a Linux problem with some USB controllers, since the other 2 drives worked perfectly with windows.

Thanks for your efforts
 
Old 01-31-2013, 07:27 AM   #9
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
Can you please give us the model of the other (non working) hard drives?
I never had a similar problem myself, unless with defective drives.
I think to some very old kernel too, that's why I suggested the latest GParted live, not just GParted from any Linux distribution.
 
Old 02-01-2013, 04:28 PM   #10
maikelmeyers
LQ Newbie
 
Registered: May 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Did you think to check the SMART report for errors?
sudo smartctl -a /dev/sdb
for the /dev/sdb drive.
This is what smartctl says:

Code:
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.5.0-17-generic] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl: Device Read Identity Failed: Unknown error

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
This drive is a Toshiba MK5055GSX build into a Sharkoon Quickstore Portable.
The other drive I sent back. It was this one: http://www.ebay.de/itm/310144875783?...84.m1439.l2649

Are there any commands to read out more information about the USB/SATA controller?
 
  


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
External USB drive - mkfs hangs mattca Linux - Hardware 2 11-13-2010 05:25 PM
Use desktop with usb-usb cable as external bootable optical drive for netbook seancarver Linux - Laptop and Netbook 3 11-02-2009 09:38 PM
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
XS Drive II external USB hard drive/card reader max74 Linux - Hardware 7 10-21-2003 10:41 PM


All times are GMT -5. The time now is 10:40 PM.

Main Menu
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