-1

My setup used to be a dual boot system with Pop OS and Windows 10, which are both on separate SSD drives. It worked fine and now I recently just changed from Pop OS to fedora. In the install procedure of fedora I wiped my Pop OS drive and installed fedora on that.

Now however, I can't boot into windows, at all. Even from the BIOS. Just as a sanity check I've unplugged and re-plugged my SATA cables in my PC case with every possible configuration there is. Even when only my Windows 10 drive is plugged in on it's own the computer just throws me into the BIOS.

I've also tried resetting my settings in my BIOS to no avail. As well as changing the SATA config from RAID to AHCI and back again with no difference.

I've tried using a windows 10 USB drive to see if there's anything I can do in the repair your computer bit. But I can't even get there. I at least see it as a boot option in the BIOS. A UEFI version and a non-UEFI option.

I've tried os-prober with no luck even though I can see the damn windows drive in the 'disks' program and when doing lsblk. disks can see the drive

Trying to mount that drive I get an error with the partition I would expect there to boot info and get the following error

❯ sudo mount /dev/sde1 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

I'm not sure if that's the expected behaviour but just letting it be known in case it means something.

Mounting sde2 seems fine but looking around I don't see the kind of files that guides suggest there would be, such as apparently \EFI\Microsoft\Boot\bootmgfw.efi which doesn't exist on sde2.


I think clearly something happened in the install of fedora. Specifically when I wiped my Pop OS drive. It must have had some config on there that managed the dual booting. If I recall, Pop OS uses systemd-boot and fedora is using grub, so maybe some kind of issue there?

I'm not sure how to proceed so any advice or further information needed let me know.

For now I'm going to re-create my windows USB drive just incase if it's not in the same state I remember it but I doubt it will be any different as that USB drive hasn't changed in over 5 years.

Thanks.

EDIT: After re-burning the windows USB image and apparently maybe some dead USB ports on my PC case I was able to get into the recover tool.

I was then able to go into the command prompt and type in:

bootrec /fixmbr

Which was fine. Then:

bootrec /fixboot

Which was not fine. As I had the output Element not found.

I then went into diskpart and ran LIST DISK and the only response I got was the USB disk I was currently in.

6
  • 2
    I wiped my Pop OS drive which likely was the same containing the ESP (EFI System Partition) thus removing the Windows bootloader. You need to boot Windows installation media and repair boot. Everything else you MUST leave exactly as it was, i.e., don't do any of the changes you tried in UEFI already or anything you're thinking of. NOT a Linux question. Commented Jul 2 at 23:20
  • PS - bootrec /fixmbr isn't applicable to any UEFI mode system. Commented Jul 2 at 23:21
  • 2
    You show you tried to mount sde1. But it is shown above as the Microsoft Reserved partition. That is unformatted space that Microsoft requires before the first NTFS partition on any gpt boot drive. You must have use Windows to gpt partition drive as it makes that the first partition on any data drive, just in case later you install Windows. Is Windows fast start o hibernation on? That prevents Linux from seeing Windows partitions. Was then Windows using ESP - efi system partition on other SSD and you reformatted it?
    – oldfred
    Commented Jul 3 at 2:43
  • @oldfred I've just turned fast boot off on my BIOS settings and also I have no hibernation settings. I've ran os-prober and nothing new happened, I also double checked in grub customiser. Is there anything else you recommend I try?
    – shmink
    Commented Jul 3 at 21:49
  • You need to reinstall the Windows bootloader and only then run os-prober. Wasn't that clear in the first comment? GRUB merely chainloads to a working Windows bootloader, it can't boot Windows directly and it won't install the Windows bootloader or make any other Windows setup for you. That much should be clear already in your other questions going back 2 and even 4 years (!!!) back. Volunteers who helped you then will be rightfully very frustrated if they see this one. Again, NOT a Linux question. What you have to do is for Windows using Windows installation media. Commented Jul 3 at 22:11

1 Answer 1

2

You have Windows installed on a GPT-partitioned disk, which implies Windows must have been installed to boot in UEFI mode. For that, you would have to have an ESP partition somewhere... not necessarily on the same disk that contains Windows. If the Windows installer in UEFI mode sees an existing ESP on any GPT-partitioned disk it can access, it will use that instead of creating its own ESP.

Since you didn't show the partitioning of your PopOS/Fedora disk, I must assume that this was the disk that originally contained the ESP partition, and when you replaced PopOS with Fedora, you (perhaps by mistake) chose to boot the installation media in BIOS mode. So it repartitioned the now-Fedora disk without ESP, leaving Windows with no place to put its UEFI bootloader into.

(Unlike Linux, Windows ties together the choices of boot method and system disk partitioning style: GPT-partitioned disks must always boot Windows in UEFI method, and MBR-partitioned disks must use BIOS method. The other combinations are not supported, and as far as I know, cannot be made to work with Windows.)

The Fedora installer may even have switched the partitioning style of that disk from GPT to MBR, which would make the Windows install/repair consider it "unsuitable for ESP" even if the disk had enough free space for creating an ESP. This is probably why the Windows repair cannot succeed: it cannot find an existing ESP and there is no GPT-partitioned disk with enough unallocated space to create one.

To successfully dual-boot/multiboot, all the operating systems should use the same boot method (UEFI or BIOS): once the firmware has started the boot process one way or the other, switching to the other boot method mid-boot is usually impossible (with very few exceptions).

Usually the OS installation or repair media won't offer an explicit selection of boot method for the OS they're installing/repairing, but instead just do the installation/repair appropriate for the boot method that was used to boot the install/repair media itself. So whenever you are booting OS install/repair media on a system that supports two boot methods, you must boot the install/repair media using the same boot method you wish the resulting OS installation to use.

Repair steps

First, you'll need to create an EFI System Partition that will satisfy the requirements of all operating systems you are running. That means:

  • located on a GPT-partitioned disk (Windows requirement)
  • formatted with FAT32 filesystem (Windows requirement)
  • minimum size 200 MB, but for dual-boot, ideally 0.5 GB - 1 GB (minimum size comes from FAT32 minimum size on disks with 4Kbyte blocks; larger size required if using a Linux bootloader that will place kernel+initrd in ESP)
  • partition type GUID set to the standard ESP value of C12A7328-F81F-11D2-BA4B-00A0C93EC93B (UEFI firmware requirement; any GPT partitioning program will have some user-friendly way to set this)

Once the ESP partition has been created, you should configure your Fedora to mount it to /boot/efi/, and then you should ensure that Fedora has the UEFI native version of GRUB (or other bootloader of your choice) installed. If you want Secure Boot support, install the Secure Boot shim package (pre-signed version, if there are multiple versions available) too.

If the system is currently booted using a legacy BIOS-based bootloader (e.g. the i386-pc version of GRUB), then you'll have to run grub2-install --target=x86_64-efi --force-extra-removable. In this situation, you will see an error message about UEFI variables not being available. You can ignore it at this point.

Then reboot the system in UEFI mode. It should now recognize the disk with the ESP as bootable in UEFI mode. Use it to boot Fedora.

Verify the system is now in UEFI mode, i.e. /sys/firmware/efi/ directory exists. Install the efibootmgr package if it isn't already installed, and use sudo efibootmgr -v to verify the UEFI boot variables can now be viewed.

If your BIOS settings allow the choice between legacy BIOS boot mode and native UEFI boot, it might be a good idea to set the system to boot in "UEFI only" to prevent the risk of boot method mistakes in the future. Note that even when the BIOS settings are set to "UEFI only", some firmwares still offer the legacy BIOS mode options when booting from removable media, so watch out for that.

Then retry the repair of Windows. Make sure you boot the install/repair media in UEFI mode. Now that a suitable ESP partition exists, it should be able to fix your Windows boot pretty much automatically.

After that, Windows will have set itself as the first OS in the BIOS boot order, and bumped Fedora to the second slot. You should now see the OSs by name in the BIOS boot order settings: typically Fedora for Fedora, and Windows Boot Manager for Windows. This is something legacy BIOS boot mode cannot do.

Switch Fedora back to the first slot, boot into Fedora, and rebuild the bootloader configuration (e.g. grub2-mkconfig). If os-prober is installed, it might now automatically detect the presence of Windows, and automatically create a boot entry for it. If not, google for advice on creating a UEFI-specific boot entry for Windows using the bootloader of your choice.

Now you should be able to use GRUB (or other Linux bootloader) to select which OS to start at boot time, without visiting the BIOS menus every time.

You must log in to answer this question.

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