Dear all,
I am opening this forum thread, to address a grub boot issue I got, when updating from Leap 42.2 to 42.3 via zypper dup. The update was done by the standard method of renaming the repositories
# | Alias | Name | Enabled | GPG Check | Refresh
--+---------------------------+---------------------------+---------+-----------+--------
1 | adobe | adobe | Yes | ( p) Yes | Yes
2 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes
3 | packman | packman | Yes | (r ) Yes | Yes
4 | repo-update | openSUSE-Leap-42.3-Update | Yes | (r ) Yes | Yes
I had a dual boot system between Leap 42.2 and windows 7. I decided to update and unfortunately, after completing the update I got grub_tpm_measure and a grub rescue> prompt. I tried to use live Leap 42.3 usb to mount the partitions and check what is going on. At the beginning I run the command
vgimport -a
OUTPUT
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning
Subsequently I mounted my root partition and run chroot
mount /dev/sd5 /mnt
sudo mount -t proc none /mnt/proc
sudo mount --rbind /dev /mnt/dev
sudo mount --rbind /sys /mnt/sys
I checked and all of the following files exist.
/etc/default/grub
/boot/grub2/device.map
/boot/grub2/grub.cfg
/etc/sysconfig/bootloader
ls -ltr tells me that these files have been updated, except /etc/sysconfig/bootloader, which is 3 years old.
The user arvidjaar](https://forums.opensuse.org/member.php/69818-arvidjaar) suggested to run bootinfoscript. The RESULTS.txt file can be found here https://susepaste.org/5576780
efibootmgr -v gives the error EFI variables are not supported on this system. I guess i have legacy bios.
I also run
cat /etc/default/grub_installdevice
/dev/disk/by-id/wwn-0x5000c50052c57048-part3
activate
Based on this results, the following conclusion was drawn.
So your openSUSE is configured to put grub in partition 3 and that is where updated grub was written. At the same time you have grub in MBR of your drive and that is what is actually used during boot by BIOS. This grub instance was not updated, so now code in MBR does not match the rest if grub binaries under /boot/grub2.
You also have rather strange active partition 5 which is logical partition (so normally cannot be used as boot partition by BIOS) and does not contain any boot code so would not work even with Syslinux MBR that does support it.
At this point you need to decide whether you want to leave grub in MBR or you want leave it as configured in partition 3 and install generic code in MBR. If you ever need or want to boot Windows directly (not via grub) you need generic code that allows booting Windows by changing active partition.
I would be grateful for any suggestions how to fix this issue. What I would like to have is to be able, to choose between windows 7 and leap 42.3 from the grub menu as before. If it is possible to leave grub in the MBR, this is fine with me. In general, I would say that I am fine with any solution which would not wipe my data. If I would have to move grub from the MBR this is is also fine, as long as I won’t have to reinstall windows and linux. Basically, I am open to your suggestions and hope that the issue with GRUB is fixable. i am getting scared tight now.
Some reasoning for the strange configuration can be found in the forum link below. I was having problems with my dual boot and most probably, something went wrong there.
https://forums.opensuse.org/showthread.php/508264-Dual-boot-windows-8-and-opensuse-the-boot-loader-was-wrongly-set-to-grub2/page4?highlight=john_snow](https://forums.opensuse.org/showthread.php/508264-Dual-boot-windows-8-and-opensuse-the-boot-loader-was-wrongly-set-to-grub2/page4?highlight=john_snow)
Thank you for your help.