You are not logged in.

#1 2013-08-16 18:14:11

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I'm having a hard time understanding what this means from the beginner's guide, under UEFI motherboards: "Copy the bootx64.efi file from USB drive as bootmgfw.efi efi file to your ESP partition by booting into EFI shell and typing:"  Its the second bullet-point of the second note here.  The reason I believe I need to follow those steps is because I am getting:

Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables. Try 'modprobe efivars' as root.

After entering "   efibootmgr -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sdaX rw initrd=/initramfs-linux.img"   " like the beginner's guide says to run under EFISTUB in UEFI motherboards.  After doing that I've tried to install grub2 but after booting it goes straight to windows (going to use a dual boot).  I have z87 so I think that those instructions above might solve the problem but I don't really know what they mean.

Also, I don't care to use grub2 but when I've tried to install gummiboot (pacman -S gummiboot) I've gotten this error:

File system /boot is not on a GPT partition table.
erorr: command failed to execute correctly

Its possible I'm getting the error because I wasn't able to get the efibootmgr to work.

https://bbs.archlinux.org/viewtopic.php?id=124097
This is a post that I think is related and the solution is to use this guide:  https://gitorious.org/tianocore_uefi_du … I_boot_USB

However, I'm confused if that is what I need to do as it says that its using a bootable usb which I don't really want. 

Anyway, any tips would help.  Here is some possibly relevant information:
I'm using a Gigabyte GA-Z87X-UD4H with a haswell processer.
In the bios I changed it from boot UEFI or Legacy to only UEFI.  This didn't help.  It was my attempt to "boot into UEFI" which I've read may solve the problem.

Anyway, thanks!

Last edited by SNAFUdowser (2013-08-24 17:52:45)

Offline

#2 2013-08-17 01:55:36

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Welcome to Arch's forums.

Those instructions are aimed at a different problem (probably) and you (probably) don't need them. The Beginners' Guide got "improved" a while back and efforts to reform it since have had rather limited effects. Basically, the instructions for EFI there now suck.

Almost certainly you are not booted in EFI mode if you cannot modprobe efivars successfully.

Can you boot the install media with your bios set to only boot UEFI? If so, you *should* be able to modprobe efivars. Do this before you arch-chroot into your system.

That is:
1. boot install media with only-UEFI-boot set [if you can]
2. mount your partitions as you did when installing
3. modprobe efivars
4. check whether /sys/firmware/efi/vars is full of stuff
5. arch-chroot into your system
6. efibootmgr should now work

If not, then can you describe how you prepared the live media you used to install Arch?

As for the gummiboot error, please post the output of gdisk -l /dev/sdX where X is the appropriate drive e.g. /dev/sda or /dev/sdb, and lsblk -f in the chroot.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-08-17 17:24:05

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Thanks so much for the response!  It was extremely useful.  I was able though your steps (after enabling UEFI only) to modprobe efivars and then install grub.  However, this time I installed grub and got a few errors.  I continued the installation just to experiment and now I have it so I can boot into arch linux but I can't boot into Windows (grub has an entry for arch but none for Windows 8).  I'll print my partitions and then after that the error I got when installing grub.

sda1 = windows 8 boot thing
sda2 = windows 8 install
sda3 = /boot
sda4 = /
(not shown but sdb1 is storage for windows and sdb2 is /mnt/home )

Disk /dev/sda: 500118192 sectors, 238.5GiB
Logical sector size: 512 bytes
Disk Identifier (GUID) 203E8AA9-5D48-4E9D-91AC-8853D5EA4BCE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2043-sector boundaries
Total free space is 2669 sectors (1.3 MiB)

Number   Start (sector)     End (sector)    Size           Code               Name
1               2048            718847        350.0 MiB     0700                Microsoft basic data                                               
2               718848        419839999      199.9 GiB      0700               Microsoft basic data                                                     
3            419840000         421937151      1024.0 MiB    EF00              EFI System                                                                 
4            421937152         500117503      37.3 GiB        8300               Linux filesystem                                                         

Now here is the error I got while installing grub2.  (I got this after I entered pacman -S grub after installing efibootmgr)
(Note: The first 4 are the full error, the rest leave out the beginning because its a pain to type, but they follow the same format. Let me know if you need the first part of all the errors)

[ 696.296674] NTFS-fs error(device sda1): ntfs_check_restart_page_header(): $LogFile version 2.0 is not supported. (This driver supports version 1.1 only.)
[ 696.297389] NTFS-fs error (device sda1): ntfs_check_restart_page_header(): $LogFile version 2.0 is not supported. (This driver supports version 1.1 only.)
[ 696.297536] NTFS-fs error (device sda1): ntfs_check_logfile(): Did not find any restart pages in $LogFile and it was not empty.
[ 696.297765] NTFS-fs warning (device sda1): load_system_files(): Failed to load $LogFile. Will not be able to remount read-write. Mount in Windows.
                         error (device sda2): ntfs_check_restart_page_header(): $LogFile version 2.0 is not supported. (This driver supports version 1.1 only.)
                         error (device sda2): ntfs_check_restart_page_header(): $LogFile version 2.0 is not supported. (This driver supports version 1.1 only.)
                         error (device sda2): ntfs_check_logfile(): Did not find any restart pages in $LogFile and it was not empty. 
                         warning (device sda2): load_system_files(): Failed to load $LogFile. Will not be able to remount read-write. Mount in Windows.
                         warning (device sda2): load_system_files(): Windows is hibernated. Will not be able to remount read-write. Run chkdsk.
                         error (device sdb1): ntfs_check_restart_page_header(): @LogFile version 2.0 is not supported. (This driver supports version 1.1 only.)

Also, in my bios in the boot sequence has been changed and now I only have 3 choices, UEFI:DVDRAM, arch grub, and Arch Linux.  I've been trying to fix the efibootmgr problem for a while so I may have messed something up in my experimentation.  Yesterday I did something that made none of the drives get displayed by the bios except the disk drive.  Before when I tried to install grub it would just boot into windows, but then it stopped booting into anything asking me for a bootable disk.  Anyway, hopefully something in here helps.

On how I prepared the live media.  I downloaded the live cd from https://www.archlinux.org/download/ and then I burned it to a CD with windows iso burner.

Thanks again!

Last edited by SNAFUdowser (2013-08-18 03:05:27)

Offline

#4 2013-08-17 21:16:51

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I can't help you with your GRUB problems (I've pretty much given up on GRUB). If you want to continue with it, that's fine; but if not, you might want to consider switching to rEFInd or to gummiboot. Both are in the Arch archives and there's documentation in the wiki (although I don't have the URLs bookmarked). The rEFInd Web page has download links to various versions, including CD-R and USB flash drive images that you can use to test it. It should work to boot Windows, and perhaps Arch, without changes, although you'll need to create a /boot/refind_linux.conf file to optimize your Linux boots. Note that I maintain rEFInd, so my recommendation isn't unbiased; but IMHO it's much easier to set up and run than GRUB.

Offline

#5 2013-08-17 21:18:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Please use code tags when posting code - it makes it much easier to read. (Quote this message to see how.)

You should look into installing something like wgetpaste rather than typing this stuff out by hand.

You got that just from running

pacman -S grub

? That's all? If so, I don't think those errors are related to your doing that.

Did you also install grub to disk (grub-install) and generate grub.cfg (grub-mkconfig)? If so, did you install os-prober first? It won't find Windows otherwise.

The errors are telling you that Windows was hibernated rather than shutdown and that you are likely to have problems as a result. Had you mounted the Windows partition(s) read-write at this point?

I don't know what to tell you about Windows but I am sure somebody else will be able to e.g. somebody who has used something more recent than Windows 95 with some kind of regularity.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2013-08-18 04:52:42

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

srs5694 wrote:

The rEFInd Web page has download links to various versions, including CD-R and USB flash drive images that you can use to test it.

Just tried that and sadly it did not recognize Windows.  It did find Arch though.  It actually listed Arch and Grub.

cfr wrote:

The errors are telling you that Windows was hibernated rather than shutdown and that you are likely to have problems as a result. Had you mounted the Windows partition(s) read-write at this point?

I now realize that Windows 8 does some kind of hibernation to make boot time faster (even though I thought I disabled it in the UEFI) so that warning makes sense.  I didn't mount the Windows partitions before installing, and I'm trying to now but I honestly don't know 100% how.

But I'm worried because the rEFInd boot manager didn't work, that I messed something up with Windows by doing all this booting madness.  Should I reinstall windows 8 and try the process over, knowing exactly what to do?  Or do you think I'd just run into the same error again? 

cfr wrote:

You got that just from running pacman -S grub ?

You're right.  I believe I got that from running

grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck

Sorry not sure how I made that mistake when typing my post. 

Also, thanks for the tips on [c0de][/c0de].

Last edited by SNAFUdowser (2013-08-18 04:53:38)

Offline

#7 2013-08-18 05:58:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

You should still be able to boot windows by simply launching the specific efi application.  If you can get to a UEFI Shell, then you can it from there quite easily.  Though this is not an ideal solution, it will work as a temporary measure to enable you to at least boot the windows installation.

Otherwise, you can simply create a direct efibootmgr entry for windows for now, while you get rEFInd to recognize it.  Simply do something like:

# efibootmgr -c -d /dev/sdX -p Y -L "Windows 8" -l '\path\to\windows.efi' 

Where X is the disk and Y is the partition number of the ESP (if the ESP is /dev/sda1, this is the default and that part is not necessary).

Offline

#8 2013-08-18 14:10:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I don't know enough about Windows to know this but was Windows 8 installed in EFI mode? I ask because your EFI partition is 1G and I thought Windows typically installed a smaller EFI partition than that (but maybe you can customise this).


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-08-18 14:15:38

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Rather than completely re-install Windows, try booting the Windows installer or a Windows recovery disc and using it to fix the Windows boot loader. This will probably also register it as the default boot loader, so you'll then need to fix this. You can do so by using the Windows "bcdedit" command to restore your Linux boot loader as the default, by using the firmware's built-in boot manager to boot Linux (your Arch installation or an emergency disc) and use "efibootmgr," or by booting to an EFI shell and using "bcfg" to fix the order.

Offline

#10 2013-08-19 15:44:17

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

So I figured out how to boot into windows by switching back from boot UEFI to Legacy and UEFI but then when I got back to Windows I had a weird error:

0xc000000e

So instead of figuring out how to fix that I just decided to reinstall windows.  But I realized that my old windows was MBR not GPT which was why I couldn't install Gummiboot.  So I proceeded to install Windows as GPT.
I installed Arch too but when I tried to add the boot manager I was once again confronted by the

Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables. Try 'modprobe efivars' as root.

I thought I had solved this last time by using Boot Mode Selection: "UEFI Only" option in my UEFI but now I have that selected but still no luck.  I looked inside

/sys/firmware/efi

and found efivars directory but there was nothing inside it.  However after entering the commands mentioned under Switch to efivarfs I had a bunch of files under /sys/firmware/efi/efivars.  However after running the commands under Switch to sysfs-efivars I didn't even have the directory /sys/firmware/efi/vars/. 

Another thing that concerns me is the fact that I must not have uninstalled Grub properly because I still have Grub as a boot option as well as "Arch Linux".  This I added when I finally got efivars working last time.  Can you clear that stuff with the efibootmgr? Could that be causing the problem?  If its not causing problems then I don't care if I have extra entries that much as long as I get Arch up and running. 

Maybe it has to do with Requirements for UEFI Variables support to work properly?  Thanks again for the help.

Note:  I am able now to use the bootable rEFI Boot Manager to boot into both Windows and Arch Linux but when I try to boot into Arch Linux it gives me the error:

ERROR: device '' not found. Skipping fsck.  ERROR: Unable to find root device ''.

Kind of makes me think I haven't installed Arch, but I have (I think lol). I guess its because something is messed up in the identification of partitions.  I'm not sure. But windows boots up just fine.

Last edited by SNAFUdowser (2013-08-19 16:44:45)

Offline

#11 2013-08-19 17:25:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Uninstallation of grub will not remove the firmware entry.

From reading your last post here, it seems that you are all confused. For example, if your windows installation is on MBR/ms-dos partitions and not GPT, then you are not booting it with UEFI (as you discovered).  Also, having the ESP on MBR/ms-dos partitioning _will_not_ prevent you from installing gummiboot.  The ESP simplay has to be marked correctly.

The inability to find the root device has nothing to do with the boot manager or bootloader being loaded with UEFI.  It simply means that you have configured something wrong in your bootloader configurations.  I think you need to take one step at a time.  Address the setup of the UEFI boot manager.  Get that working.  Then address the next issue, and so forth.

Offline

#12 2013-08-23 15:11:43

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Solved the problem with not finding the root drive here: https://bbs.archlinux.org/viewtopic.php?id=165696

All that is left is efibootmgr not working in Arch linux.  When I use it in Ubuntu Live CD it works just fine but not in Arch for whatever reason.  I want to install rEFInd because I know it works (because of the live CD).  So I'm wondering if I can follow all the steps on how to install rEFInd and then just do the efibootmgr command inside of Ubuntu Live CD?  Would that work?

Command in the instructions that looks like I need to use efibootmgr:

efibootmgr -c -d /dev/sdX -p Y -l /EFI/refind/refind_<arch>.efi -L "rEFInd"

Last edited by SNAFUdowser (2013-08-23 15:13:21)

Offline

#13 2013-08-23 15:17:55

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

SNAFUdowser wrote:

I want to install rEFInd because I know it works (because of the live CD).  So I'm wondering if I can follow all the steps on how to install rEFInd and then just do the efibootmgr command inside of Ubuntu Live CD?  Would that work?

In theory, yes. If that doesn't work, you can try installing rEFInd via the EFI shell or renaming rEFInd to use a fallback filename.

Offline

#14 2013-08-23 20:57:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Did you modprobe efivars before arch-chrooting? Note that this is not how the Beginners' Guide says to do it but I am pretty sure the Beginners' Guide is wrong on this.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#15 2013-08-24 00:39:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I am pretty sure you are right cfr.  Things have to be done to the host and not the chroot.  The modules in the chroot will not necessarily match the running kernel anyway…

Offline

#16 2013-08-24 01:04:46

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I tried to find confirmation of this because the Guide really should be changed. I wonder if this is behind more of these efibootmgr-not-working threads. (At least one has been solved when the OP modprobed before arch-chrooting.)

I'm also a bit reluctant to edit the Guide given recent history but I have put a note on the talk page. The trouble is, as well, that the structure needs to change for the information to be correct because this instruction should come earlier on and therefore undermines the attempt to keep all of the efi stuff in one place. [The EFI stuff there is still rather a mess and I'm not that impressed by the current state of the Guide generally. I suspect it needs to be rethought rather than just edited. Meanwhile, the official guide doesn't seem to be efi-aware at all?]

EDIT: OK. This seems to have been edited a day after I left the note and is now much clearer, at least. So hopefully this should avoid some of the confusion.

Last edited by cfr (2013-08-24 01:17:59)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2013-08-24 01:10:39

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I think that you could at least just put a Note somewhere close to the modprobe efivars advice that tells the user that this should be done outside of the {arch-,}chroot...

Okay, I just looked, and there are definitely notes above and below each section where efivars is relevant and tells the user to do X outside of the chroot and Y inside the chroot.  It also guides the user through ensuring that only one efi /sys thing is in use at a time.

Offline

#18 2013-08-24 01:15:19

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

I just made few changes https://wiki.archlinux.org/index.php?ti … did=272275 . Hope this makes things clear.

Offline

#19 2013-08-24 01:20:03

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

Somehow missed the new posts. Thanks to the.ridikulus.rat's edits this is now much clearer, as WonderWoofy noted. (It was not like that yesterday - look at the history!)

I've also moved the ASUS work arounds to the UEFI boot loaders page as discussed in the Talk.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#20 2013-08-24 16:05:54

SNAFUdowser
Member
Registered: 2013-08-13
Posts: 6

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

First, thanks all you guys for the help and for improving the beginners guide!  Today I was able to get rEFInd working with UEFI and dual boot.  I was able to use efibootmgr when I used modprobe efivars before I chrooted so that solved the problem.  Sorry if it was mentioned in another forum or the guide, I didn't see that solution, unfortunately.  But thanks so much for improving the guide the.ridikulus.rat; it's much better now.

Also, when installing rEFInd, I noted a few inconsistencies in the guide for using refined.  It says copy the files into

/boot/efi/EFI/refind/

but then when you are editing using the efibootmgr, you are instructed to use

/EFI/refind/refind_<arch>.efi

when running the command

efibootmgr -c -d /dev/sdX -p Y -l /EFI/refind/refind_<arch>.efi -L "rEFInd"

.  I think the instructions to copy everything into /boot/efi/EFI/refind should be changed to just /boot/efi/refind.  I'm not sure how to change it in the wiki but just wanted to let you guys know.

Thanks again for all the help!

Offline

#21 2013-08-24 21:07:09

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: UEFI gummiboot/rEFInd setup efibootmgr dual boot problems [SOLVED]

This is because the Beginners' Guide, unlike most of the specific boot loader/manager guides assume the ESP is mounted at /boot rather than the standard /boot/efi. It should probably say to copy them to <path to ESP>/EFI/refind/.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB