tdeith
October 12th, 2016, 10:50 PM
I have an SSD whose partition table was corrupted while I was trying to move a dual-booted Windows into an EFI boot - I'm not positive on the how or why of the corruption. I am now booted into a live USB trying to recover the disk, which I have connected as an external via USB. My goal is ultimately to wipe the disk, including the partition table, and start this disk from scratch. I no longer care about partitions or their data.
However, I can't get anything to wipe more than 8GB of the 512GB on the disk, and there are a variety of oddities with this disk which I can't make heads or tails from, and must be related. My best guess at an overall theme to the oddities is that there is a corruption in the disk causing two specific partition headers (is that a thing?) to be read back-to-back in a loop, such that those two partitions will freeze anything trying to read the SSD's partition data.
Some interesting symptoms:
- fdisk -l, blkid, and df -h don't necessarily reach a consensus on what they're seeing regarding the drive. At the moment (now that I've ejected/inserted the drive a couple of times), blkid thinks the device is in /dev/sdd, df -h thinks the drive is in /dev/sdc, and fdisk doesn't see it. df -h is certainly right.
- None of my computers have successfully booted into BIOS (neither booting past BIOS nor entering the BIOS settings) with this drive attached. The BIOS's universally freeze while detecting hardware. This makes boot-based recovery tools (eg, DBAN) difficult so far. It is also not fixed by resets-via-CMOS-battery-ejecting.
- Once booted into Ubuntu, when the disk is inserted by USB, Nautilus sees the drive, can mount the original partitions on the drive, and can successfully read their contents. However, each partition is listed about a hundred times, each entry with a different UUID attached to the partition. (This makes sense to me if the partition table is gone and partitions are being repeated.)
- Using dd if=/dev/zero of=/dev/sdX bs=1M to try and overwrite the entire device resulted in only 8GB of 512GB being written before 'No space left on device' is returned. These 8GB correspond to the 8GB occupied by one of the two repeating partitions, no more, no less. I wish I could personally make inferences on this detail.
- GParted does not see the device, with the exception of one time: at that time, it saw 8GB of empty space, possibly written by dd above, and nothing else. Re-writing the partition table at that time had no effect.
- testdisk only sees 8GB of device, and doesn't find any partitions in scanning. (The cylindar/sector counts seem off too, but frankly I don't know enough to navigate testdisk confidently.)
I'm at a loss as to how else I can try to scrub whatever's corrupting this disk. My uneducated speculation is that there's some corruption in the disk causing seeking to go from the end to the start of the disk when looking for partitions, or something to that effect.
fdisk -l output:
[... /dev/ramX ...]
Disk /dev/loop0: 1.3 GiB, 1433468928 bytes, 2799744 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 /dev/sda: 14.9 GiB, 16018046976 bytes, 31285248 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: 0x0e0e8e70
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 0 2902111 2902112 1.4G 0 Empty
/dev/sda2 2888004 2892739 4736 2.3M ef EFI (FAT-12/16/32)
df -h output - note that /dev/sdc3 - /dev/sdc255 are repeats of the same two partitions.
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 7.8G 0 100% /dev
tmpfs 1.6G 23M 1.6G 2% /run
/dev/sdb 1.4G 1.4G 0 100% /cdrom
/dev/loop0 1.4G 1.4G 0 100% /rofs
/cow 7.8G 262M 7.6G 4% /
tmpfs 7.8G 200K 7.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 7.8G 192K 7.8G 1% /tmp
tmpfs 1.6G 108K 1.6G 1% /run/user/999
/dev/sdc12 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a91
/dev/sdc16 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a92
/dev/sdc10 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a9
/dev/sdc22 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a93
/dev/sdc24 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a94
/dev/sdc26 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a95
/dev/sdc6 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a96
/dev/sdc13 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e731
/dev/sdc11 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e73
/dev/sdc15 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e732
/dev/sdc21 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e733
/dev/sdc8 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a97
... etc etc for many repetitions ...
/dev/sdc192 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a996
/dev/sdc198 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a995
/dev/sdc200 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a997
/dev/sdc197 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7395
/dev/sdc195 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7397
/dev/sdc199 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7396
blkid output - note that the device is actually at /dev/sdc, and is reported as being in /dev/sdd here. I have no idea why this would be the case. Also note that everything from /dev/sdd3 - /dev/sdd255 are repeats:
/dev/loop0: TYPE="squashfs"
/dev/sdd1: UUID="4598-B2D3" TYPE="vfat"
/dev/sdd2: LABEL="Lovelybunchadata" UUID="64B21538B2151062" TYPE="ntfs"
/dev/sdd5: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sdd6: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd7: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sdd8: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd9: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
... UUIDs change, but nothing else...
/dev/sdd254: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd255: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sda1: LABEL="ESD-USB" UUID="12C5-D03F" TYPE="vfat"
Thank you to anyone who might be able to help.
However, I can't get anything to wipe more than 8GB of the 512GB on the disk, and there are a variety of oddities with this disk which I can't make heads or tails from, and must be related. My best guess at an overall theme to the oddities is that there is a corruption in the disk causing two specific partition headers (is that a thing?) to be read back-to-back in a loop, such that those two partitions will freeze anything trying to read the SSD's partition data.
Some interesting symptoms:
- fdisk -l, blkid, and df -h don't necessarily reach a consensus on what they're seeing regarding the drive. At the moment (now that I've ejected/inserted the drive a couple of times), blkid thinks the device is in /dev/sdd, df -h thinks the drive is in /dev/sdc, and fdisk doesn't see it. df -h is certainly right.
- None of my computers have successfully booted into BIOS (neither booting past BIOS nor entering the BIOS settings) with this drive attached. The BIOS's universally freeze while detecting hardware. This makes boot-based recovery tools (eg, DBAN) difficult so far. It is also not fixed by resets-via-CMOS-battery-ejecting.
- Once booted into Ubuntu, when the disk is inserted by USB, Nautilus sees the drive, can mount the original partitions on the drive, and can successfully read their contents. However, each partition is listed about a hundred times, each entry with a different UUID attached to the partition. (This makes sense to me if the partition table is gone and partitions are being repeated.)
- Using dd if=/dev/zero of=/dev/sdX bs=1M to try and overwrite the entire device resulted in only 8GB of 512GB being written before 'No space left on device' is returned. These 8GB correspond to the 8GB occupied by one of the two repeating partitions, no more, no less. I wish I could personally make inferences on this detail.
- GParted does not see the device, with the exception of one time: at that time, it saw 8GB of empty space, possibly written by dd above, and nothing else. Re-writing the partition table at that time had no effect.
- testdisk only sees 8GB of device, and doesn't find any partitions in scanning. (The cylindar/sector counts seem off too, but frankly I don't know enough to navigate testdisk confidently.)
I'm at a loss as to how else I can try to scrub whatever's corrupting this disk. My uneducated speculation is that there's some corruption in the disk causing seeking to go from the end to the start of the disk when looking for partitions, or something to that effect.
fdisk -l output:
[... /dev/ramX ...]
Disk /dev/loop0: 1.3 GiB, 1433468928 bytes, 2799744 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 /dev/sda: 14.9 GiB, 16018046976 bytes, 31285248 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: 0x0e0e8e70
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 0 2902111 2902112 1.4G 0 Empty
/dev/sda2 2888004 2892739 4736 2.3M ef EFI (FAT-12/16/32)
df -h output - note that /dev/sdc3 - /dev/sdc255 are repeats of the same two partitions.
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 7.8G 0 100% /dev
tmpfs 1.6G 23M 1.6G 2% /run
/dev/sdb 1.4G 1.4G 0 100% /cdrom
/dev/loop0 1.4G 1.4G 0 100% /rofs
/cow 7.8G 262M 7.6G 4% /
tmpfs 7.8G 200K 7.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 7.8G 192K 7.8G 1% /tmp
tmpfs 1.6G 108K 1.6G 1% /run/user/999
/dev/sdc12 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a91
/dev/sdc16 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a92
/dev/sdc10 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a9
/dev/sdc22 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a93
/dev/sdc24 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a94
/dev/sdc26 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a95
/dev/sdc6 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a96
/dev/sdc13 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e731
/dev/sdc11 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e73
/dev/sdc15 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e732
/dev/sdc21 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e733
/dev/sdc8 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a97
... etc etc for many repetitions ...
/dev/sdc192 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a996
/dev/sdc198 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a995
/dev/sdc200 7.6G 3.3G 3.9G 46% /media/ubuntu/29ca7c9f-c33a-4360-8ed6-54befae126a997
/dev/sdc197 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7395
/dev/sdc195 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7397
/dev/sdc199 257G 236G 8.2G 97% /media/ubuntu/7778b2a1-9bf2-4648-9fa6-6f2643d83e7396
blkid output - note that the device is actually at /dev/sdc, and is reported as being in /dev/sdd here. I have no idea why this would be the case. Also note that everything from /dev/sdd3 - /dev/sdd255 are repeats:
/dev/loop0: TYPE="squashfs"
/dev/sdd1: UUID="4598-B2D3" TYPE="vfat"
/dev/sdd2: LABEL="Lovelybunchadata" UUID="64B21538B2151062" TYPE="ntfs"
/dev/sdd5: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sdd6: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd7: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sdd8: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd9: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
... UUIDs change, but nothing else...
/dev/sdd254: UUID="29ca7c9f-c33a-4360-8ed6-54befae126a9" TYPE="ext4"
/dev/sdd255: UUID="7778b2a1-9bf2-4648-9fa6-6f2643d83e73" TYPE="ext4" PTTYPE="dos"
/dev/sda1: LABEL="ESD-USB" UUID="12C5-D03F" TYPE="vfat"
Thank you to anyone who might be able to help.