Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UEFI 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
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Fri Apr 24, 2015 12:53 pm    Post subject: UEFI Problems Reply with quote

I am attempting to install Gentoo on my new computer. It's an ASUS G751JL, and has UEFI. I have now tried several different ways of getting it to boot Gentoo and Windows, and none of them work. While I have the kernel compiled, and rEFInd installed, it will not find the kernel, even though it's in the boot partition, which is vfat formatted. I have emailed the rEFInd developer, but he hasn't replied yet so I thought I'd ask here.

I have enabled all the appropriate EFI kernel options as detailed in the Windows 7/8 dual boot guide on the wiki, but rEFInd simply will not find the Gentoo kernel. Windows is there, as is the SystemRescueCD, but no Gentoo.

Any help would be appreciated. It's looking like the kernel isn't actually UEFI aware, even though I enabled things. Is there something I am missing?
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Fri Apr 24, 2015 4:26 pm    Post subject: Reply with quote

I have decided to attempt to install Gentoo the old fashioned way, and hope rEFInd finds the MBR with LILO in it.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Fri Apr 24, 2015 10:29 pm    Post subject: Reply with quote

grub2 doesn't work either, it just stops at "Loading iniital ramdisk ..." and goes no further.
Back to top
View user's profile Send private message
Dr Croubie
Apprentice
Apprentice


Joined: 21 Nov 2006
Posts: 155

PostPosted: Fri Apr 24, 2015 11:42 pm    Post subject: Reply with quote

Is there any way to disable EFI in the bios? Mine offers both, I just turned off EFI and boot with a regular bios.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Fri Apr 24, 2015 11:49 pm    Post subject: Reply with quote

I tried that, but then rEFInd wouldn't load into my legacy boot. I had LILO installed. I need rEFInd because I can't chainload Windows 8 from a non-UEFI aware bootloader.

EDIT: I enabled the EFI Framebuffer Device and it works now, but I'm worried that'll stop me using the official nVidia drivers.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Sat Apr 25, 2015 3:49 am    Post subject: Reply with quote

Huge rEFInd fan here:

Let me see; off the top of my head:

/boot/efi/EFI/linux/<kernels_here>

Kernels must be compiled with efi support.

boot doesn't have to be vfat, but /boot/efi does. Follow the manual install instructions on Rod's rEFInd webpage, and don't forget to emerge efibootmgr and run it so that your UEFI firmware is aware of rEFInd, otherwise, no cigar. Sounds like you will have to do this bit from chroot.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Apr 25, 2015 10:07 am    Post subject: Reply with quote

Silent-Hunter,

The EFI-fb and nvidia-drivers should be OK together.
The nvidia-drivers requires that no other driver tries to mess with the hardware behind its back.
All the simple fb drivers do that, as does vesa. EFI-fb is one of the simple ones. It does not attempt any graphics setup, just uses what it finds.
The setup is performed by the EFI ROM code, so that the system can display anything in the first place.

If you really meant that /boot was vfat. Thats an issue. vfat does nat support symlinks, so you have so specially craft the boot loader config file not to depend on symlinks.
It can be done but you need a good reason to do it. Your efi disk space must be vfat as its contents are read by the efi ROM and vfat is all it understands.

If you are going to use grub2 on a GPT partitioned disk you need
a) a small unformatted partition for gub.
b) an efi partition, formatted vfat for all the things that the EFI ROMs will read.
c) a / (root) partition for all of your stuff

A separate /boot partition is entirely optional. It will be on c) if you don't have one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sat Apr 25, 2015 11:00 am    Post subject: Reply with quote

Well it's working now, except as soon as it gets to uevent loading the screen shuts off. Or goes blank. It's an LED display so I can't tell. Sometimes it comes back a split second after going blank, but usually I have to press Control, Alt, Delete to reboot.

There's no bios_grub partition but grub2 is working perfectly. I think it is efifb that is broken. Should I try uvesafb? I tried simplefb already and it did not work.

EDIT: vesafb also does not work. Should I go back to efifb? Is there any other kernel options I need to activate alongside efifb? I don't understand why it's doing this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Apr 25, 2015 1:09 pm    Post subject: Reply with quote

Silent-Hunter,

With MBR grub/grub2 both use the 'wasted' space before the first partition for some of their code.
On GPT, this space is not available, so you need a bios_grub partition for this code.
However both grub and grub2 can manage without it *but* whenever you update grub it must be reinstalled to the MBR as it can no longer read /boot to find the last part of itself.
Instead it closes its eyes and loads whatever is in the blocks it occupied at MBR install time.
Thats just as lilo loads the kernel and initrd. If you have ever forgotten to run /sbin/lilo you will have experienced it first hand.

The kernel efifb depends on the EFI ROM to do the hardware initialisation - it won't work in legacy mode. At least, I would not expect it to.
vesafb should work with UEFI or legacy.

