1

GRUB stopped detecting Windows and I followed a tutorial that is now lost to time and it didn't work. Since I need Windows for gaming still I just repartitioned everything and installed Windows onto the new partition and now GRUB2 isn't working at all and it just boots straight into Windows.

Tried GRUB customizer (from live booted linux) just to see if that would do something and it gave me an error: /usr/sbin/grub-probe: error: failed to get canonical path

Notes:
I have acsses to linux live booting
Using mx linux 21 KDE and windows 10, though one install of Windows isn't working anymore

Partitions:
sda1: root linux
sda2: original windows partition
sda3: system reserved (idk what that means)
sda4: working windows partition

squillman
  • 8,551
Budy
  • 79
  • 1
  • 1
  • 3

2 Answers2

0

This may seem roundabout, but worked when Windows update messed up a dual-boot PC, and grub repair failed:

  1. Make a full disk image that can be mounted afterwards, using dd from a Live Linux USB, from Windows with imaging software such as Macrium Reflect, or from a rescue USB with WinRE and imaging software.
  2. Reinstall Linux, dual boot if you want, using the existing partition. Of course, that overwrites the existing Linux.
  3. Mount the image with a tool from step 1. and recover only that partition.

Yes, there are more efficient ways to repair grub, but this worked when nothing else I tried would.

N.B. Grub customizer is actually likely to cause problems, since it has not been kept up-to-date for new Linux releases.

0

The system reserved partition is the windows boot partition, it contains the boot loader files. The usual default windows setup creates one right before the main windows partition (your C: drive). So your sda3 belongs to the windows on sda4. The windows on sda2 is missing that partition for some reason. Most probably that is the reason why grub couldn't boot that first Windows anymore, because you need the Windows boot files (BCD) even though you boot windows via GRUB. Windows can boot without a separate boot partition if the main windows partition contains the boot loader. This can be seen in windows disk management. The partition that is marked System is the one with the boot loader. It is possible to configure the windows boot loader with Visual BCD to boot both windows installations. It is also possible to install the windows boot loader onto the first Windows partition (sd2) with EasyBCD. Your grub2 can be restored from any live linux system. The best way would be to mount /dev/sda1 somewhere in the live system and to a change root to the installed system and install GRUB to /dev/sda (no number) with the help of the tools of your installed distribution. But you can also boot the exact install live system of your distribution and version and follow their way of restoring grub, for example. Having a backup before messing with such tools is good advice, but imaging whole partitions somewhere else to rescue your situation is not really necessary.

xenoson
  • 508