I tried to install Linux (Mint distro) on my laptop computer after recieving a secondary disk. After installing Mint, I just rebooted the system.

Nothing was happening (Actually, I was getting a message, from BIOS I guess, saying "No bootable disk" or something similar).

So then I tried to boot on an Arch pendrive, but I was getting a blackscreen. I changed BIOS mode to legacy (from UEFI), and added nomodeset to boot cl in Grub (and vga=0x37F for comfort). I was finally booting on something.

I did a fdisk -l and found that there was no Windows partition table. However, I have no idea why Mint wasn't booting as I had Linux Partitions.

I then did testdisk /dev/sda (where sda is my Windows disk), chose EFI GPT, Analyze. My partition seemed like retrieved, so I chose each of it and wrote. After rebooting, on testdisk, only ESP and recovery partition were there.

I then started to re partition my /dev/sdb to install Linux.As I wanted to format my partitions, I did a mkfs.ext4 on sda1 and sda2 instead of sdb1 and sb2.

Is there anyway to retrieve my Windows system (At least my data, as I didn't format data partition, only ESP and recovery).


There seem to be multiple things going on here. But basically it sounds like you want to get your partition table back so you can at least get to your data partition that you did not run mkfs on.

So first, the answer is yes--if you know the original layout of the partition table, you can recreate it on the disk and then access those partitions that have not been modified. However knowing how to recreate the partition is kind of a problem unless you planned ahead. For example, this works:

# Save partition table to a file
sfdisk -d /dev/sda > partitions.txt

[Something destroys partition table.]

# Recreate partition table
sfdisk /dev/sda < partitions

The problem is if you didn't do the first step, you might need to be clever about how to find the information you need to recreate the table.

Second potential problem is that whatever you did recreated the boundries for sda1 and sda2 before mkfs. If that is the case, and sda1 or sda2 overlapped your data partition when it did a mkfs, you're going to have to look into data recovery techniques to see if you can get anything back. It could be very very hard.

I haven't used testdisk, but after looking at the page, frankly it doesn't sound good. If testdisk created the other partitions for you, and the only remaining space should have been for the one you want, you can try to just make a partition there and see if you can mount it under a Live CD.

  • Thank you for you answer. In fact, I used testdisk to recover my partitions but it only recovered my ESP and recovery partition (I don't really care about it). My last partition, which is the one storing my windows system and my datas was displayed by test disk (or at least, I think), but wasn't recovered. I then accidentaly formated my 2 recovered partitions (but that's not a big deal). So if I understand well, I just need to create a partition covering from last recovered partition sector (sda2) to last disk sector ? Doesn't it risk to overwrite my datas ? – servabat Dec 13 '13 at 19:14
  • If you just change the partition table, that's at the beginning of the disk, so it won't actually touch your data. Then try to mount read-only. It's possible that your partition was originally inside an extended partition which will make things more complicated. Try creating a primary partition. If your original partition was primary and you create a partition within an extended partition, then there might be something overwritten. en.wikipedia.org/wiki/Extended_Boot_Record – Angelo Dec 13 '13 at 19:18
  • Tank you for you answers. I got my data back on a recover external disk. I will reinstall Windows, and finish this linux installation :) – servabat Dec 13 '13 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.