Score:0

How to rescue a Windows disk I corrupted during an Ubuntu installation?

ng flag

I have 2 disks in my PC, one for Linux and one for Windows. I select which one to boot from on my Asus X570-Pro which should be set to UEFI mode.

I was careless today and now only see the Ubuntu disk in the Asus boot menu. I don't know how this happened, but I spent the day installing Ubuntu 21.10 and Lubuntu 21.10 on the Linux disk.

The Windows disk uses BitLocker.

The data appears to be on the Windows disk, but there is no EFI partition. It's possible I had Windows Boot Manager on the Linux disk and overwrote it. I wonder if that means the Windows EFI partition was really on the Linux disk. Hard to say now.

The following output from parted, lsblk, and blkid show where things stand.

How can I rescue data on the Windows disk? I can either boot from it like I used to, or I can mount it and then copy off data. Remember it's BitLockered.

parted:

Disk /dev/nvme1n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Seagate FireCuda 520 SSD ZP2000GM30002  
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: gpt
Disk identifier: 07C2D22A-8354-42A6-9370-ADEA88468A3A

Device              Start        End    Sectors  Size Type
/dev/nvme1n1p1       2048      34815      32768   16M Microsoft reserved
/dev/nvme1n1p2      34816 3905807594 3905772779  1.8T Microsoft basic data
/dev/nvme1n1p3 3905808384 3907028991    1220608  596M Windows recovery environment

lsblk:

nvme1n1                                                                                               
├─nvme1n1p1                                                                                           
├─nvme1n1p2      BitLocker   2                                                                        
└─nvme1n1p3      ntfs                             0C80AE9780AE86B4 

blkid:

/dev/nvme1n1p2: TYPE="BitLocker" PARTLABEL="Basic data partition" PARTUUID="9798e4e2-67e4-4e89-b989-fe6dd96d0c1c"
/dev/nvme1n1p3: BLOCK_SIZE="512" UUID="0C80AE9780AE86B4" TYPE="ntfs" PARTUUID="38ca4738-b773-40c3-a7fe-6d35c2d71d88"
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="28b4f691-4f75-4737-9581-eb1f25aa187b"

Edit: It's now a few days later and here's more information. I gave up and reinstalled Windows. Curiously, it did not create an EFI System Partition but instead used the EFI partition created by Ubuntu on my first hard drive. That's what got me into this trouble in the first place. I had reinstalled Linux on the first drive and selected "use entire disk". This erased the ESP on the first disk which prevented me from booting Windows on the second disk. Ok, the mystery of how I got into trouble was solved. I researched how to put the Windows Boot Manager onto the ESP on the first (Linux) disk, but gave up and reinstalled Windows. I had no important data on the Windows disk. Mostly I wanted to fix this problem just out of principle. I couldn't understand what caused the problem, but now I do.

cc flag
What recovery mechanisms for the Volume Master Key were you using? The (default?) TPM PCR registers may have been changed by the Ubuntu install, so another one of the 6 should be used. This is really a Windows question, and you would get better support at a Windows site. You can just look in the .../EFI/Microsoft location in your EFI parttiion to see if the Microsoft bootloaders are still present.
oldfred avatar
cn flag
Since no ESP on Windows drive, its /EFI/Microsoft boot files must have been on the other drive. You need to then totally reinstall Windows boot files to ESP. You can use your Windows repair flash drive disk or a full install flash drive with its repair console.
Score:2
us flag
  1. As always with any broken disk. I recommend backing up the disk that you have broken onto another one (in case you break it even more accidentally in the partition recovery process)
  2. There's dislocker soft you can install with apt install dislocker that should work with your bitlocker partition. For more details visit it's original page: https://github.com/Aorimn/dislocker
  3. If dislocker works I strongly suggest to copy the data over and re-install your systems on a new disk. Even if it will take some hours to complete the install/copy. This is USUALLY the fastest route.

If you absolutely want to learn something about the recovery and do it anyway, You should start from:

  • preparing a windows media usb. (windows usb installer) which should allow you to recreate the boot partition using bootrec tool that has been extensively covered on the internet by a lot of people, but a good example seems to be here: https://neosmart.net/wiki/fix-mbr/

In the recovery process (after you have fixed the windows part) go into linux again and run os-prober and update-grub for the windows option to be available again (you might as well try that now) more details are given here: GRUB does not detect Windows but there are some more questions on askubuntu about it so feel free to give them a go.

You can then try to work with your broken disk and learn something but recovery process is unfortunately read/readmore/learn/read more/eventually fix process that takes a lot of time.

Hopefully those help you out. I wish you good luck and keep my fingers crossed :)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.