Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] UEFI, GPT and GRUB2 boot problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
inch
n00b
n00b


Joined: 04 Mar 2012
Posts: 17

PostPosted: Tue Jan 01, 2013 3:43 pm    Post subject: [SOLVED] UEFI, GPT and GRUB2 boot problems Reply with quote

Hello, I'm trying to get Gentoo to work on my PC but I'm having severe problems due to the countless wikis/documentations not complementing each other.

partitions:
Code:
1    32MB    Linux filesystem    ext4    /boot
2    32MB    EFI System    vfat    /boot/efi
3    rest    Linux filesystem    ext4    /


.config: http://bpaste.net/show/67570/
* EFI modules included, according to wiki
* loadable module support + initramfs disabled
* ext4 included

hardware:
- intel CPU (ivy bridge), asrock Z77 mainboard

installation process:
1. create partitions
2. stage3/portage download and extract
3. create kernel
4. install software (dhcpcd, syslog-ng...)
5. grub2, efibootmgr
* mount /boot and /boot/efi
* grub2-install --target=x86_64-efi
* efibootmgr -v:
Code:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0001,0002
Boot0000* gentoo
Boot0001* Hard Drive
Boot0002* USB
Boot0003* UEFI: USB Flash Disk


I'm using systemrescuecd (gentoo based live CD) with EFI VARS kernel.

After rebooting I get "Reboot and Select proper Boot device or Insert Boot Media ins elected Boot device and press a key".


Last edited by inch on Wed Jan 02, 2013 8:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 134

PostPosted: Tue Jan 01, 2013 4:05 pm    Post subject: Reply with quote

A few things I think you should try:
- The EFI partition has to be over 200MB (mine is 500MB, a bit overkill, but I read in several places that it has to be over 200MB).
- You don't need a dedicated /boot partition, but then again, this shouldn't affect you. To give you an idea, my kernels and initramfs are in my root partition and grub2 can load them perfectly. Again, having this shouldn't hurt you.
- I didn't have much luck with efibootmgr, so I copied my grub.efi to /boot/EFI/BOOT/BOOTX64.EFI (assuming that your EFI partition is mounted in /boot), in this way, your firmware's boot manager should find that file to boot when you select the device where your EFI partition is. This tip is probably the most important one :) If you find that grub2 boots in this way, then efibootmgr didn't help you setting up the custom location of grub.efi. I didn't personally bother trying to get this to work as I know that your mileage certainly varies depending on what system you are using.

Good luck!
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Jan 01, 2013 4:11 pm    Post subject: Reply with quote

Hi, did you compile Grub2 with the uefi stuff ?

Code:

# emerge -pv grub


Do you have this inside your /etc/portage/make.conf :

Code:

GRUB_PLATFORMS="pc efi-64"
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 134

PostPosted: Tue Jan 01, 2013 4:16 pm    Post subject: Reply with quote

d2_racing wrote:
Hi, did you compile Grub2 with the uefi stuff ?


Good point, although I assume that if this works:
Code:

grub2-install --target=x86_64-efi

then, you compiled grub2 correctly.
Back to top
View user's profile Send private message
inch
n00b
n00b


Joined: 04 Mar 2012
Posts: 17

PostPosted: Tue Jan 01, 2013 4:34 pm    Post subject: Reply with quote

gabrielg wrote:
A few things I think you should try:
- The EFI partition has to be over 200MB (mine is 500MB, a bit overkill, but I read in several places that it has to be over 200MB).

Nobody seems to be sure, every wiki/documentation states another numer, the german gentoo translation uses 32MB (point 4b): http://www.gentoo.de/doc/de/handbook/handbook-ia64.xml?part=1&chap=4&style=printable

gabrielg wrote:
- I didn't have much luck with efibootmgr, so I copied my grub.efi to /boot/EFI/BOOT/BOOTX64.EFI (assuming that your EFI partition is mounted in /boot), in this way, your firmware's boot manager should find that file to boot when you select the device where your EFI partition is. This tip is probably the most important one :) If you find that grub2 boots in this way, then efibootmgr didn't help you setting up the custom location of grub.efi. I didn't personally bother trying to get this to work as I know that your mileage certainly varies depending on what system you are using.

ls -lR /boot:
Code:
/boot:
total 4139
-rw-r--r-- 1 root root 4223920 Dec 31 23:37 bzImage
drwxr-xr-x 3 root root     512 Jan  1  1970 efi
drwxr-xr-x 6 root root    1024 Jan  1 17:22 grub2
drwx------ 2 root root   12288 Dec 31 23:26 lost+found

/boot/efi:
total 1
drwxr-xr-x 3 root root 512 Jan  1 17:22 EFI

/boot/efi/EFI:
total 1
drwxr-xr-x 2 root root 512 Jan  1 17:22 gentoo

/boot/efi/EFI/gentoo:
total 120
-rwxr-xr-x 1 root root 122368 Jan  1 17:22 grubx64.efi

/boot/grub2:
total 11
drwxr-xr-x 2 root root 1024 Jan  1 17:22 fonts
-rw-r--r-- 1 root root 1024 Jan  1 17:22 grubenv
drwxr-xr-x 2 root root 1024 Jan  1 17:22 locale
drwxr-xr-x 3 root root 1024 Jan  1 17:22 themes
drwxr-xr-x 2 root root 7168 Jan  1 17:22 x86_64-efi

/boot/grub2/fonts:
total 2501
-rw-r--r-- 1 root root 2560080 Jan  1 17:22 unicode.pf2

/boot/grub2/locale:
total 0

/boot/grub2/themes:
total 1
drwxr-xr-x 2 root root 1024 Jan  1 17:22 starfield

/boot/grub2/themes/starfield:
total 2744
-rw-r--r-- 1 root root   19890 Jan  1 17:22 COPYING.CC-BY-SA-3.0
-rw-r--r-- 1 root root    1191 Jan  1 17:22 README
-rw-r--r-- 1 root root     836 Jan  1 17:22 blob_w.png
-rw-r--r-- 1 root root     178 Jan  1 17:22 boot_menu_c.png
-rw-r--r-- 1 root root     193 Jan  1 17:22 boot_menu_e.png
-rw-r--r-- 1 root root     103 Jan  1 17:22 boot_menu_n.png
-rw-r--r-- 1 root root     193 Jan  1 17:22 boot_menu_ne.png
-rw-r--r-- 1 root root     184 Jan  1 17:22 boot_menu_nw.png
-rw-r--r-- 1 root root     102 Jan  1 17:22 boot_menu_s.png
-rw-r--r-- 1 root root     198 Jan  1 17:22 boot_menu_se.png
-rw-r--r-- 1 root root     196 Jan  1 17:22 boot_menu_sw.png
-rw-r--r-- 1 root root      96 Jan  1 17:22 boot_menu_w.png
-rw-r--r-- 1 root root  146357 Jan  1 17:22 dejavu_10.pf2
-rw-r--r-- 1 root root  160939 Jan  1 17:22 dejavu_12.pf2
-rw-r--r-- 1 root root  176345 Jan  1 17:22 dejavu_14.pf2
-rw-r--r-- 1 root root  194498 Jan  1 17:22 dejavu_16.pf2
-rw-r--r-- 1 root root  183394 Jan  1 17:22 dejavu_bold_14.pf2
-rw-r--r-- 1 root root     197 Jan  1 17:22 slider_c.png
-rw-r--r-- 1 root root     265 Jan  1 17:22 slider_n.png
-rw-r--r-- 1 root root     269 Jan  1 17:22 slider_s.png
-rw-r--r-- 1 root root 1897028 Jan  1 17:22 starfield.png
-rw-r--r-- 1 root root     178 Jan  1 17:22 terminal_box_c.png
-rw-r--r-- 1 root root      94 Jan  1 17:22 terminal_box_e.png
-rw-r--r-- 1 root root     194 Jan  1 17:22 terminal_box_n.png
-rw-r--r-- 1 root root     128 Jan  1 17:22 terminal_box_ne.png
-rw-r--r-- 1 root root     210 Jan  1 17:22 terminal_box_nw.png
-rw-r--r-- 1 root root     101 Jan  1 17:22 terminal_box_s.png
-rw-r--r-- 1 root root     126 Jan  1 17:22 terminal_box_se.png
-rw-r--r-- 1 root root     123 Jan  1 17:22 terminal_box_sw.png
-rw-r--r-- 1 root root      97 Jan  1 17:22 terminal_box_w.png
-rw-r--r-- 1 root root    2249 Jan  1 17:22 theme.txt

