How to fix messed up Grub-loader

Ihave Tumbleweed (latest version) and latest Ubuntu Gnome installed on external usb-drive (Samsung T3), and Windows 10 installed in the main drive. When installing Tumbleweed and Ubuntu, the EFI was directed to the usb-drive.
Yesterday my Grup-loader messed up my Windows boot loader (, and for example cmp can not be found in toolbar/started in search). Before that everything was working nicely for several weeks. If the usb-drive was not connected Windows started normally.
I can start Windows with my usb connected (some admin apps missing), but when starting without usb I get the grub terminal. From there I get to Windows with ‘set grub_loader=efi’.
From Windows the bootloader looks like follows:

PS C:\Windows\system32> bcdedit /enum all

Firmware Boot Manager
---------------------
identifier              {fwbootmgr}
displayorder            {862ada46-2023-11e7-b955-806e6
                        {7ec0f95b-2036-11e7-b95a-806e6
                        {bootmgr}
                        {862ada47-2023-11e7-b955-806e6
                        {f6490026-a7af-11e6-80cc-c8d3f
timeout                 5


Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolu
path                    \EFI\Microsoft\Boot\bootmgfw.e
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {d20f6973-05ae-11e7-b911-30e37
displayorder            {current}
                        {d20f6978-05ae-11e7-b911-30e37
                        {d20f6979-05ae-11e7-b911-30e37
toolsdisplayorder       {memdiag}
timeout                 30
displaybootmenu         Yes


Firmware Application (101fffff)
-------------------------------
identifier              {7ec0f95b-2036-11e7-b95a-806e6
description             Internal Hard Disk or Solid St


Firmware Application (101fffff)
-------------------------------
identifier              {862ada46-2023-11e7-b955-806e6
device                  partition=\Device\HarddiskVolu
path                    \EFI\ubuntu\shimx64.efi
description             ubuntu
custom:250000c2         0


Firmware Application (101fffff)
-------------------------------
identifier              {862ada47-2023-11e7-b955-806e6
device                  partition=\Device\HarddiskVolu
path                    \EFI\opensuse\grubx64.efi
description             openSUSE
custom:250000c2         0


Firmware Application (101fffff)
-------------------------------
identifier              {f6490026-a7af-11e6-80cc-c8d3f
description             EFI USB Device
custom:250000c2         0


Windows Boot Loader
-------------------
identifier              {d20f6975-05ae-11e7-b911-30e37
device                  ramdisk=\Device\HarddiskVolum
7e8e}
path                    \windows\system32\winload.efi
description             Windows Recovery Environment
locale                  en-GB
inherit                 {bootloadersettings}
displaymessage          Recovery
osdevice                ramdisk=\Device\HarddiskVolum
7e8e}
systemroot              \windows
nx                      OptIn
bootmenupolicy          Standard
winpe                   Yes


Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.efi
description             Microsoft Windows 10
locale                  en-US
osdevice                partition=C:
systemroot              \Windows
resumeobject            {0d843372-348a-11e7-b96f-806e6


Windows Boot Loader
-------------------
identifier              {d20f6978-05ae-11e7-b911-30e37
device                  partition=C:
path                    \Windows\system32\winload.efi
description             Microsoft Windows
locale                  en-US
osdevice                partition=C:
systemroot              \Windows


Windows Boot Loader
-------------------
identifier              {d20f6979-05ae-11e7-b911-30e37
device                  boot
path                    \Windows\system32\winload.efi
description             Microsoft Windows
locale                  en-US
osdevice                boot
systemroot              \Windows


Windows Boot Loader
-------------------
identifier              {fe1e446a-a76b-11e6-b90d-30e37
device                  ramdisk=\Device\HarddiskVolum
7e8e}
path                    \windows\system32\winload.efi
description             Windows Recovery Environment
locale                  en-GB
inherit                 {bootloadersettings}
displaymessage          Recovery
displaymessageoverride  Recovery
osdevice                ramdisk=\Device\HarddiskVolum
7e8e}
systemroot              \windows
nx                      OptIn
bootmenupolicy          Standard
winpe                   Yes


Resume from Hibernate
---------------------
identifier              {0d843372-348a-11e7-b96f-806e6
device                  partition=C:
path                    \Windows\system32\winresume.ef
description             Microsoft Windows 10
locale                  en-US
inherit                 {resumeloadersettings}
filedevice              partition=C:
filepath                \hiberfil.sys
debugoptionenabled      No


Resume from Hibernate
---------------------
identifier              {f6490024-a7af-11e6-80cc-c8d3f
device                  partition=C:
path                    \windows\system32\winresume.ef
description             Windows Resume Application
locale                  en-GB
inherit                 {resumeloadersettings}
recoverysequence        {fe1e446a-a76b-11e6-b90d-30e37
recoveryenabled         Yes
isolatedcontext         Yes
allowedinmemorysettings 0x15000075
filedevice              partition=C:
filepath                \hiberfil.sys
bootmenupolicy          Standard
debugoptionenabled      No


Windows Memory Tester
---------------------
identifier              {memdiag}
device                  partition=\Device\HarddiskVolu
path                    \EFI\Microsoft\Boot\memtest.ef
description             Windows Memory Diagnostic
locale                  en-GB
inherit                 {globalsettings}
badmemoryaccess         Yes


EMS Settings
------------
identifier              {emssettings}
bootems                 No


Debugger Settings
-----------------
identifier              {dbgsettings}
debugtype               Serial
debugport               1
baudrate                115200


RAM Defects
-----------
identifier              {badmemory}


Global Settings
---------------
identifier              {globalsettings}
inherit                 {dbgsettings}
                        {emssettings}
                        {badmemory}


Boot Loader Settings
--------------------
identifier              {bootloadersettings}
inherit                 {globalsettings}
                        {hypervisorsettings}


Hypervisor Settings
-------------------
identifier              {hypervisorsettings}
hypervisordebugtype     Serial
hypervisordebugport     1
hypervisorbaudrate      115200


Resume Loader Settings
----------------------
identifier              {resumeloadersettings}
inherit                 {globalsettings}


Device options
--------------
identifier              {d20f6972-05ae-11e7-b911-30e37
description             Windows Setup
ramdisksdidevice        partition=C:
ramdisksdipath          \$WINDOWS.~BT\Sources\SafeOS\b


Device options
--------------
identifier              {d20f6976-05ae-11e7-b911-30e37
description             Windows Recovery
ramdisksdidevice        partition=\Device\HarddiskVolu
ramdisksdipath          \Recovery\WindowsRE\boot.sdi


Device options
--------------
identifier              {fe1e446b-a76b-11e6-b90d-30e37
description             Windows Recovery
ramdisksdidevice        partition=\Device\HarddiskVolu
ramdisksdipath          \Recovery\WindowsRE\boot.sdi

Can I fix the problem in Windows and how? I wouldn’t like to reset the whole stm.

Probably fix from a live repair disk. Don’t know how to do it from Windows Possible from the EFI boot menu maybe if you can boot to one of the Linuxes from there

Take your installation DVD and boot from there, choose “Rescue system” on first menu. Follow the instructions in 16.6.2.3: https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/cha.trouble.html#sec.trouble.data.recover.rescue.filesystem

…then do according to 16.6.2.4 to re-install Grub. :slight_smile:

I’ve tried several methods. Non of them works. Loosing most of the ordinary commands. Most likely my Windows OS is a lost cake. And Tumbleweed as well. >:(

Raspu,

did not work. Maybe because I have only the net installion iso.:X

With the net install you can do an upgrade. If you can do that then make sure you include existing repos and then reinstall grub and kernel. That always works for me. Although I’ve never run an os from a usb stick.

Thanks Pete

I’ll try.

Simo

On a slight variation on the theme, I have just attempted an upgrade from 13.2 to Tumbleweed using the DVD, but at the end I received an error message indicating that the /usr/sbin/shim-install, config-file = /boot/grub2/grub.cfg had failed (Error 1) because there was no valid EFI partition and the system will not now boot.

I have found my way to the rescue system and have read the instructions regarding the grub loader in the link specified in this thread. However, I’m guessing that I need an EFI partition in which to put the grub.cfg file. Is this possible from the rescue system? Or am I dead in the water? Thanks.

Well was it originally EFI or MBR boot?? If this is a UEFI machine and not a BIOS based one then you may need to turn off secure boot for the install/upgrade. Assuming you need a EFI boot ( ie pervious system was EFI) then be sure to boot the installer in EFI mode if the old was booting MBR then you need to boot the installe in legacy mode. The EFI boot directory is a small generally under 100 meg FAT partition. If it does not exist then you were using MBR boot and you must do the upgrade in legacy mode ie NOT EFI mode. Need a lot more detail since we can’t see over your shoulder. Things like are you dual booting if so with what?

This should be recoverable but you need to share more info.

Really you should start a new thread

Thanks,
and sorry about my late response: beginning of boating season.
I got the problem fixed by reinstalling my Win OS so probably we can close this thread.
Btw, it’s a EFI (UEFI) machine and BIOS was correctly adjusted.

br, Simo