You are not logged in.

#1 2012-07-21 19:57:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Installation of grub-efi-x86_64 in a chroot

Recently upgraded to a new motherboard which is EFi.  I am confused how to setup the efi grub package in a chroot.  I get errors when I attempt to follow the wiki instructions...

I modprobed the follow before entering the chroot...

# modprobe efivars
# modprobe dm-mod

From inside a chroot:

# grep -v rootfs /proc/mounts > /etc/mtab
# mount
/dev/sda2 on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/sda4 on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/sda3 on /boot type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
udev on /dev type devtmpfs (rw,relatime,size=8151020k,nr_inodes=2037755,mode=755)
 
# grub-install --directory=/usr/lib/grub/x86_64-efi --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --boot-directory=/boot --recheck
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
Installation finished. No error reported.

Last edited by graysky (2012-07-21 20:08:25)

Offline

#2 2012-07-21 22:20:06

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Installation of grub-efi-x86_64 in a chroot

GRUB successfully wrote the necessary bits to the EFI boot partition, but when it ran efibootmgr to add a boot entry to the firmware, something odd happened. I don't know what it didn't work, but if you like, you may ignore this error, and use the in-firmware tools (i.e., what used to be the BIOS boot order) to add a boot entry to the \EFI\arch_grub\grubx86.efi file and put it in the right place in the boot order. The part that failed is just a convenience feature. Indeed, in one case, I found that while efibootmgr appeared to work, changes written by it were discarded, so I actually had to use this method to get the boot manager set up properly.

Offline

#3 2012-07-22 09:01:54

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

Re: Installation of grub-efi-x86_64 in a chroot

Offline

Board footer

Powered by FluxBB