/boot/grub2/x86_64-efi:
total 2368
-rw-r--r-- 1 root root  17024 Jan  1 17:22 acpi.mod
-rw-r--r-- 1 root root   1944 Jan  1 17:22 adler32.mod
-rw-r--r-- 1 root root   8608 Jan  1 17:22 affs.mod
-rw-r--r-- 1 root root   9816 Jan  1 17:22 afs.mod
-rw-r--r-- 1 root root  13416 Jan  1 17:22 ahci.mod
-rw-r--r-- 1 root root   1025 Jan  1 17:22 all_video.mod
-rw-r--r-- 1 root root   1528 Jan  1 17:22 aout.mod
-rw-r--r-- 1 root root   5088 Jan  1 17:22 appleldr.mod
-rw-r--r-- 1 root root   7064 Jan  1 17:22 at_keyboard.mod
-rw-r--r-- 1 root root   8792 Jan  1 17:22 ata.mod
-rw-r--r-- 1 root root   2536 Jan  1 17:22 backtrace.mod
-rw-r--r-- 1 root root  11112 Jan  1 17:22 bfs.mod
-rw-r--r-- 1 root root   3288 Jan  1 17:22 bitmap.mod
-rw-r--r-- 1 root root   3776 Jan  1 17:22 bitmap_scale.mod
-rw-r--r-- 1 root root   3112 Jan  1 17:22 blocklist.mod
-rw-r--r-- 1 root root   3368 Jan  1 17:22 boot.mod
-rw-r--r-- 1 root root  50408 Jan  1 17:22 bsd.mod
-rw-r--r-- 1 root root  19544 Jan  1 17:22 btrfs.mod
-rw-r--r-- 1 root root   2944 Jan  1 17:22 bufio.mod
-rw-r--r-- 1 root root   3480 Jan  1 17:22 cat.mod
-rw-r--r-- 1 root root   8496 Jan  1 17:22 chain.mod
-rw-r--r-- 1 root root   2984 Jan  1 17:22 cmp.mod
-rw-r--r-- 1 root root   2742 Jan  1 17:22 command.lst
-rw-r--r-- 1 root root   3520 Jan  1 17:22 configfile.mod
-rw-r--r-- 1 root root 122368 Jan  1 17:22 core.efi
-rw-r--r-- 1 root root   7392 Jan  1 17:22 cpio.mod
-rw-r--r-- 1 root root   7392 Jan  1 17:22 cpio_be.mod
-rw-r--r-- 1 root root   2312 Jan  1 17:22 cpuid.mod
-rw-r--r-- 1 root root   2144 Jan  1 17:22 crc64.mod
-rw-r--r-- 1 root root    855 Jan  1 17:22 crypto.lst
-rw-r--r-- 1 root root   6128 Jan  1 17:22 crypto.mod
-rw-r--r-- 1 root root  14224 Jan  1 17:22 cryptodisk.mod
-rw-r--r-- 1 root root   4216 Jan  1 17:22 cs5536.mod
-rw-r--r-- 1 root root   3208 Jan  1 17:22 date.mod
-rw-r--r-- 1 root root   3080 Jan  1 17:22 datehook.mod
-rw-r--r-- 1 root root   1936 Jan  1 17:22 datetime.mod
-rw-r--r-- 1 root root  14216 Jan  1 17:22 diskfilter.mod
-rw-r--r-- 1 root root   2720 Jan  1 17:22 dm_nv.mod
-rw-r--r-- 1 root root   3024 Jan  1 17:22 echo.mod
-rw-r--r-- 1 root root  12136 Jan  1 17:22 efi_gop.mod
-rw-r--r-- 1 root root   6664 Jan  1 17:22 efi_uga.mod
-rw-r--r-- 1 root root   2280 Jan  1 17:22 efifwsetup.mod
-rw-r--r-- 1 root root   5240 Jan  1 17:22 efinet.mod
-rw-r--r-- 1 root root  25392 Jan  1 17:22 ehci.mod
-rw-r--r-- 1 root root   6816 Jan  1 17:22 elf.mod
-rw-r--r-- 1 root root   8256 Jan  1 17:22 exfat.mod
-rw-r--r-- 1 root root   2296 Jan  1 17:22 exfctest.mod
-rw-r--r-- 1 root root   9216 Jan  1 17:22 ext2.mod
-rw-r--r-- 1 root root   7272 Jan  1 17:22 extcmd.mod
-rw-r--r-- 1 root root   8872 Jan  1 17:22 fat.mod
-rw-r--r-- 1 root root   3016 Jan  1 17:22 fixvideo.mod
-rw-r--r-- 1 root root  16896 Jan  1 17:22 font.mod
-rw-r--r-- 1 root root    202 Jan  1 17:22 fs.lst
-rw-r--r-- 1 root root   4256 Jan  1 17:22 fshelp.mod
-rw-r--r-- 1 root root   5104 Jan  1 17:22 functional_test.mod
-rw-r--r-- 1 root root   2424 Jan  1 17:22 gcry_arcfour.mod
-rw-r--r-- 1 root root   9712 Jan  1 17:22 gcry_blowfish.mod
-rw-r--r-- 1 root root  31048 Jan  1 17:22 gcry_camellia.mod
-rw-r--r-- 1 root root  15512 Jan  1 17:22 gcry_cast5.mod
-rw-r--r-- 1 root root   3904 Jan  1 17:22 gcry_crc.mod
-rw-r--r-- 1 root root  17048 Jan  1 17:22 gcry_des.mod
-rw-r--r-- 1 root root   4248 Jan  1 17:22 gcry_md4.mod
-rw-r--r-- 1 root root   5000 Jan  1 17:22 gcry_md5.mod
-rw-r--r-- 1 root root   3320 Jan  1 17:22 gcry_rfc2268.mod
-rw-r--r-- 1 root root  20496 Jan  1 17:22 gcry_rijndael.mod
-rw-r--r-- 1 root root   9200 Jan  1 17:22 gcry_rmd160.mod
-rw-r--r-- 1 root root  13600 Jan  1 17:22 gcry_seed.mod
-rw-r--r-- 1 root root  16456 Jan  1 17:22 gcry_serpent.mod
-rw-r--r-- 1 root root   8048 Jan  1 17:22 gcry_sha1.mod
-rw-r--r-- 1 root root   4648 Jan  1 17:22 gcry_sha256.mod
-rw-r--r-- 1 root root   5824 Jan  1 17:22 gcry_sha512.mod
-rw-r--r-- 1 root root  12600 Jan  1 17:22 gcry_tiger.mod
-rw-r--r-- 1 root root  31552 Jan  1 17:22 gcry_twofish.mod
-rw-r--r-- 1 root root  23080 Jan  1 17:22 gcry_whirlpool.mod
-rw-r--r-- 1 root root   9472 Jan  1 17:22 geli.mod
-rw-r--r-- 1 root root   8496 Jan  1 17:22 gettext.mod
-rw-r--r-- 1 root root  55264 Jan  1 17:22 gfxmenu.mod
-rw-r--r-- 1 root root  21320 Jan  1 17:22 gfxterm.mod
-rw-r--r-- 1 root root   5208 Jan  1 17:22 gptsync.mod
-rw-r--r-- 1 root root 122368 Jan  1 17:22 grub.efi
-rw-r--r-- 1 root root  11416 Jan  1 17:22 gzio.mod
-rw-r--r-- 1 root root   6288 Jan  1 17:22 halt.mod
-rw-r--r-- 1 root root   8720 Jan  1 17:22 hashsum.mod
-rw-r--r-- 1 root root  11560 Jan  1 17:22 hdparm.mod
-rw-r--r-- 1 root root   1872 Jan  1 17:22 hello.mod
-rw-r--r-- 1 root root   4048 Jan  1 17:22 help.mod
-rw-r--r-- 1 root root   4640 Jan  1 17:22 hexdump.mod
-rw-r--r-- 1 root root  10864 Jan  1 17:22 hfs.mod
-rw-r--r-- 1 root root  10176 Jan  1 17:22 hfsplus.mod
-rw-r--r-- 1 root root   8752 Jan  1 17:22 http.mod
-rw-r--r-- 1 root root   4520 Jan  1 17:22 iorw.mod
-rw-r--r-- 1 root root  13304 Jan  1 17:22 iso9660.mod
-rw-r--r-- 1 root root   9592 Jan  1 17:22 jfs.mod
-rw-r--r-- 1 root root   8744 Jan  1 17:22 jpeg.mod
-rw-r--r-- 1 root root   5808 Jan  1 17:22 keylayouts.mod
-rw-r--r-- 1 root root   3144 Jan  1 17:22 keystatus.mod
-rw-r--r-- 1 root root   8744 Jan  1 17:22 ldm.mod
-rw-r--r-- 1 root root  16624 Jan  1 17:22 linux.mod
-rw-r--r-- 1 root root   4824 Jan  1 17:22 loadbios.mod
-rw-r--r-- 1 root root   8944 Jan  1 17:22 loadenv.mod
-rw-r--r-- 1 root root   4600 Jan  1 17:22 loopback.mod
-rw-r--r-- 1 root root   7072 Jan  1 17:22 ls.mod
-rw-r--r-- 1 root root   5448 Jan  1 17:22 lsacpi.mod
-rw-r--r-- 1 root root   5224 Jan  1 17:22 lsefi.mod
-rw-r--r-- 1 root root   3304 Jan  1 17:22 lsefimmap.mod
-rw-r--r-- 1 root root   3600 Jan  1 17:22 lsefisystab.mod
-rw-r--r-- 1 root root   2904 Jan  1 17:22 lsmmap.mod
-rw-r--r-- 1 root root   7288 Jan  1 17:22 lspci.mod
-rw-r--r-- 1 root root   3832 Jan  1 17:22 lssal.mod
-rw-r--r-- 1 root root   9920 Jan  1 17:22 luks.mod
-rw-r--r-- 1 root root  10160 Jan  1 17:22 lvm.mod
-rw-r--r-- 1 root root  12616 Jan  1 17:22 lzopio.mod
-rw-r--r-- 1 root root   2680 Jan  1 17:22 mdraid09.mod
-rw-r--r-- 1 root root   2712 Jan  1 17:22 mdraid09_be.mod
-rw-r--r-- 1 root root   2696 Jan  1 17:22 mdraid1x.mod
-rw-r--r-- 1 root root   3248 Jan  1 17:22 memdisk.mod
-rw-r--r-- 1 root root   4536 Jan  1 17:22 memrw.mod
-rw-r--r-- 1 root root   5568 Jan  1 17:22 minicmd.mod
-rw-r--r-- 1 root root   6208 Jan  1 17:22 minix.mod
-rw-r--r-- 1 root root   6216 Jan  1 17:22 minix2.mod
-rw-r--r-- 1 root root   6312 Jan  1 17:22 minix2_be.mod
-rw-r--r-- 1 root root   6200 Jan  1 17:22 minix3.mod
-rw-r--r-- 1 root root   6280 Jan  1 17:22 minix3_be.mod
-rw-r--r-- 1 root root   6320 Jan  1 17:22 minix_be.mod
-rw-r--r-- 1 root root  10016 Jan  1 17:22 mmap.mod
-rw-r--r-- 1 root root   3593 Jan  1 17:22 moddep.lst
-rw-r--r-- 1 root root   3688 Jan  1 17:22 msdospart.mod
-rw-r--r-- 1 root root  18752 Jan  1 17:22 multiboot.mod
-rw-r--r-- 1 root root  19896 Jan  1 17:22 multiboot2.mod
-rw-r--r-- 1 root root  72312 Jan  1 17:22 net.mod
-rw-r--r-- 1 root root   7568 Jan  1 17:22 newc.mod
-rw-r--r-- 1 root root  10048 Jan  1 17:22 nilfs2.mod
-rw-r--r-- 1 root root 175080 Jan  1 17:22 normal.mod
-rw-r--r-- 1 root root  16144 Jan  1 17:22 ntfs.mod
-rw-r--r-- 1 root root   5040 Jan  1 17:22 ntfscomp.mod
-rw-r--r-- 1 root root   7376 Jan  1 17:22 odc.mod
-rw-r--r-- 1 root root  16608 Jan  1 17:22 ohci.mod
-rw-r--r-- 1 root root   2320 Jan  1 17:22 part_acorn.mod
-rw-r--r-- 1 root root   2664 Jan  1 17:22 part_amiga.mod
-rw-r--r-- 1 root root   3032 Jan  1 17:22 part_apple.mod
-rw-r--r-- 1 root root   4192 Jan  1 17:22 part_bsd.mod
-rw-r--r-- 1 root root   2184 Jan  1 17:22 part_dvh.mod
-rw-r--r-- 1 root root   3248 Jan  1 17:22 part_gpt.mod
-rw-r--r-- 1 root root   3184 Jan  1 17:22 part_msdos.mod
-rw-r--r-- 1 root root   2496 Jan  1 17:22 part_plan.mod
-rw-r--r-- 1 root root   2232 Jan  1 17:22 part_sun.mod
-rw-r--r-- 1 root root   2488 Jan  1 17:22 part_sunpc.mod
-rw-r--r-- 1 root root    101 Jan  1 17:22 partmap.lst
-rw-r--r-- 1 root root     17 Jan  1 17:22 parttool.lst
-rw-r--r-- 1 root root   7184 Jan  1 17:22 parttool.mod
-rw-r--r-- 1 root root   2960 Jan  1 17:22 password.mod
-rw-r--r-- 1 root root   4496 Jan  1 17:22 password_pbkdf2.mod
-rw-r--r-- 1 root root   7504 Jan  1 17:22 pata.mod
-rw-r--r-- 1 root root   2040 Jan  1 17:22 pbkdf2.mod
-rw-r--r-- 1 root root   3864 Jan  1 17:22 play.mod
-rw-r--r-- 1 root root   9792 Jan  1 17:22 png.mod
-rw-r--r-- 1 root root   2224 Jan  1 17:22 priority_queue.mod
-rw-r--r-- 1 root root   4232 Jan  1 17:22 probe.mod
-rw-r--r-- 1 root root   2000 Jan  1 17:22 raid5rec.mod
-rw-r--r-- 1 root root   3240 Jan  1 17:22 raid6rec.mod
-rw-r--r-- 1 root root   2368 Jan  1 17:22 read.mod
-rw-r--r-- 1 root root   1856 Jan  1 17:22 reboot.mod
-rw-r--r-- 1 root root  80664 Jan  1 17:22 regexp.mod
-rw-r--r-- 1 root root  14592 Jan  1 17:22 reiserfs.mod
-rw-r--r-- 1 root root  26656 Jan  1 17:22 relocator.mod
-rw-r--r-- 1 root root   6000 Jan  1 17:22 romfs.mod
-rw-r--r-- 1 root root   7896 Jan  1 17:22 scsi.mod
-rw-r--r-- 1 root root   5384 Jan  1 17:22 search.mod
-rw-r--r-- 1 root root   5120 Jan  1 17:22 search_fs_file.mod
-rw-r--r-- 1 root root   5056 Jan  1 17:22 search_fs_uuid.mod
-rw-r--r-- 1 root root   5000 Jan  1 17:22 search_label.mod
-rw-r--r-- 1 root root  13536 Jan  1 17:22 serial.mod
-rw-r--r-- 1 root root   1026 Jan  1 17:22 setjmp.mod
-rw-r--r-- 1 root root   9144 Jan  1 17:22 setpci.mod
-rw-r--r-- 1 root root   8176 Jan  1 17:22 sfs.mod
-rw-r--r-- 1 root root   3296 Jan  1 17:22 sleep.mod
-rw-r--r-- 1 root root  10168 Jan  1 17:22 squash4.mod
-rw-r--r-- 1 root root   8176 Jan  1 17:22 tar.mod
-rw-r--r-- 1 root root    112 Jan  1 17:22 terminal.lst
-rw-r--r-- 1 root root   6568 Jan  1 17:22 terminal.mod
-rw-r--r-- 1 root root  18936 Jan  1 17:22 terminfo.mod
-rw-r--r-- 1 root root   7552 Jan  1 17:22 test.mod
-rw-r--r-- 1 root root   2056 Jan  1 17:22 test_blockarg.mod
-rw-r--r-- 1 root root   3928 Jan  1 17:22 testload.mod
-rw-r--r-- 1 root root   8168 Jan  1 17:22 tftp.mod
-rw-r--r-- 1 root root   4240 Jan  1 17:22 tga.mod
-rw-r--r-- 1 root root   2352 Jan  1 17:22 time.mod
-rw-r--r-- 1 root root   1987 Jan  1 17:22 trig.mod
-rw-r--r-- 1 root root   1864 Jan  1 17:22 true.mod
-rw-r--r-- 1 root root  11472 Jan  1 17:22 udf.mod
-rw-r--r-- 1 root root   8344 Jan  1 17:22 ufs1.mod
-rw-r--r-- 1 root root   8472 Jan  1 17:22 ufs1_be.mod
-rw-r--r-- 1 root root   8344 Jan  1 17:22 ufs2.mod
-rw-r--r-- 1 root root  10136 Jan  1 17:22 uhci.mod
-rw-r--r-- 1 root root  14880 Jan  1 17:22 usb.mod
-rw-r--r-- 1 root root   6024 Jan  1 17:22 usb_keyboard.mod
-rw-r--r-- 1 root root  11088 Jan  1 17:22 usbms.mod
-rw-r--r-- 1 root root   2808 Jan  1 17:22 usbserial_common.mod
-rw-r--r-- 1 root root   3488 Jan  1 17:22 usbserial_ftdi.mod
-rw-r--r-- 1 root root   3808 Jan  1 17:22 usbserial_pl2303.mod
-rw-r--r-- 1 root root   5752 Jan  1 17:22 usbtest.mod
-rw-r--r-- 1 root root     41 Jan  1 17:22 video.lst
-rw-r--r-- 1 root root  17496 Jan  1 17:22 video.mod
-rw-r--r-- 1 root root   7688 Jan  1 17:22 video_bochs.mod
-rw-r--r-- 1 root root   8224 Jan  1 17:22 video_cirrus.mod
-rw-r--r-- 1 root root  25528 Jan  1 17:22 video_fb.mod
-rw-r--r-- 1 root root   6336 Jan  1 17:22 videoinfo.mod
-rw-r--r-- 1 root root   5960 Jan  1 17:22 videotest.mod
-rw-r--r-- 1 root root   9032 Jan  1 17:22 xfs.mod
-rw-r--r-- 1 root root  52776 Jan  1 17:22 xnu.mod
-rw-r--r-- 1 root root   3056 Jan  1 17:22 xnu_uuid.mod
-rw-r--r-- 1 root root  20056 Jan  1 17:22 xzio.mod
-rw-r--r-- 1 root root  55784 Jan  1 17:22 zfs.mod
-rw-r--r-- 1 root root   8776 Jan  1 17:22 zfscrypt.mod
-rw-r--r-- 1 root root  10976 Jan  1 17:22 zfsinfo.mod

/boot/lost+found:
total 0


Do you want me to copy /boot/grub2/x86_x64-efi/grub.efi to /boot/efi/boot/bootx64.efi?

@d2racing: Yes sir, GRUB_PLATFORMS="x86_x86-efi" is in my make.conf an grub has been compiled with it.

side note: I tried funtoo before and its grub2/gpt/efi wrapper works out of the box, though I never managed to get Gentoo running :/
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Tue Jan 01, 2013 5:01 pm    Post subject: Reply with quote

gabrielg wrote:
You don't need a dedicated /boot partition, but then again, this shouldn't affect you. To give you an idea, my kernels and initramfs are in my root partition and grub2 can load them perfectly. Again, having this shouldn't hurt you.


I think a dedicated /boot partition is a good idea, since it increases flexibility. I don't want to belabor this point, though, since it's peripheral to the real problem....

Quote:
- I didn't have much luck with efibootmgr, so I copied my grub.efi to /boot/EFI/BOOT/BOOTX64.EFI (assuming that your EFI partition is mounted in /boot),


This is certainly worth trying. There are some badly broken EFI implementations that forget their NVRAM entries or ignore entries that don't fit certain patterns. (The efibootmgr utility adjusts these NVRAM entries.)

If you don't immediately try moving GRUB as gabrielg suggests, please post the output of "efibootmgr -v" (note the "-v"). This will tell us to what files your NVRAM entries point, which is critically important information, given your problem.

