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
  • 7,756
Budy
  • 9
  • 2

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.

DrMoishe Pippik
  • 29,631
  • 5
  • 41
  • 58
  • Few things to make sure I know what I'm doing.
    1. what does dd mean?

    2. reinstall it on the same partition that Linux is already on?

    3. and then use the USB stick to recover the Linux partition?

    – Budy Jul 19 '23 at 01:23
  • For dd: https://linuxconfig.org/how-dd-command-works-in-linux-with-examples 2. Yes 3. USB boot media + the media used to save image -- likely too large for a flash USB boot device.
  • – DrMoishe Pippik Jul 19 '23 at 03:02