0

I have five 500GB SATA harddisk. For all of these I used an USB 2.0 (and later an USB 3.0) adapter to connect to the PC. They all work good, no bad sectors and each one could be recognized over USB. I formatted all of them over USB using MBR as the type of the partition table.

For some days ago i bought an internal harddisk rack, like this one. After i put the harddisk into the rack, and started Windows 7, the partition didn't show up, only a drive letter. If i clicked on the letter, a question appeared: "Do you want to format the disk?". The rack is ok, because other harddisk works great. The rack has no chip at all; it's simply connecting the SATA cable to the harddisk and therefore no driver was installed upon the first start.

I started Linux. I realized, that all of the 5 harddisk have NO partiton table at all (I mean the old school MBR-type partition table with entries for 4 primary partitions), because fdisk /dev/sdb shows an empty list.

This means: under Linux I can mount the harddisk using mount /dev/sdb and NOT mount /dev/sdb1. It seems, the entire disk is a one large partition; therefore sdb1 didn't work.

I used Testdisk to recover the partition, but not worked.

Is my only option, to copy the data from all of the 5 disks to another disk, that has really an MBR-type partition table?

awgold90
  • 13
  • 4
  • How you going to copy the data if there is no partition table? – Moab Dec 16 '18 at 17:24
  • Luckily I can copy it, because the partition is recognized, BUT ONLY if i use the USB adapter. If put the disk into the rack, the partition isn't showing :-) I can confirm: if i create the MBR partition table under Linux using `fdisk` and create an NTFS filesystem on the first partition (with `mkntfs`), everything works fine (rack, USB2, USB3, everything is ok). – awgold90 Dec 16 '18 at 18:17
  • If I dump the first few hundred sectors with `dd`, would it be difficult to fix the problem manually ? (creating the MBR, and writing the starting sector of the partition into it) – awgold90 Dec 16 '18 at 18:21
  • 1
    Some USB enclosures and adapters have weird problems and incompatibilities. It sounds like your adapter is one. You might want to just replace it. In the meantime, use it to offload anything you've stored on the drives, then reformat the drives either internally, or using a USB device that doesn't have problems. – fixer1234 Dec 16 '18 at 23:40
  • The funny thing is, under Linux I can mount the disk using the same USB adapter, that makes the problem under Windows :-) – awgold90 Dec 17 '18 at 08:47
  • First thing I'd do is indeed dump the first few hundred sectors, both via the USB connection and via the SATA connection, and have a look at them with `hexdump -C ...` etc. Some USB-SATA bridges are really buggy, I wouldn't be surprised e.g. if the USB bridge thought adding offsets to LBA's would be a good idea. – dirkt Dec 17 '18 at 11:57

1 Answers1

1

I made some investigations with an 500GB Seagate ST500DM002 disk, that made some problems.


Formatting with blocksize "standard" under Windows

Using an USB3 adapter: the disk was not recognized !

  • HxD Hex Editor reports a sector size of 512 bytes
  • hdparm: Logical Sector size: 512 bytes / Physical Sector size: 4096 bytes
  • fdisk: Sector size (logical/physical): 512 bytes / 4096 bytes
  • Mounting the partition was successful under Linux

Using an USB2 adapter: the disk was recognized under Windows, but the partition was not shown. The popup says: it has to be formatted.

  • HxD reports a sector size of 4096 bytes
  • hdparm: Logical Sector size: 512 bytes / Physical Sector size: 4096 bytes
  • fdisk: Sector size (logical/physical): 4096 bytes / 4096 bytes
  • Mounting the partition failed under Linux

Using the SATA port: under Windows the disk was recognized, but the partition was not shown.

  • HxD reports a sector size of 512 bytes
  • hdparm: Logical Sector size: 512 bytes / Physical Sector size: 4096 bytes
  • fdisk: Sector size (logical/physical): 512 bytes / 4096 bytes
  • Mounting the partition was successful under Linux.



The first 20971520 sectors were dumped with:

dd bs=10485760 count=2 if=/dev/sdc of=/tmp/hdd_main/test/blocksize_standard/file

Sector dumps (using USB2, USB3, SATA) for the option blocksize=standard are located in: blocksize_standard/ --> all files are identical. Using blocksize=512bytes, they are under blocksize_512bytes/ --> all files are identical. The filesystem contains a README file with the content "Hello World".



Formatting with blocksize "512bytes" under Windows

Under Windows I was not able to do this. Only Linux

mkntfs -f -v -s 512 /dev/sdc1

could format it with 512 bytes. Using this option I was able to access the disk using USB3, and SATA under Windows and under Linux! USB2 has not worked (on both Linux and Windows) ! It seems the problem is with the adapter (and somehow with the OS). The adapter doesn't insert extra data into the stream. It has to do with the blocksize returned by the adapter (as fdisk shows). Anyway it seems Linux is more flexible and can better handle the different kind of usb bridges.



The solution:

formatting with blocksize 512bytes under Linux, the disk can be used intern and extern as well (as mentioned here). If the disk was used under Windows, the data must be backed up (e.g under Linux), the disk must be formatted again, and the data have to copied back to it.

awgold90
  • 13
  • 4