inch wrote:
gabrielg wrote:
- The EFI partition has to be over 200MB (mine is 500MB, a bit overkill, but I read in several places that it has to be over 200MB).


Nobody seems to be sure, every wiki/documentation states another numer, the german gentoo translation uses 32MB (point 4b): http://www.gentoo.de/doc/de/handbook/handbook-ia64.xml?part=1&chap=4&style=printable


The EFI documentation is silent on the question of the size of the ESP; however, the EFI spec is quite explicit that the ESP must use FAT32. (OTOH, FAT16 usually works, and sometimes it works better than FAT32, in practice. Some firmware implementations choke on FAT16, though, as does the Windows 7 installer. On balance, I'd say that FAT32 is the safer choice.) The Linux mkdosfs utility creates FAT32 by default only on partitions over about 512MiB (I don't think it's exactly that, but it's something similar), and it refuses to create FAT32 on partitions smaller than a certain value. I'm not sure if inch's 32MiB is below that value. Microsoft creates a 100MiB ESP by default, Apple creates a 200MiB ESP by default, and Linux distributions are all over the map. IMHO, 100-500MiB is a reasonable range, with my preference being 200-500MiB.

Incidentally, it's possible to mount your ESP at /boot. This is a bit unusual, but it works, and it cleanly solves a few minor problems.

