3

I have a 2TB flash drive that was corrupted when I pulled it out without ejecting it first. I am trying to erase the files, delete the partition, and reformat the whole thing. All the obvious things are not working though.

Disks couldn't overwrite the data because it's read-only, GParted has 2 things it will do, if it's already unmounted then GParted simply crashes, if the drive is mounted, GParted will open and then crash when I unmount it. I even attempted to use unetbootin to overwrite the files with an Ubuntu iso and it didn't work. I tried changing the files to read/write but that didn't work either. Any suggestions?

$ sudo fsck -n /dev/sdb
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 1.9 TiB, 2097152000000 bytes, 4096000000 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
Disklabel type: dos
Disk identifier: 0x00095e6d

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 4095999999 4095997952  1.9T  b W95 FAT32

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
├─sda1   8:1    0 230.6G  0 part /
└─sda5   8:5    0   7.9G  0 part [SWAP]
sdb      8:16   1   1.9T  1 disk 
└─sdb1   8:17   1   1.9T  1 part 
sr0     11:0    1  1024M  0 rom  

result of sudo dmesg | grep -E 'usb|sdb' http://pastebin.ca/3766662

The usb says it is a Transcend but I think it's a knock off, it shows up in the results linked above as generic mass storage.

2 Answers2

2

The problem turned out to be a hardware issue. The people I bought the drive from were jerks and they hacked it to make it think it was 2 TB when it was only 120+ GB. I went over that data cap and the drive didn't know what to do so it crashed. There was no fixing it so I threw it away.

chaskes
  • 15,246
  • 1
    Because a 2TB flash drive costs $1,000 I would call that criminal – WinEunuuchs2Unix Feb 13 '17 at 18:19
  • 2
    Maybe the drive works as a [data] drive if you create a 120 GB partition on it. Can you still pick it up from the waste-paper basket, or has it left your house? – sudodus Feb 13 '17 at 19:17
  • unbelievable. what company? –  Feb 14 '17 at 15:53
  • I bought it from a site called Wish, I only paid like $10 for it. I didn't question it because wish is known for selling $500 items super cheap. I couldn't tell you exactly where it came from but reformatting was not an option. As they explained to me at the YSU tech desk, to do anything with it (including deleting files or reformatting it) would require a little space to work with. The hack made it so that it would fill up and then keep trying to put more data in until it inevitably crashed. – Guinevere Ellen Mayberry Feb 17 '17 at 00:26
0

You could try and recreate a GPT table on your key. GPT is the equivalent of MBR for big disks, such as yours. Recreating a table will erase everything, including corrupted GPT data (if it's what's corrupted) and recreate a table from scratch.

To do this :

  1. Check the key is unmounted and, if not, open a terminal and type sudo umount /dev/<YOUR_DISK> (needs admin rights though). Be careful : "YOUR_DISK" should be something like /dev/sdb, and not /dev/sdb1 (sdb is the whole disk while sdb1 is only a partition
  2. Then, type sudo parted /dev/<YOUR_DISK>. Same rule applies to "YOUR_DISK" here. This will bring a prompt looking like this : (parted)
  3. Once you get to that prompt, type mklabel gpt, which will recreate the new GPT table, and erase all partitions with their data.
  4. You can then exit the prompt by typing quit

Another solution, as the disk appears to be formatted in FAT32, is to try and fix it using this command :

sudo dosfsck -w -r -l -a -v -t /dev/sdb1

(taken from a previous AskUbuntu answer here). If the command doesn't exist, you may install the package dosfstools with apt-get