Update 2: Finally did it by following the first option I explained in my own comment (i.e. backup and reinstall)

Update 1: I also updated the UEFI just to be sure and the issue persists as expected


Sorry if the post is long, trying to give each relevant detail.

My system has two drives, the first for Linux and the second for Windows.
Initially I had OpenSUSE MicroOS on the first and I could boot into Windows through the UEFI, but then I installed Fedora on it and lost the ability to get into Windows since. I thought that it had a boot partition on its own drive, but I guess I was wrong since now that I checked the partitions, there is no FAT32 partition on there.

image of partitioning scheme for Windows drive

(in text form)

nvme0n1                                       931,5G disk              
├─nvme0n1p1                                      16M part              
├─nvme0n1p2                                   930,8G part  BitLocker   
│ └─bitlk-66306                               930,8G crypt ntfs
└─nvme0n1p3                                     692M part  ntfs

Unlike on my Linux drive image of partitioning scheme for Linux drive

(in text form)

nvme1n1                                       931,5G disk              
├─nvme1n1p1                                     600M part  vfat        /boot/efi
├─nvme1n1p2                                       1G part  ext4        /boot
└─nvme1n1p3                                   929,9G part  crypto_LUKS 
  └─luks-353e522f-c0f3-4167-99fc-90d576a734e8 929,9G crypt btrfs       /var/home

So I probably destroyed the content of the boot files in its installation process.

I’m able to access my BitLocker encrypted drive through Fedora, so if I have to reinstall I can still make a backup (it wasn’t very important to me either way).
I also fired up a Windows recovery drive to see if it detected the system and it does, I haven’t yet looked at what the recovery drive can do, so if that’s the key to solving this let me know.

The actual question

So at this point I wonder: is there a way to restore the Windows boot option? Would I have to do it in some GRUB config or do I have to/can I create a boot partition on the Windows drive too and somehow write the bootloader there?

  • @QuazarOmegaOP
    link
    English
    1
    edit-2
    1 year ago

    I’ll make a summary of what I learned up to now, maybe it can be helpful to whoever will face this in the future.

    I initially had 1 drive with Linux installed, let’s call it A, then I got a second drive, called B, so I could install Windows on a separate one, but I decided to replace the OS on A with Windows since it had lower speeds while I would use Linux more so I’d rather put it on the faster drive.
    To make use of that potential speed I had to put B in the first NVME slot and A in the second (it was actually useless because my CPU doesn’t support PCIE 4.0, but that’s beside the point) so I got to the first installation and put Windows on drive A, but I didn’t know that Windows would put its boot partition in the drive at the top of the list which would be B of course, since it was in the first slot, so unknowingly until today, I end up with drive A that has only the OS partitions and drive B with the boot partition and the Windows bootloader therein.
    After that I install openSUSE MicroOS on drive B and it actually treats the boot partition correctly, the Windows entry there remains and stays accessible through the UEFI menu (GRUB wouldn’t pick it up for some reason I don’t remember), then unsatisfied with the then subpar experience of MicroOS KDE (alpha) I decide to move to Fedora Kinoite, so I install it and there something breaks, apparently that installation completely overwrote the boot partition so my Windows entry gets deleted, it’s the only plausible explanation and I did see some reports on other forums of Silverblue having to be installed first if you intend to dual boot, so that checks out.

    From there we get to the problem: how to restore the Windows bootloader without messing up the current boot partition content?
    O thought of two approaches:

    1. The easy way: Backup the important files stored in the Windows drive (A), take out drive B reinstall Windows from zero on the only remaining drive in the system, then put your old files back also drive B can be plugged back in.
    2. The hellish way: juggle boot files around. We want a new boot partition on A, but since the data partition on A is encryped with BitLocker it can’t be safely resized directly to make space for a new partition, it has to be converted back to plain unencrypted first, then resized and finally encrypted again. So first save the current content of the boot partition on B onto another external drive, DO IT DON’T BE LAZY, if you don’t you might not be able to go into Fedora again, then use a Windows recovery media to run the usual bootrec commands that will recreate the Windows bootloader (note: it can only recreate the bootloader on its own, NOT the partition, if no FAT32 partition is available it will always fail, that’s why we must have our drive B that holds the boot partition still plugged in).
      Now we can boot back into Windows, maybe the Fedora bootloader will be screwed up, maybe not (I won’t test this method as it’s too complicated), but it doesn’t matter because we saved a copy before, so from within Windows we disable BitLocker, resize the partition to have about 600MB of empty space, format that as FAT32 and enable BitLocker again. Unplug drive B, boot into the Windows recovery media and restore the Windows bootloader on the newly created FAT32 partition on A, boot into Windows again with only drive A plugged in to check that it’s working.
      Plug drive B back in and overwrite the content of the boot partition on it with your old save so that you get rid of the now superfluous Windows bootloader on it and restore the (perhaps) broken Fedora bootloader and you’re finished.

    TL;DR I hate Windows

    …but I also learned a lot from my mistakes, dare I say, it’s always the breakages that really advance understanding