Replaced with same mobo, HD not recognized

NotThatTom

Honorable
Jun 1, 2013
4
0
10,510
I pride myself on researching solutions on my own, but after a week of this I give up. :??:

Background: My ASUS M5A97 mobo went bad and was replaced with the same model under warranty. I plugged in all my components (exact same hardware), and after the ASUS splash screen I got the error "Reboot and select proper boot device." I only have one HD and a DVD drive, I made the HD first in the boot order, and even manually selected to boot it from the BIOS utility, and the same error comes up. I was successfully running Fedora 18 with UEFI and GPT disk before the mobo failure.

I'm thinking either the HD went bad with the mobo (but the disk and its partitions can be found in the Fedora rescue disk and also the Fedora installer) or there's some kind of mismatch between the HD and the new mobo. Is there some kind of hardware linkage made at the time of installation between the HD and the mobo that is now broken? Or perhaps the BIOS version changed? (Currently on ver. 1102; don't know what it was previously.)

One more interesting tidibit. My Fedora installation USB stick shows up in the BIOS list of bootable devices twice: as a UEFI device and non-UEFI, presumably so you can pick between a UEFI installation and legacy installation. I would have thought my HD would also be flagged as UEFI since that's the OS on it, but it looks generic.

Any ideas or suggestions are much appreciated.
 
Solution
See if it helps:

Make the firmware launch GRUB2 (U)EFI as default

Non-Mac x86_64 UEFI systems

For non-Mac UEFI systems, efibootmgr is used to modify the UEFI Firmware Boot Manager. This requires the kernel to be booted in UEFI mode and that the kernel processor architecture should match the firmware architecture (and 'noefi' is NOT used) for 'efivars' kernel module to be loaded and efibootmgr to access the boot manager variables. Initially the user is required to manually launch /boot/efi/efi/grub/grub.efi from the firmware itself if grub2-efi was installed in BIOS mode. Then efibootmgr should be run to create the boot entry.


sudo modprobe efivars

cd <grub2_compiled_source_dir>/grub-core
../grub-probe --target=device...
Make sure the asus bios is at the newest rev. In the bios under Sata chipset make sure there set to achi. If they were set to IDE on your old board and you installed the os. It can cause a non boot if you switch to achi mode.
With asus bios now there two bios a efi and the old stock one. In boot devices make sure the non efi drive is set as first boot device. Under boot manager make sure bios set to boot from efi and non efi devices. Those settings are under quick boot menu. I get the same non boot on my saber tooth mb and intel Ssd if I fool around with efi..non efi boot devices.
 
See if it helps:

Make the firmware launch GRUB2 (U)EFI as default

Non-Mac x86_64 UEFI systems

For non-Mac UEFI systems, efibootmgr is used to modify the UEFI Firmware Boot Manager. This requires the kernel to be booted in UEFI mode and that the kernel processor architecture should match the firmware architecture (and 'noefi' is NOT used) for 'efivars' kernel module to be loaded and efibootmgr to access the boot manager variables. Initially the user is required to manually launch /boot/efi/efi/grub/grub.efi from the firmware itself if grub2-efi was installed in BIOS mode. Then efibootmgr should be run to create the boot entry.


sudo modprobe efivars

cd <grub2_compiled_source_dir>/grub-core
../grub-probe --target=device /boot/efi/efi/grub/grub.efi

# Assuming the output the grub-probe to be /dev/sda1
sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"
In the above command, /boot/efi/efi/grub/grub/efi can be split up as /boot/efi and /efi/grub/grub.efi, which translates to (/dev/sda) -> partition 1 -> \\EFI\\grub\\grub.efi .

Note the capital EFI, FAT32 file system is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small "efi," although using \\efi\\grub\\grub.efi should be just fine (this will change if the filesystem encoding is UTF-8). Also the path names in UEFI firmware are similar to Microsoft Windows path names and also uses backslashes (they are doubled because the shell interprets "\\" to mean a single backslash). The "label" is any name for your identification; the actual label used does not affect booting the system

https://help.ubuntu.com/community/UEFIBooting
 
Solution

NotThatTom

Honorable
Jun 1, 2013
4
0
10,510

My SATA channel was already in AHCI mode, but I set it to IDE in case that was the setting when I installed my OS. That didn't fix it.

My BIOS is supposed to allow both UEFI and legacy boots. It works like the first example here.
https://help.ubuntu.com/community/UEFI#Set_up_the_BIOS_in_EFI_or_Legacy_mode
I would expect my HD to be listed twice like the Hitachi in the example, but only the P1 entry shows.
 

NotThatTom

Honorable
Jun 1, 2013
4
0
10,510


Lots of good info there, but I can't even boot to a prompt to run those commands.
 

NotThatTom

Honorable
Jun 1, 2013
4
0
10,510
It turns out alexoiu was on the right track, but I didn't realize it at the time. It took the good folks at the fedora forum to point out that there is indeed a kind of linkage that I mentioned in my OP. The new motherboard firmware had to be updated with information about my hard drive's ESP. I needed to use another boot manager (rEFInd) to get into my system, and then from there I used the efibootmgr command alexoiu mentioned. Thanks for all the advice.