Can't dual boot after motherboard replacement

Hi folks!

I have a Dell Latitude e7440 laptop that I had successfully configured to dual-boot Windows 8.1 and OpenSUSE 13.1 earlier this year. It’s been a great system for dual-boot, just needed a native bootable Windows partition for a couple games I still like to play.

Anyway, recently I started having problems with the dock connecter on the laptop (couldn’t charge the battery while plugged in to the dock or use the connected external monitors) so Dell tech came out and replaced the motherboard. Well, duh, I never thought to look at the BIOS settings prior to the work, and since the board was replaced I can no longer dual boot grub to load OpenSUSE 13.1. I’ve tried several times to re-install the OS and maintain the same partition structure (and also not re-format my /Home folder).- everything appears to install fine - but whenever the system restarts it automatically goes to the Windows bootloader.

When I check the boot settings (F12 on splash screen), the system shows “Boot mode set to UEFI: Secure Boot: Off”

If I look at the BIOS settings, under Boot Sequence, UEFI: Hard Drive is checked.
Under Boot List Option: UEFI is selected.

Any thoughts / suggestions on how to re-enable grub for dual-booting? Thanks.

Bill

Boot with live media. The opensuse live Rescue CD would be good. Or the live Gnome or KDE. Or boot the install DVD to rescue mode.

Mount your EFI partition somewhere (say at “/mnt”).

Check whether the directory: mountpoint/EFI/opensuse exists.

If that exists, post the content (filenames).

Also post the output from


# efibootmgr -v

If all goes well, and that directory exists, we can probably give you a command to recreate the UEFI boot entry to get to grub.

I should have added a brief explanation.

The UEFI boot entries are in NVRAM. When you replaced the motherboard, you probably replaced the NVRAM with no boot entries.

When there are no boot entries, there is a default entry in “\EFI\Boot” in the EFI partition, and that would have booted Windows. And Windows probably put back its normal NVRAM entry after that.

You can put back the entry for opensuse using the “efibootmgr” command. The man pages are fairly good, but googling for examples might help. Or, if you provide the information I requested in my prior reply, we can use that to come up with a command for you. Hmm, we would also need to know which partition is the EFI partition (probably “/dev/sda1” or “/dev/sda2”).

Thanks for the troubleshooting steps and background!

I booted a systemrescueCD and saw an option to boot from a current Linux partition, so I have OpenSUSE open at the moment from the laptop hard disk.

Looking in the /boot/EFI folder I only see another EFI folder and a setenv.bat batch file. Within /boot/efi/EFI are folders for Boot, Microsoft, and opensuse.

When I try to run “efibootmgr -v” I get an error - Couldn’t open sysfs or procfs directories for accessing EFI variables.

Bill

grubx64.efi
Then check that directory “/boot/efi/EFI/opensuse”. It probably contains “grubx64.efi” and maybe “shim.efi” and perhaps a few other files.

If you are content with not using secure-boot, then the “grubx64.efi” file is the relevant one.

When I try to run “efibootmgr -v” I get an error - Couldn’t open sysfs or procfs directories for accessing EFI variables.

This is because you are booted legacy style (that’s probably how the system rescue CD works). You will need a UEFI boot to get this working. The “efibootmgr -v” is a test of whether you booted the right way.

When you have that working, then you need a command something like:


# efibootmgr -c -d /dev/sda -p 2 -l '\EFI\opensuse\grubx64.efi' -L opensuse

This creates an entry. The path is a Windows style path relative to the EFI partition.

The “-p 2” says to use partition 2. This assumes that your EFI partition is “/dev/sda2”. Change that “-p” parameter, depending on what is your EFI partition.

That should add a boot entry to get back into your system.

If this is SystemRescueCD from the same project, it definitely can boot on EFI systems, so it probably something in motherboard setup.

I took the OP to be referring to the rescue CD from http://www.sysresccd.org/Download rather than the opensuse live rescue CD.

That what I mean too.

OK, I’m still missing a step because even booting from the OpenSuse 13.1 Rescue CD does not give a valid result to “efibootmgr -v” - I still get the error about accessing EFI variables.

Originally I tried this from the SystemRescueCD (http://www.sysresccd.org), but I have finally been able to burn a OpenSUSE 13.1x64 rescue CD and see the same result.

If the OpenSUSE rescue CD is being difficult, can I set up the correct boot sequence withing Windows using BCDEDIT?

Any other suggestions to get this booting correctly? Thanks!

Bill

Are you booting the CD in EFI mode??

Okay.

Here’s an alternative that should work.

Boot whatever you can (System Rescue CD will do).

Mount the EFI partition. In what I describe, I will use Windows style paths relative to the EFI partition. I assume you
know how to handle that.

CD to the directory “\EFI\Boot” in the EFI partition. It should contain the file “bootx64.efi”.
Rename that to something else, say to “MSbootx64.efi”.

Now copy the file “grubx64.efi” from “\EFI\opensuse” to the current directory (to “\EFI\Boot”).
Next, rename that file to “bootx64.efi”.

Then reboot your machine, and hit the BIOS boot menu key (probably F12).
There should be a boot choice that identifies your hard drive (rather than a specific named system). Use that. It should get you into your opensuse system, where you can then fix the booting properly.

If the OpenSUSE rescue CD is being difficult, can I set up the correct boot sequence withing Windows using BCDEDIT?

As best I can tell, that will not work for UEFI booting. (Many have tried and failed).

Well, it sounded like a good suggestion, but now I get an error from grub that it can’t find normal.mod and places me into Grub Rescue mode. :’( What else should I try? Thanks!

Bill

At this stage, I’m out of ideas.

I don’t know enough about your system or how you installed it.

If you originally installed with UEFI booting, then “normal.mod” would be there. But if you installed once with UEFI booting, then reinstalled with MBR booting, “normal.mod” would be in the wrong place and for the wrong architecture.

Try also copying grub.cfg from \EFI\opensuse into \EFI\Boot.

No. grub2 supports installing multiple architectures concurrently. Each version (BIOS or EFI) would point to different location for normal.mod (or for grub modules in general).

I guess I was ambiguous. I meant “reinstall opensuse”, not “reinstall grub”. The full opensuse reinstall would reformat the partition, so old versions of grub would not remain under “/boot”.

I appreciate all the assistance and suggestions everyone has provided during the past week.

The nice thing is that my system config is pretty simple so I’ll copy off my /Home folder to an external drive and perform a rebuild from the ground up.

Any thoughts about how to save NVRAM and the boot settings for the future? Hopefully a single motherboard replacement is all I go through :\ but my system is only 6 months old and the dock connector has already been damaged - this may be a recurring issue. Thanks for any final thoughts!

Bill