OSX install breaks connection to grub on EFI partition--TW rescue doesn't rescue??

@malcolmL:

Ah, . . . OK . . . if only I knew what I was doing . . . things would be easier . . . . : - 0

OK, is this what you mean? Otherwise I might need it spelled out . . . ??

# cd
192:~ # mount /dev/sda1 /mnt
192:~ # ls -la
total 44
drwx------  9 root root 4096 Nov 28 18:02 .
drwxr-xr-x 22 root root 4096 Oct  2 16:38 ..
-rw-------  1 root root  765 Nov 28 11:12 .bash_history
drwxr-xr-x  2 root root 4096 Nov 22 02:32 bin
drwx------  3 root root 4096 Nov 24 17:42 .cache
drwxr-xr-x  4 root root 4096 Nov 24 17:49 .config
drwx------  3 root root 4096 Oct  2 16:43 .dbus
drwx------  2 root root 4096 Nov 22 02:32 .gnupg
drwxr-xr-x  4 root root 4096 Oct  2 16:19 inst-sys
drwxr-xr-x  3 root root 4096 Nov 24 17:49 .local
-rw-------  1 root root   94 Nov 28 18:02 .xauthlxCt5q
192:~ # cd
192:~ # umount /dev/sda1
192:~ # umount /mnt
umount: /mnt: not mounted.
192:~ # cd
192:~ # mount /dev/sdb1 /mnt
192:~ # ls -la
total 44
drwx------  9 root root 4096 Nov 28 18:02 .
drwxr-xr-x 22 root root 4096 Oct  2 16:38 ..
-rw-------  1 root root  765 Nov 28 11:12 .bash_history
drwxr-xr-x  2 root root 4096 Nov 22 02:32 bin
drwx------  3 root root 4096 Nov 24 17:42 .cache
drwxr-xr-x  4 root root 4096 Nov 24 17:49 .config
drwx------  3 root root 4096 Oct  2 16:43 .dbus
drwx------  2 root root 4096 Nov 22 02:32 .gnupg
drwxr-xr-x  4 root root 4096 Oct  2 16:19 inst-sys
drwxr-xr-x  3 root root 4096 Nov 24 17:49 .local
-rw-------  1 root root   94 Nov 28 18:02 .xauthlxCt5q
192:~ # cd
192:~ # umount /dev/sdb1
192:~ # umount /mnt
umount: /mnt: not mounted.
192:~ # exit
exit


Hi
Almost… :wink:


For /dev/sda1

ls -la /mnt/EFI/boot
ls -la /mnt/EFI/opensuse

For /dev/sdb1

ls -la /mnt/EFI/boot
ls -la /mnt/EFI/openSUSE

Thanks for the pointers, hopefully this gets it in the ballpark:

# cd
192:~ # mount /dev/sda1 /mnt
192:~ # ls -la /mnt/EFI/boot
total 192
drwxr-xr-x 2 root root    512 Oct  2 09:55 .
drwxr-xr-x 5 root root    512 Oct  2 09:55 ..
-rwxr-xr-x 1 root root 122880 Oct  3 11:46 bootx64.efi
-rwxr-xr-x 1 root root  72240 Oct  2 09:55 fallback.efi
192:~ # ls -la /mnt/EFI/opensuse
total 3400
drwxr-xr-x 2 root root     512 Oct  2 09:55 .
drwxr-xr-x 5 root root     512 Oct  2 09:55 ..
-rwxr-xr-x 1 root root      58 Oct  2 09:55 boot.csv
-rwxr-xr-x 1 root root     155 Oct  2 09:55 grub.cfg
-rwxr-xr-x 1 root root 1019744 Oct  2 09:55 grub.efi
-rwxr-xr-x 1 root root  127488 Nov 23 09:51 grubx64.efi
-rwxr-xr-x 1 root root 1166552 Oct  2 09:55 MokManager.efi
-rwxr-xr-x 1 root root 1164376 Oct  2 09:55 shim.efi
192:~ # cd
192:~ # umount /dev/sda1
192:~ # umount /mnt
umount: /mnt: not mounted.
192:~ # cd
192:~ # mount /dev/sdb1 /mnt
192:~ # ls -la /mnt/EFI/boot
total 120
drwxr-xr-x 2 root root    512 Dec 31  2016 .
drwxr-xr-x 6 root root    512 Dec 31  2016 ..
-rwxr-xr-x 1 root root 121344 Dec 31  2016 bootx64.efi
192:~ # ls -la /mnt/EFI/openSUSE
total 3438
drwxr-xr-x 2 root root     512 Feb 12  2017 .
drwxr-xr-x 6 root root     512 Dec 31  2016 ..
-rwxr-xr-x 1 root root      58 Nov  4 09:58 boot.csv
-rwxr-xr-x 1 root root     155 Nov  4 09:58 grub.cfg
-rwxr-xr-x 1 root root 1058144 Nov  4 09:58 grub.efi
-rwxr-xr-x 1 root root  128512 Nov  4 09:58 grubx64.efi
-rwxr-xr-x 1 root root 1166552 Nov  4 09:58 MokManager.efi
-rwxr-xr-x 1 root root 1164376 Nov  4 09:58 shim.efi
192:~ # umount /dev/sdb1
192:~ # umount /mnt
umount: /mnt: not mounted.
192:~ # exit


Hi
So if you look at the files, sdb1 (grubx64.efi) is the place, so create an entry and all should boot fine…?


efibootmgr -c -d /dev/sdb -L "openSUSE sdb" -l "\\EFI\\openSUSE\\grubx64.efi"

See how that goes… if it wants secure boot maybe? then add;


efibootmgr -c -d /dev/sdb -L "openSUSE-secure sdb" -l "\\EFI\\openSUSE\\shim.efi"

@MalcolmL:

Thanks very kindly for the assistance, I’ll try to run that in a bit . . . what would be “secure” or “unsecure” refer to? This is for a home unit, which is essentially “secure” . . . is that like having OSX’s “safe boot” capacity? which I guess is a way to test the system for problems?

Or, it’s something that I would do both of those commands, one for basic grub, and then “secure” would add the “safe boot” features??

In any event, I’ll post back with the update, i.e., if grub picks up the LEAP & TW installs in one place, etc.

n_s

PS: Is this a case where I have to “mount” sdb1 & cd into EFI . . . or, I can just “su” and then run your suggested commands? Seems like it’s better to ask first rather than running them and thinking I did something, when I didn’t . . . ??

Hi
In this case no, we are interacting with the hardware (UEFI BIOS) nvram and adding the entry so when it boots it knows where to look.

So, um, this sort of “worked” and sort of didn’t . . . on basic restart w/o alt key it goes to grub window, and the only option is the TW install that is on sda; if I use the alt key the options are shortened to the Gecko MATE LEAP and a no longer installed Linux Mint . . . and two OSX of three or four . . . so the alt key seems to be showing the sdb choices and not the sda options . . . .

I did want the TW choice as the “top” hit, which it is now . . . but, nothing else is there if I just let grub pop up . . . so, as far as setting the “default” it is now TW, but now no other choices to be found there . . . . : - 0

n_s

Hi
OK, so now boot into Tumbleweed and in a terminal switch to root user and run;


efibootmgr -v
os-prober

Running efibootmgr is just to confirm it booted in efi mode. The next to show info on installed systems? If both commands show what is expected, then fire up YaST bootloader and change the menu timeout and save, reboot and all os’s should be in the Tumbleweed grub listing.

OK, so there is true “madness” to your method . . . and we are doing the baby steps to get where we will end up . . . . I’m away from that computer now, prolly be tomorrow am before I can mess with it again . . . .

@Malcolm:

Not sure how mission critical it is, but it still seems like the sda8 install doesn’t seem to be showing, and also the two OSX partitions in sda aren’t showing, but the sdb LEAP’s and an OSX are showing . . . . I haven’t done the YAST thing yet, but sda is now the “primary” HD that I’m using, even if the EFI data is on sdb (which was the original HD) the sda choices are the main squeeze . . . . Posting the data here while it’s “fresh” on the console . . . . TW is sda7 . . . but doesn’t seem to show in “efibootmgr -v” listings, but is the singular listing in the grub window on cold boot w/o alt key. I’ll try the YAST thing in a bit . . . .

