Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] UEFI - black screen
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 12:07 am    Post subject: [Solved] UEFI - black screen Reply with quote

OK, my first UEFI setup, not working.

I created GPT partition table,
created 200 MB partition type ef00,
formatted it to fat32,
built an EFI stub kernel following Gentoo wiki,
copied it over to EFI/Boot/bootx64.efi.

M/B setup tells me there is UEFI boot hard drive, when I try to boot from it the screen stays blank, kernel is not loading.

What did I do wrong? I tested the kernel with MBR boot, it works.

Kernel config: https://bpaste.net/show/69c56db87bf7


Last edited by Buffoon on Sun Feb 21, 2016 6:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7159
Location: almost Mile High in the USA

PostPosted: Sun Feb 21, 2016 2:07 am    Post subject: Reply with quote

Set CONFIG_FB_EFI
VESA BIOS is dead during EFI boot.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 2:09 am    Post subject: Reply with quote

!!! Thanks! Getting on it ...
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 2:38 am    Post subject: Reply with quote

Nope. Still same, although you gave me idea it actually was working - and it is. Just have to log in blind and run startx ...

New paste: https://bpaste.net/show/c3e0c43eaf31

What did I miss now?
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sun Feb 21, 2016 3:18 am    Post subject: Reply with quote

Why isn't any of CONFIG_DRM options (those correct for your video card) set ?

Also, set both CONFIG_FB_SIMPLE and CONFIG_X86_SYSFB.


Last edited by VoidMage on Sun Feb 21, 2016 3:30 am; edited 1 time in total
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 3:23 am    Post subject: Reply with quote

I'm running nvidia blob.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 2:45 pm    Post subject: Reply with quote

OK I configured my desktop to autologin to console and autostart X ... I'd like to get back to normal, all ideas are very welcome!
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 218

PostPosted: Sun Feb 21, 2016 4:58 pm    Post subject: Reply with quote

I cannot really say what is going wrong for you, but a while back it also was a serious effort for me to get UEFI boot going, especially with the console and such working, that I needed for the encrypted root.

[rant on]
UEFI was designed by a bunch of idiots with no idea of how to do something user friendly and robust. They probably could not even spell linux and then they handed their ideas to some total morons designing the motherboard BIOS systems, who seem to get payed by the number of bugs they build into the BIOS.
[/rant off]

Really, it adds more than one layer of complexity and you are at the mercy of the BIOS and how well or not this handles the UEFI boot process. I am not sure if I would want to deal with it again, quite possible that I would just disable UEFI entirely on the motherboard if I again run into trouble with it in the future.

Anyway, I have pastebined my current kernel config. This one works to boot from efi with a compiled in initramfs and a compiled in kernel command line. You obviously need to adjust these to your needs, but the config has a working text console during boot, in the initramfs phase where I enter the password and also afterwords if the xserver should fail to start. That also took me several tries to get right.

https://bpaste.net/show/572321808e61

And I should add I had to boot with a live-usb-stick the first time to get efivars working and then point the UEFI bios to the kernel on the harddrive via efibootmgr. That is also a massive and completely braindead hassle I needed to follow to get it working. Kernel command lines work only when I compile them in the kernel. The UEFI bios I have has zero support for such extravagances. It ignores any attached kernel command line via efibootmgr without giving errors.
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 522

PostPosted: Sun Feb 21, 2016 5:39 pm    Post subject: Reply with quote

I just put together a new system that has UEFI and it took me a couple tries to get it booting without having to go through BIOS emulation.

Quick summary of what worked:
1) I set my SSD to use GPT and made an EFI partition mounted under /boot/EFI
2) I made a kernel with the EFI stub, EFI frame buffer, etc and installed it in /boot/EFI/EFI/Boot/

Not all of these may be necessary to get it to boot, I was spitballing a bit, since I was loading a blank screen that hung the system and haven't refined it yet. note that the PARTUUID is the GPT partition ID, not the filesystem ID

Code:

CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_RELOCATABLE=y
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=PARTUUID=a9cb9a9f-cfc6-410e-946b-1ec9e468452a dolvm rootfstype=ext4"
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_FB_EFI=y
CONFIG_FB_SIMPLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFIVAR_FS=y
CONFIG_EARLY_PRINTK_EFI=y


3) I installed sys-boot/refind and ran
Code:

refind-install --usedefault /dev/sdc1 --alldriver


with sdc1 being the location of my EFI partition, and then added the following to /boot/EFI/EFI/Boot/refind.conf

Code:

#latest installed version
menuentry Linux {
    icon EFI/refind/icons/os_linux.png
    loader \efi\boot\linux-current.efi
    options "root=PARTUUID=a9cb9a9f-cfc6-410e-946b-1ec9e468452a"
}

#version known to work
menuentry Linux-safe {
    icon EFI/refind/icons/os_linux.png
    loader \efi\boot\linux-4.4.1.efi
    options "root=PARTUUID=a9cb9a9f-cfc6-410e-946b-1ec9e468452a"
}


I still need to tweak refind.conf to add in an option for single/repair

4) I set my UEFI/BIOS to disable secure boot and to favor UEFI over BIOS


Now, to get here, I played around with several different rescue/install disks on my USB key. I couldn't get sysrescuecd to boot in UEFI despite recommendations for that on the wiki. I did get a refind key to boot into UEFI but it wouldn't load the kernel (at first, failing with a "loader not found" error). I tried the arch install disk, which did boot and let me load my partitions, so I edited efibootmgr from there, but that didn't result in anything working. I ended up installing elilo, which was more flexible about letting me experiment with a boot command line, which was ultimately how I ended up getting to the working loader lines above, but as I said, it just resulted in a hung screen with no disk activity, so I added in the frame buffer changes and that's what finally got me running.

the system is a FX8350 mounted on a m5a99fx, with a GTX650 using nvidia blob if that helps anyone
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 5:41 pm    Post subject: Reply with quote

Thanks for your input. See, the UEFI on this mobo is so broken that when I put it in CSM mode it will not find the hard drive unless I go into setup, pick the drive, save and boot. Next reboot I have to do the same again, otherwise it tells me no boot media found. Junk, junk, junk ...
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 6:09 pm    Post subject: Reply with quote

Solved!

First time when I changed FB in kernel config I just ran make, now I did make clean first and it made the difference. Go figure.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7159
Location: almost Mile High in the USA

PostPosted: Sun Feb 21, 2016 6:32 pm    Post subject: Reply with quote

Well, time and time again: NEVER EDIT .config manually!!!
Search for it in menuconfig and set it. There are dependencies and other cleanup that menuconfig/xconfig will do for you.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Feb 21, 2016 6:58 pm    Post subject: Reply with quote

eccerr0r wrote:
Well, time and time again: NEVER EDIT .config manually!!!
Search for it in menuconfig and set it. There are dependencies and other cleanup that menuconfig/xconfig will do for you.


Who edited .config manually? I use make nconfig, in case you want to know.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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