One more point: IMHO, GRUB 2 is the worst of the available EFI boot loaders for Linux. For a Linux-only installation, particularly if the user is reasonably Linux-savvy (as most Gentoo users are) ELILO is much better -- it's simple and reliable, although it lacks configuration scripts to modify the setup whenever you add a kernel. It can benefit from mounting the ESP at /boot. Another good option is to use the EFI stub loader (included in 3.3.0 and later kernels) with a boot manager such as my rEFInd or gummiboot. rEFInd can be particularly handy, since it can load EFI filesystem drivers to read a kernel from an ext2/3/4fs or ReiserFS partition and it can auto-scan for new kernels, so you needn't muck with its configuration when you upgrade your kernel. All this said, based on the symptoms, I don't think the problem that inch is experiencing are with GRUB per se; I think that the firmware isn't finding GRUB because its NVRAM entry is wrong or because the EFI has a bad bug that's causing it to ignore the NVRAM entry.
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 134

PostPosted: Tue Jan 01, 2013 5:28 pm    Post subject: Reply with quote

inch wrote:

Do you want me to copy /boot/grub2/x86_x64-efi/grub.efi to /boot/efi/boot/bootx64.efi?

Yes - that's exactly what I mean, then use your Firmware's boot manager to boot from your hard drive where your EFI partition is.