# efibootmgr -v
BootCurrent: 0002
BootOrder: 0002,0000,0001,0080
Boot0000* openSUSE sdb    HD(1,GPT,36faabea-42fb-40d1-b88b-fb254febf542,0x28,0x64000)/File(\EFI\openSUSE\grubx64.efi)
Boot0001* opensuse    HD(1,GPT,7f39c61b-b9d1-4378-8478-a5e99ae6079d,0x28,0x64000)/File(\EFI\opensuse\grubx64.efi)
Boot0002* openSUSE-secure sdb    HD(1,GPT,36faabea-42fb-40d1-b88b-fb254febf542,0x28,0x64000)/File(\EFI\openSUSE\shim.efi)
Boot0080* Mac OS X    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
Boot0081* Mac OS X    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
Boot0082*     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
BootFFFF*     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(3,0,0)/HD(1,GPT,36faabea-42fb-40d1-b88b-fb254febf542,0x28,0x64000)/File(\EFI\BOOT\BOOTX64.efi)
localhost:/home/Ze # os-prober
/dev/sda7:openSUSE Tumbleweed:openSUSE:linux
/dev/sdb2:Mac OS X:MacOSX:macosx
/dev/sdb7:openSUSE Leap 42.2:openSUSE1:linux
/dev/sdb8:openSUSE Leap 42.2:openSUSE2:linux

So, running YAST bootloader config seemed to be going well, then, as it did a few days back, it error-ed out, couldn’t copy/paste it–

"execution of command "/usr/sbin/shim-install" . . . --config file failed"  exit code 1??  Error: No valid EFI partition.

YAST lists the TW partition as “default” which is what I want, and it does show up . . . on cold boot. I’ll try restart and post back in a bit.

Hi
So it boot’s in secure mode (booting 0002)… if you go to YaST bootloader again and disable secure boot and also ensure the check box for probe foreign os is checked.

Also one this is finished, post the output from evibootmg -a again.

@malcolmlewis:

OK, thanks for the thoughts . . . I do recall that the “probe for foreign os” box wasn’t checked, and I wasn’t sure if that was referring to OSX or if it meant other OpenSUSE options . . . so that might make a difference.

But, do you mean “efibootmgr -v” as we have been doing OR do you actually mean “evibootmg -a”??? OR “efibootmgr -a”???

Hi
Yes, need that checked for sure to pickup the output from os-prober command which runs in the background :wink:

Yup, a typo… efibootmgr -v

So, tried to make those changes in Yast . . . seems to have brought an error . . . cig progress bar freezes at 50%. I’ll try to restart or shut down in a bit and see if it recovers the “foreign OS’s” . . . . Tried to post a screenshot, but that seemed to bring a “too many characters” error from the forum??


So, I shut it down and on reboot, indeed there were more choices in grub, booting w/o alt key. Trying to get to sda7 and a TW edition is listed as “sda7,” but selecting that goes to “Failed to mount /sysroot” . . . goes to CLI . . . had to hit the power button to get out of it. Looking at the “efibootmgr -v” listings seems to show mainly the “sdb” choices??? . . . but, is still auto-booting to TW which is in sda . . . ???

# efibootmgr -v
BootCurrent: 0002
BootOrder: 0002,0000,0001,0080
Boot0000* openSUSE sdb    HD(1,GPT,36faabea-42fb-40d1-b88b-fb254febf542,0x28,0x64000)/File(\EFI\openSUSE\grubx64.efi)
Boot0001* opensuse    HD(1,GPT,7f39c61b-b9d1-4378-8478-a5e99ae6079d,0x28,0x64000)/File(\EFI\opensuse\grubx64.efi)
Boot0002* openSUSE-secure sdb    HD(1,GPT,36faabea-42fb-40d1-b88b-fb254febf542,0x28,0x64000)/File(\EFI\openSUSE\shim.efi)
Boot0080* Mac OS X    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
Boot0081* Mac OS X    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
Boot0082*     PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(4,GPT,7420b4c3-007e-4b98-b566-eaa4ebf5e403,0x1d5a9f00,0x1d40da70)
BootFFFF*     MemoryMapped(11,0xffd50000,0xfffdffff)/FvFile(2b0585eb-d8b8-49a9-8b8c-e21b01aef2b7)C.D...


Tried Yast bootloader again . . . error says

/usr/sbin/grub2-install: error: cannot find EFI directory

So, question is, does this “mean” anything? Is the fact that TW is in sda, but we have grub set up in sdb?? have any issues with why Yast “can’t find EFI directory”???

Hi
Can we try non-secure boot, so if you let the system boot, see how it defaults (from the output of efibootmgr) to 0002, change the order to;


efibootmgr -o 0,1,2

Reboot, does it start up ok and current == 0 for efibootmgr output?

Then run the os-prober command again, does it se more/less etc?

Also what release of Tumbleweed are you at…?