Cannot boot Arch (USB or HDD) in UEFI Mode

I have a new MSi GT70-0ND, 1x 128GB SSD (no RAID) and 1x 750GB HDD. The SSD was preloaded with an MSi OEM copy of Windows 8. I did not receive an OEM disc, so I've tried to avoid touching the SSD and the hidden recovery partition on the HDD.

Redid flashdrive the UEFI-safe way on Arch machine, attempted to boot in UEFI mode, it appears that menu entries from my /boot/efi (UEFISYS) partition are present, but this is irrelevant as only the Windows bootloader and \refindx64.efi work (loads rEFInd graphical mode, in which nothing works except BOOTX64.efi which quickly flashes a message with a file path (too quickly to read) then loads Windows. UEFI Shell v2 now has same error as v1:

Using load options '<null string'> Error: Not Found while loading shellx64_v2.efi

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

Have you tried any other EFI-aware distros? Ubuntu or Fedora come to mind. Or you could try the October Arch iso. If you can boot those, you can chroot into arch and fix things up.

Can you post details of your partitions and your refind configuration? For example, /boot/efi/efi/refind/refind.conf, /boot/efi/efi/arch/refind_linux.conf and say what you did to install it. For example, what does /boot/efi/EFI/boot/bootx64.efi correspond to? What does ls /boot/efi/efi/{arch,refind} give?

Note: I just switched to refind and could not initially get it to work. I found the wiki somewhat confusing. However, I found the included html documentation extremely helpful.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

I doubt if this will help you with your main goal, but I've fixed a few memory bugs in rEFInd recently, so the "String.c(166) String != ((void *)0)" error you mentioned might go away if you upgraded to the latest version of rEFInd (0.6.0).

Beyond that, here's a suggestion:

Prepare a USB flash drive or CD-R with rEFInd 0.6.0. Be sure to include an EFI driver for whatever filesystem you used in Arch's /boot (or root, if there's no separate /boot partition) in the flash drive's or CD's EFI/BOOT/drivers_x64 directory. (Note that rEFInd 0.6.0 includes an ext4fs driver.)

Using an emergency disc, create a refind_linux.conf file in Arch's /boot directory. Include, at a minimum, two lines, each of which should include the options "ro root=/dev/{whatever} initrd={\path\to\initrd}", changing the device filename to point to your root and the initrd= specification to point to your two Arch initrd files (one for each line). The path should be relative to the root of whatever filesystem holds those files, so if you've got a separate /boot partition, there would be no directories, just the filename preceded by a backslash; and if you have no separate /boot partition, you'd lead with "\boot\". Note the need for BACKslashes, not forward slashes, in the initrd= specification (but forward slashes in the root= specification).

Reboot using the rEFInd flash drive or CD-R you've prepared. With any luck, rEFInd should come up and show you an Arch option. Try using it. If it fails, try again, but hit Insert and select the second option from the list.

With any luck this will get your system booted in EFI mode, but I can't make any promises about that.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

srs5694 wrote:

I doubt if this will help you with your main goal, but I've fixed a few memory bugs in rEFInd recently, so the "String.c(166) String != ((void *)0)" error you mentioned might go away if you upgraded to the latest version of rEFInd (0.6.0).

I also got that error with the shell.efi downloaded from EDK2 svn repo. I recompiled shell.efi from updated EDK2 git repo and the problem went away. Some issue in EDK2 sources that has nothing to do with rEFInd. Currently I am at work so do not have the shell.efi file, otherwise I could upload it to my dropbox and give you a link.

If you want to compile shell.efi yourself, you should EDK2 sources, and try the shell scripts from https://github.com/the-ridikulus-rat/My … ocore_uefi (shellpkg_x86_64_udk_linux_compile.sh and tianocore_uefi_common.sh). Make sure to change the paths according to your system, since most of them are specific to my system. Copy both the .sh files to $WD and run shellpkg_x86_64_udk_linux_compile.sh from $WD. The shell.efi binary should be somewhere in ${_BACKUP_BUILDS_DIR}/SHELLPKG_BUILD as you define in shellpkg_x86_64_udk_linux_compile.sh .

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

Thank you for the quick responses, but I'm afraid I have decided to take the easy way out.

In BIOS/Legacy mode I booted a USB flashdrive with latest archiso, destroyed the HDD partition table, converted it to MBR, set up a basic partition scheme, installed Arch, installed GRUB2 as bootloader, rebooted, and voila. The only special step was making sure to add "nomodeset" to the kernel line.

It would be a crime to call this crude workaround a "solution", but having to press a few keys during POST/pre-boot to switch between UEFI and BIOS/Legacy modes to boot either OS is a small price to pay for my sanity and a usable Arch install on this machine.

Now, I'm still sorting out video driver issues (without nomodeset, I get drm/nouveau messages from the kernel and then total lockup) which are doubtless related to the wonderful nVidia Optimus (which Ubuntu claimed it could handle but did not).

Again, thanks everyone for the quick replies and suggestions, I'm sorry none of them worked, and I'm still puzzling over what the real issue is - Optimus, EFI, the kernel, something else...

[rant]Having spent a great deal of time looking for answers around the web, it seems that UEFI is currently an unmitigated disaster for the Linux community (even Arch and Fedora, which, kudos to contributors, are leading the effort) and that was certainly my experience with it as well. Microsoft could not have contrived a better way to discourage adoption of other OSes if it had tried, and the OEMs have once again shown their true colors by kowtowing to the devil in Redmond - they know who pays the bills.[/rant]

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

I certainly don't think UEFI to have any advantage for my desktop or laptops and I always tend to use BIOS legacy whenever its possible. But fedora 18 Final TC3 - http://download-ib01.fedoraproject.org/ … ve/x86_64/ is set to work out of the box even with secureboot, but I have not tried though.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

I can confirm the same problem on my MSI GT70 0ND laptop.It is the version shipped with Windows 8.

I have tried Ubuntu, SysRescueCD, Gentoo live CD, and now onto ArchLinux to see if it works any better, mostly to get the latest kernel.

I have made the USB boot and put rEFInd on it. That loads up fine, but just like every other distro installer I have tried, it fails right as the kernel loads.

Everything works fine in Legacy mode.

I am currently working on the guess that it is something to do with the display, as there is usually some live on keyboard input on, for example, the SysRescueCD boot.

I am certainly getting a lot more knowledge about UEFI, but I have yet to resolve the issue. I am running the latest bios for this machine as of this date, and soon will be trying an unlocked version of the bios to see if I can disable the Nvidia GT675M display, and force the built in Intel to see if that resolves the issue.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

Are you guys disabling Secure Boot? I don't have Windows 8, but my understanding is that if your machine came pre-installed with it then you'll have to disable Secure Boot to get anywhere with any other OS.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

Yes, Secure boot was disabled. I wound up having to get an RMA swap on the laptop for other issues, but it is the same on the new one. I have not had a chance to try with the unlocked (ie.. all options visible) version of the bios yet.I am pretty sure the problem is in the graphics mode selection when in UEFI mode, as 'Vesa' is not available.

I have simply given up on UEFI. It doesn't seem ready for mainstream, and based on poor implementations (ie. Samsung ), who knows what extra grief you might run into.

Re: Cannot boot Arch (USB or HDD) in UEFI Mode

SmegTheLight wrote:

Yes, Secure boot was disabled. I wound up having to get an RMA swap on the laptop for other issues, but it is the same on the new one. I have not had a chance to try with the unlocked (ie.. all options visible) version of the bios yet.I am pretty sure the problem is in the graphics mode selection when in UEFI mode, as 'Vesa' is not available.

I have simply given up on UEFI. It doesn't seem ready for mainstream, and based on poor implementations (ie. Samsung ), who knows what extra grief you might run into.

I really like Asus' UEFI implementation' but it doesn't even have Secure Boot so I don't have to mess with that and I'm on Win 7 otherwise. Hope you get it sorted out.