srs5694 kindly provided a detailed explanation of the state of EFI these days.

I am not familiar with funtoo, I can tell you that Fedora installs no problem on an EFI implementation (including the broken ones that Apple used in 32bit firmwares with 64bit CPU's) and that I used Fedora's approach to install Gentoo in one of my boxes.

I believe that you will fix your immediate booting problem by placing the grub.efi as I said before - you can later experiment with efibootmgr and post any findings if you like (I will certainly find them useful :) ).

For reference, my latest EFI experience comes from a Lenovo Thinkpad X230, and the only reason I use Grub 2 is that it can decrypt a LUKS partition. I found it painful to configure, but eventually got it working, by looking for information everywhere. I can certainly help further if you choose to continue with Grub 2 and bump into issues that I know of.
Back to top
View user's profile Send private message
inch
n00b
n00b


Joined: 04 Mar 2012
Posts: 17

PostPosted: Tue Jan 01, 2013 10:49 pm    Post subject: Reply with quote

I tried copying the file and to boot from it, without success. However, I seem to be doing something fundamentally wrong because I don't get anywhere near GRUB2, it just gives me the message to insert a boot media.

To detected possible errors, I try to describe what I'm doing:
I'm booting from USB, choosing "UEFI: usb media" in the UEFI boot menu. Then I proceed with the install. After this step, I choose "gentoo" in the boot menu and get the message that there is no proper boot device.

