#Accidentally overwrote windows boot partition

95 messages · Page 1 of 1 (latest)

keen citrus
#

Hello, while installing debian on my main desktop, i wrote the image onto my ssd, little did i know, the boot partition for windows was on there and now windows wont boot. Ive been troubleshooting multiple things for 2 days, but still got nothing.
Neither grub recognizes the windows partition, or bios, bootrec /scanos (using windows installation/repair tool), or os-prober can see it, but if I go to partition manager on my linux installation, its clearly filled with data.
There are around 3-5TB of apps and memories on this computer so I would really appreciate the help :(

Here is any extra info you might need including pictures, if thats not enough please ping me or ask:

os-prober:

ls: cannot open directory '/boot/efi': Permission denied
ls: cannot open directory '/boot/efi': Permission denied
ls: cannot open directory '/boot/efi': Permission denied
ls: cannot open directory '/boot/efi': Permission denied
mkdir: cannot create directory ‘/var/lib/os-prober/mount’: Permission denied
mkdir: cannot create directory ‘/var/lib/os-prober/mount’: Permission denied```
jovial basin
#

Have you tried repairing directly through Windows Recovery Environment?

keen citrus
#

I plugged in the usb, went to repair computer, but it couldnt detect any backups, or windows installations

jovial basin
#

Have you tried using both of below commands in the Command Prompt (in Windows)?

bronze currentBOT
#

This utility scans the system for corruption in the system files which may be responsible for irregular operating system behaviour. For more information, check this page (written by Microsoft).

Use DISM /Online /Cleanup-Image /RestoreHealth if SFC fails to properly fix the problem.

queen night
#

You should have access to the windows partition from your ubuntu installation to backup your memories.
The image of the partition on the second drive seems to be mounted to /media/ch.... whatever. When you resize the column you should see the full mount point where you can access the data.
Can you mark the last drive in Partition Manager and check the mount points of the partitions? Maybe you can find the partition with your memories and before destroying some more try make a backup of that.
DISM and SFC will not bring back the boot partition for windows.

keen citrus
queen night
#

So please make screenshots of all your disks and partitions so we can see what you have.
As far as I understood the problem:

  • Disk /dev/nvme0n1 is the boot drive that now contains Ubuntu. You have moved some partition from that to another drive. What have you moved?
  • Disk /dev/sda is an NTFS partition. Does it contain the Windows installation (\Windows, \Programs, ...) ?
  • Disk /dev/sdb is what?
misty scroll
#

Also which of the three storages you have...contains the windows?..

keen citrus
keen citrus
#

actually, maybe one drive has something, i only got rid of it a month ago

keen citrus
misty scroll
#

if windows is intact!...then you can create efi partition which will enable you to boot into windows...

keen citrus
keen citrus
misty scroll
keen citrus
misty scroll
keen citrus
#

still in school, sry, ill be home soon

keen citrus
misty scroll
keen citrus
#

I read online something about disabling fast boot in bios, should I give that a try?

keen citrus
#

ok

#

before you say anything

keen citrus
#

go on

#

what?

#

it just... does that?

#

that cant be

#

but like... I dont think I can even access the data

keen citrus
#

I think...

#

still gave me An error occurred while accessing 'DATA', the system responded: The requested operation has failed: Error mounting /dev/sdb1 at /media/charlotte/DATA: Unknown error when mounting /dev/sdb1

#

if i try to right click and mount it, it gives me that error

#

it shows that its ntfs

#

but I cant really read it or anything

#

it seems

#

it did last time lol

#

1 sec, I searched for efi

#

also sorry if Im kind of being dumb rn, I just woke up and things that dont make sense make sense to me

#

no odd thing... I already had it installed and I could read it yesterday, it just wont let me today for some reason

misty scroll
misty scroll
keen citrus
#

I tried to the repair computer option, I tried to see if i had any backups, I also tried to see if it could detect the windows partition, none worked

misty scroll
keen citrus
#

ok, let me reflash it again

misty scroll
keen citrus
#

sorry i was designing something rq

misty scroll
#

its okay!... come back to your thread...when you have free time next time! it would be convenient to help you...in real time...

keen citrus
#

im free today, it just seems rhat were having trouble coming to the thread at the same time

queen night
#

Try to run "sudo ntfsfix /dev/sdb1" in a terminal window. This will check the NTFS file system for problems and fix it. If it can fix errors the partition should be mounted on next boot.

queen night
#

After thinking again about your issue some questions come to my head.
Was the NVMe disk their when you had Windows running or have you added the NVMe for Ubuntu.<

#

The partitions on the disk /dev/sda looks like partions from a Windows installation with MBR. Have you changed something in the BIOS boot order and EFI support?

#

Have you tried to remove the NVMe drive and boot the rig?

keen citrus
keen citrus
#

@queen night ?

queen night
#

What I would try is remove the NVMe. Then Start the PC from a Windows installation media USB stick and enter repair console.

#

Within the comman prompt you should have access to your disks.
Run "diskpart" command and run following commands for all of your disk. This will show us the disk and partition information:
"list disk"
"select disk 0"
"detail disk"
"select disk 1"
"detail disk"
With "detail disk" you will see assigned driver letters to the volumns.
Navigate to all this drive letters and list the root content.
Ex:

#

Exit diskpart with the command "exit".
List content of drive C via command "dir c:" and "dir /AH c:" (this will show hidden files) and repeat it for all other drives.

#

then try to run "bcdedit /enum". This will show boot configuration entries if it can find some.
and run "bootrec /ScanOs" (I think, you have already tried this but show us the results)
And post screenshots of your results.
What motherboard and CPU are you using?

misty scroll
keen citrus
queen night
#

The outputs of the commands "dir c:", "dir d:" and "dir /AH d:" are missing. This is to know what is on every partition.

keen citrus
#

Ill get the dir c: in a sec

keen citrus
keen citrus
#

If I restore windows, is there a possibility it will give me a basic idea of what apps I had on my desktop? I recently switched to debian and imo its 100% better than windows 10, all I need back is some info on the tools I used in case I forget some, then I might clear the drive and just use that drive for other software and for a tiny windows partition for apps that cant be run using wine due to weird issues. I also really appreciate you taking youre time to all help me

warm cove
#

Have you tried using the bcdboot command? (I'm asking as this thread is quite long) [also this is not a suggestion to use it just yet, just a question]

warm cove
#

tell me the size and the disk number as specified in the list disk command

queen night
#

Please run "dir d:" and "dir c:" outside diskpart. I have a bad feeling that you have also destroyed the windows partition containing the windows installation.

warm cove
#

do we have a screenshot of list part anywhere?

#

a quick search says no

#

I'd like to see list part on the disk # where windows has been / should be

keen citrus
# warm cove I'd like to see `list part` on the disk # where windows has been / should be

Im not sure, both os prober, and testdisk cant detect it. maybe its just fully corrupt and Ill have to reinstall windows. Do you think theres a way I can find my windows activation key though? Im assuming its already in the firmware because the prebuilt came with windows but just in case want to know any other possible options. Im just going to drop it and reinstall windows, Ive recovered most of what I might need to my other drive

warm cove
#

did you log in with a Microsoft account? if so, log in with the same account because sometimes it links the key to it

keen citrus
#

mk then, I think Ill close this post

jovial basin
#

Does the OP have BitLocker though?

keen citrus
#

yeah

jovial basin
keen citrus
#

no