Make up you mind if you will use UEFI or legacy mode.
Make up your mind if you will use a MSDOS or GPT disc lable.
Make it work.

The two are not linked but there are a few things to be aware of if you want to mix legacy mode and a GPT disc lable
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sat Apr 25, 2015 1:19 pm    Post subject: Reply with quote

I think something got confused. I'm no longer using legacy mode. efifb works perfectly, as does grub2, up until I get to "Waiting for uevents", and then the screen goes black. It happened after installing nvidia-drivers. UEFI doesn't seem to be a problem anymore, it seems to be a conflict between efifb and nvidia-drivers.

I do notice something concerning in dmesg:

Code:
[9.209470] nvidia 000:01:00.0: irq 29 for MSI/MSI-X
[9.211391] ACPI Warning: \_SB_.PCI0.PEG0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140926/nsarguments-95)


It says that second line 8 times before continuing. This is one of the few times the screen only flickered instead of going black.

I don't know if that information is useful.


Last edited by Silent-Hunter on Sat Apr 25, 2015 1:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Apr 25, 2015 1:25 pm    Post subject: Reply with quote

Silent-Hunter,

grub is completed well before you get to Waiting for uevents. Thats the system waiting for udev to do its thing.

There has been a history of nvidia-drivers causing this but its been a nvidia-drivers issue.
What kernel and what nvidia drivers are you using?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sat Apr 25, 2015 1:32 pm    Post subject: Reply with quote

I'm using kernel 3.18.11 compiled with genkernel.

nvidia-drivers-349.16

I can use nouveau for a while, if nvidia just needs an update. Or I can try a different version.

Also see my edit with dmesg info.

I'm sorry this is so difficult.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Apr 25, 2015 1:44 pm    Post subject: Reply with quote

Silent-Hunter,

Thats the newest nvida-drivers in the tree. Try nvidia-drivers-346.59.

Code:
emerge =nvidia-drivers-346.59
will save you masking the newer one ... just for testing but if it works, don't forget.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sat Apr 25, 2015 2:05 pm    Post subject: Reply with quote

It's still blacking out the screen at uevents. Three times in a row now it goes black and doesn't return. Would using nouveau help? I'm not sure Steam games will work very well but it's better than this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Apr 25, 2015 3:51 pm    Post subject: Reply with quote

Silent-Hunter,

Its the nvidia kernel module loading. nouveau should work but I'm not a gamer since I put my APPLE ][ away.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sat Apr 25, 2015 3:56 pm    Post subject: Reply with quote

Well for some reason when I went back to the latest version it only flickers at uevents, and I can startx fine. But going back to console after is impossible without a reboot.

It's good enough I suppose. Thanks for all your help though!
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sun Apr 26, 2015 12:22 pm    Post subject: Reply with quote

uvesafb might be an option

like I wrote in my howto - I haven't tried out all of this on a laptop with optimus/bumblebee before

since my laptop (T530 lenovo) supports the option in bios to disable one of the graphics cards specifically - so that only one is

visible to the system at a time


your best bet probably would be to try out the Optimus way:

https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops


alternatively - you could try out Bumblebee:

http://blog.fkmclane.net/nvidia-optimus-with-bumblebee-in-gentoo/


you can try bumping nvidia-drivers in your local overlay to

349.16

http://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-349.16-Linux-Release

or

349.12

if those work better for you
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sun Apr 26, 2015 5:33 pm    Post subject: Reply with quote

I only have the one graphics card. I have managed to get it to a satisfactory state by using efifb and blacklisting the nvidia in modprobe.d so it doesn't try to start until X starts. I cannot use the console afterward, but if I need to I can just reboot.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Mon Apr 27, 2015 10:23 pm    Post subject: Reply with quote

Hi there. I have experienced almost the same problem.

I just purchased a Asus X99 Deluxe and can't be able to install Gentoo on my box. Actually, I can't even detect from where the problem comes.

I've read some topics on the internet that the distribution itself must support secure boot. Does it make sense? If so, does Gentoo support secure boot?
Assuming that it is true, I followed the steps bellow to try to make things work:

1) from an Ubuntu forum, it seems the Bios "Fast Boot" option must be disabled.
2) the second issue is the Bios "Secure Boot state". It is enabled and grayed so that I can't disable it. However, under such option there is the "OS Type" which I choose "Other OS" instead of "Windows UEFI mode". This way a suppose I'm done here.
3) I compiled the kernel with the Gentoo liveCD config.gz to make sure the system will always boot.
4) finally, I followed the Gentoo installation guide to make partitions, boot flag, etc. but can't my it boot no way. I just get a black screen. (Is there anything to do with the framebuffer?)

Could someone give me a help on this topic?
Any help is appreciated.

EDIT: typo correction
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Mon Apr 27, 2015 11:26 pm    Post subject: Reply with quote

Yes, look in device drivers, graphics devices, framebuffers, and select EFIFB.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Tue Apr 28, 2015 1:56 pm    Post subject: Reply with quote

Silent-Hunter wrote:
select EFIFB.

I'm still getting a black screen. Perhaps I missed some step of the manual.
Could you provide more information? How is your partition table? Which bios settings do you have? The Gentoo installation guide do not mention anything, but did you used a UEFI bootable CD like sysRescueCD? There are lots of issues not appropriately covered in the installation guide.
Any help is appreciated.
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Tue Apr 28, 2015 2:12 pm    Post subject: Reply with quote

I did use SysRescueCD, yes. Lemme print my partition table:

Code:
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 68CC6478-66AF-4F25-9C28-37F019FA3F92

Device       Start        End    Sectors   Size Type
/dev/sdb1     2048     206847     204800   100M EFI System
/dev/sdb2   206848    4401151    4194304     2G Linux swap
/dev/sdb3  4401152 1953525134 1949123983 929.4G Linux filesystem


And my /etc/fstab/:

Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sdb1      /boot/efi      vfat      noauto,noatime      1 2
/dev/sdb3      /         ext3      noatime         0 1
/dev/sdb2      none         swap      sw         0 0
/dev/cdrom      /mnt/cdrom      auto      noauto,ro      0 0
/dev/fd0      /mnt/floppy      auto      noauto         0 0
/dev/sda5      /mnt/steamlibrary   ntfs      noatime,uid=1000,rw   0 2


I used GRUB2 and rEFInd to dual boot Windows, with a shared Steam Library disk.

GRUB2 is installed on /dev/sdb. If you don't plan to dual boot Windows it should just work. If you do plan to dual boot Windows follow the directions for rEFInd as well: http://www.rodsbooks.com/refind/installing.html
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Tue Apr 28, 2015 3:37 pm    Post subject: Reply with quote

Hi Silent-Hunter,
It's not clear to me what I'm exactly doing. So, I post all the steps I've followed. Perhaps you can help me to find what I'm doing wrong.
I partition table is as:
Code:
root@sysresccd /mnt/gentoo/root % parted /dev/sd
a
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                               
Model: ATA KINGSTON SV300S3 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  4194kB  3146kB                  grub    bios_grub
 2      4194kB  137MB   133MB   fat32           boot    boot, esp
 3      137MB   674MB   537MB   linux-swap(v1)  swap
 4      674MB   240GB   239GB   ext4            rootfs

My fstab tab is as:
Code:
/dev/sda2      /boot      vfat      defaults,noatime   
0 2
/dev/sda4      /      ext4      noatime         
0 0
/dev/sda3      none      swap      sw         
0 1
#ferreirafm@172.24.188.130:/home/ferreirafm /home/ferreirafm/mephisto fuse.sshfs
 umask=0,defaults,noauto,user 0 0
/dev/cdrom      /mnt/cdrom   auto      noauto,ro   0 0
#/dev/fd0      /mnt/floppy   auto      noauto      0 0

And that's what I have in my /boot:
Code:
/mnt/gentoo/boot:
grubis
initramfs-genkernel-x86_64-4.0.0-gentoo
kernel-genkernel-x86_64-4.0.0-gentoo
System.map-genkernel-x86_64-4.0.0-gentoo

/mnt/gentoo/boot/grub:
fonts  grub.cfg  grubenv  i386-pc  locale  themes

/mnt/gentoo/boot/grub/fonts:
unicode.pf2%)

/mnt/gentoo/boot/grub/i386-pc:

/mnt/gentoo/boot/grub/locale:
pt_BR.mo

/mnt/gentoo/boot/grub/themes:

/mnt/gentoo/boot/grub/themes/starfield:

Should I have to use efibootmgr to create bootx64.efi? It isn't a legacy install?
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Wed Apr 29, 2015 7:53 am    Post subject: Reply with quote

To use EFI for booting you must have a partition for boot images that EFI will use. For example, in my case

Code:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          409600   199.0 MiB   EF00  EFI System
   2          411648         1460223   512.0 MiB   8200  Linux swap
   3         1460224      1953525134   930.8 GiB   8300  Linux filesystem


First partition has type "EFI System" and Code EF00. The partition must have FAT32 file system. It must contain directory /EFI/Boot/. By default for 64-bit systems, EFI uses file /EFI/Boot/bootx64.efi to actually load operating system. Potentially, using efibootmgr one can tell EFI to use different file for booting, or even to display menu for selecting which entry to boot. In my case it didn't work. EFI ignored all my attempts to configure it and stubbornly used /EFI/Boot/bootx64.efi for booting. Then I've simply replaced that file with Linux kernel that was appropriately compiled ( see https://wiki.gentoo.org/wiki/EFI_stub_kernel ). On another computer, I've replaced that file with rEFInd boot loader, which allows Dual-Boot. The only problem, from time to time Windows8 overrides /EFI/Boot/bootx64.efi with its own boot loader, so I keep copy of my bootloader and sysrescuecd around :)
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