1

I have Linux installed on a different partition on my drive than windows. Me, being really stupid, I run sudo rm -rf /*(I wanted to delete the contents of a folder obviously, not all the contents of every folder). Now, after reinstalling Ubuntu, I can't boot into windows. I can browse the files of windows in the files app, but the partition doesn't show up in the uefi at all. Is there a way to fix it without formatting the windows partition and reinstalling windows?

8
  • Did you delete the UEFI and Recovery partitions? If so, it is most likely start again time.
    – anon
    Commented Dec 16, 2021 at 19:09
  • Are you sure it isn't a "Windows Bootloader Manager" in UEFI settings > Boot? (Yes, UEFI, not BIOS; BIOS isn't used since ~2012). If so you need to boot Windows installation media and repair the boot (reinstall bootloader). Commented Dec 16, 2021 at 19:09
  • No, I did not delete any partitions
    – konfrag
    Commented Dec 16, 2021 at 19:10
  • There is no Windows Bootloader Manage in the UEFI, only the option for Ubuntu
    – konfrag
    Commented Dec 16, 2021 at 19:12
  • 1
    It depends on what your computer came with. My UEFI partition is 260 MB and does not have to be first. Two different laptops here.
    – anon
    Commented Dec 16, 2021 at 19:57

1 Answer 1

2

Is there a way to fix it without formatting the windows partition and reinstalling windows?

Yes. You don't want to format the windows partition. You will need to boot from a Windows install disk, but rather than a clean install, you'll want one of the following two options:

  1. Boot repair with bootrec /fixboot and/or bcdboot
  2. A repair install (like an upgrade) that preserves your existing files and registry entries, rewriting the OS files, OS registry entries, and bootloader

Note that the original Windows install disk may not be suitable for performing a repair -- if you've installed any Feature Updates (prior to Windows 10 these were known as Service Packs), then you want to create install media matching your current version.

And an OEM Recovery Disk is definitely not what you want, these may be pre-programmed to wipe the entire disk (not just the Windows partition) and replace the contents with a factory image.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .