Written by James McDonald

September 19, 2011

Just had a situation where I ran palimpsest and tried to carve another partition onto a 2TB disk which I had only put a single 500GB partition on. To cut a long story short I ended up losing the current partition on the disk which was also my /home. So not fun.

In the end I did the following:

ddrescued the entire 2TB onto a 3TB External USB Drive a process that was best described as glacial (Googling about it there was a lot of blame being thrown at the WD Caviar Green Drive that I have)

Next up I ran testdisk and it found the missing partition and recovered it. Thoroughly recommend testdisk. Easy to use and the wiki has a good screenshotted step by step.

Next I copied everything off the recovered partition onto the external USB and then repartitioned the drive, this time I did all the partitioning and formatting with fdisk and mkfs.ext4 -b 4096.

The 4096 was so that I could match the file system to the hard disk block size. I think.

# for posterities sake I'm storing my disk layout on the 
# internet so I can recover it the next time I make the 
# mistake of toasting my drive. 

fdisk -l /dev/sdb

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000c571c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976758839   488378396   83  Linux
/dev/sdb2       976758840  1953515631   488378396   83  Linux
/dev/sdb3      1953515632  2930272423   488378396   83  Linux
/dev/sdb4      2930272424  3907029167   488378372   83  Linux

It’s weird that these drives report two different logical / physical sector sizes.

It’s WD’s attempt to provide XP compatible drives. I think.

For more information on data recovery options other than the DIY stuff above visit https://www.cloudwards.net/best-data-recovery-software/

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...