Also my directorys seem to be wrong, grub2 is in /boot and not in /boot/efi/grub2 as it is supposed to be.

So far Grub2 is a pain in the ass and I'm right before quitting.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Wed Jan 02, 2013 12:42 am    Post subject: Reply with quote

inch wrote:
To detected possible errors, I try to describe what I'm doing:
I'm booting from USB, choosing "UEFI: usb media" in the UEFI boot menu. Then I proceed with the install. After this step, I choose "gentoo" in the boot menu and get the message that there is no proper boot device.


If you've got a CD-R, try downloading the CD image version of rEFInd. If not, download the regular zip file, unpack it, and prepare a bootable USB flash drive version of it, as described on the rEFInd Web page. Either way, try booting with it and see what the rEFInd menu gives as options. With any luck you'll be able to boot. If you can boot in this way, post back the results of the following three commands (you'll need root access for the third, and perhaps for the second):

Code:

df /boot/efi
find /boot -name "*.efi"
efibootmgr -v


Quote:
Also my directorys seem to be wrong, grub2 is in /boot and not in /boot/efi/grub2 as it is supposed to be.


Based on your earlier posts, it looks like your ESP is mounted at /boot/efi. With that mount point, GRUB might be stored in /boot/efi/EFI/grub2 or /boot/efi/EFI/gentoo, but /boot/efi/grub2 would be an improper location. Depending on how it was built, GRUB might put all its modules, configuration files, and other support files on the ESP or it might store some of them in /boot/grub2. Thus, it's not clear that anything is amiss regarding file placement.

Quote:
So far Grub2 is a pain in the ass and I'm right before quitting.


I can't disagree. GRUB 2 works tolerably well on Fedora, Ubuntu, and other major distributions because GRUB experts carefully configure it, including elaborate scripts to scan for OSes and add entries to the GRUB configuration file. When somebody with lesser skill tries to configure it from scratch or in an unusual way, it tends to come tumbling down. That's why I suggested trying rEFInd, gummiboot, or ELILO -- they're all much simpler to configure than GRUB 2.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Wed Jan 02, 2013 8:32 am    Post subject: Reply with quote

rEFInd got me up and running rather painlessly. Just saying....
_________________
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 259

PostPosted: Wed Jan 02, 2013 6:39 pm    Post subject: Reply with quote

As I just recently did this on a Asrock h77 board, thus with almost identical BIOS support:

Use EFIstub, by far the easiest option. Just recompile the kernel with EFI stub support and compile also your kernel command line in.

Check with gdisk that your hd is GPT and has the correct EFI partition type (EF00).

Append .efi to kernel and use efibootmgr and point it directly to your kernel, which you can conveniently put directly under your EFI basedir.
Back to top
View user's profile Send private message
inch
n00b
n00b


Joined: 04 Mar 2012
Posts: 17

PostPosted: Wed Jan 02, 2013 8:52 pm    Post subject: Reply with quote

Without reading your post, I got Gentoo up and running with an EFI Stub kernel :D

Thanks guys, works flawlessly and configuration (so to say) is a piece of cake.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum