0

I installed Ubuntu on my old pc. I thought only C drive would be formatted, but the entire harddrive got formatted and partioned into one.

  • The drive refers to the whole disk, C is the name used for a partition (ie. a partition or part/section of the total drive). It's mostly users who have wrongly used terminology like "C drive" which could mean "C" on a singly partition drive, or wrongly meaning instead "C partition". Microsoft Press wrongly in one book in the mid 90s made that mistake (they acknowledged that about six months later), and users have ever since... A drive is not the same as a partition (which can be the whole drive, or part of the drive). – guiverc Dec 08 '20 at 07:53

1 Answers1

0

Welcome to AskUbuntu, MrKarma4ya.

Recovering files from a formatted drive will be quite difficult and possibly quite expensive. This really depends on how the ext4 format modified the drive. If all it did was write the superblock and the installation files, there's a possibility that some of your data is still there. The problem is that there is no method (that I know of) to change partitions back to a previous format. You will need to get creative.

Option 1:

  1. make a dd image of your disk and save it to a safe place. This will likely require a second disk of equal or greater size.
  2. format the disk as NTFS
  3. compare the disks at the block level using cmp
  4. cmp will tell when the two begin to change
  5. take that offset value and have dd use your image as a source and skip ahead by X — where X is the offset cmp gave you — and start writing back your data to the freshly formatted NTFS disk

Mind you, this will only work if the bulk of the Ubuntu installation did not overwrite the files that existed on the device previously and if all the details are done perfectly. It's not a simple process at all.

Option 2 (the expensive one):

  1. send your disk to a data recovery centre
  2. be prepared for the sticker price

I really hope your most important files have been backed up recently somewhere.