Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Potpourri of questions post-install
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
qspec
n00b
n00b


Joined: 07 Jun 2016
Posts: 7

PostPosted: Tue Aug 29, 2017 1:49 am    Post subject: Potpourri of questions post-install Reply with quote

I just finished my install (yay), and I was hoping to get a few things answered and/or cleared-up.

Related to /boot:
For the sake of parity, I like all of my .efi in the same directory
Code:
/boot/efi/EFI/
. Moving the .efi and the initramfs manually seems to work fine, but is there a potentially negative upshot/gotcha? Outside of scripting it, is there a way to remove the manual element from this and dictate where I want the kernel to install? I assume I'll have to move them again if and when I upgrade the kernel. Finally, I have left System.map and the config file in /boot. Should they move with the .efi? Also, what is the point of the installed config file (as compared to the one in
Code:
/usr/src/linux
.

Related to framebuffers:
Does anyone have a good source for learning about them? Dear God, did this hang me up in the install. It felt like issue after issue, and it was all related to the framebuffers. Most conflict with one another. If the framebuffer option under the bus sub-header is selected, one must apparently select simplefb. Uvesafb doesn't work well with UEFI. Efifb doesn't play nicely with nvidia. So on. This was the area that took the most time (by far) of the whole install, and the gentoo wiki has the information scattershot about at best (and internet searches didn't yield much better).

I think that's probably plenty of questions for now. Thanks in advance to anyone that takes the time to answer some of them.


Last edited by qspec on Tue Aug 29, 2017 3:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2374

PostPosted: Tue Aug 29, 2017 6:38 am    Post subject: Re: Potpourri of questions post-install Reply with quote

qspec wrote:
I just finished my install (yay)[/code], and I was hoping to get a few things answered and/or cleared-up.

Related to /boot:
For the sake of parity, I like all of my .efi in the same directory
Code:
/boot/efi/EFI/

I'd recommend using /boot/EFI.

qspec wrote:
. Moving the .efi and the initramfs manually seems to work fine, but is there a potentially negative upshot/gotcha? Outside of scripting it, is there a way to remove the manual element from this and dictate where I want the kernel to install? I assume I'll have to move them again if and when I upgrade the kernel. Finally, I have left System.map and the config file in /boot. Should they move with the .efi? Also, what is the point of the installed config file (as compared to the one in
Code:
/usr/src/linux
.

See https://wiki.gentoo.org/wiki/EFI_stub_kernel#Installation.

My preferred method is like:
Code:
# cd /usr/src/linux-4.9.34-gentoo/
# make clean && make -j8 && make modules_install
# mount /boot
# cp arch/x86/boot/bzImage   /boot/EFI/Gentoo/bzImage.efi
I am having the initramfs built-in.
For rEFInd, with separate initramfs, it should go into /boot/EFI/Gentoo/ as well.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 29, 2017 8:26 am    Post subject: Reply with quote

qspec,

The hardware framebuffer drivers should not be used. They are all for video chips that have been obsolete for many years.

There are a few 'relatively harmless' oddballs there.
In no particular order.

VGA frambuffer
VESA framebuffer
UVESA framebuffer
EFI Framebuffer
Simple Framebuffer.

First, UVESA framebuffer. The userspace part is going away. Don't use it.

VGA and VESA framebuffer both depend on the BIOS provided in the video card. That's not useful in UEFI mode.
In BIOS mode, VESA framebuffer used to work under nvidia-drivers.

EFI Framebuffer should work under nvidia-drivers with the motherboard firmware in UEFI mode

The key to a framebuffer driver working under nvidia-drivers is that it must not attempt to configure the GPU.

Simple Framebuffer uses the framebuffer set up by something else, like Grub or the UEFI/BIOS.
It does not do any hardware setup, but I have no idea have the kernel learns of the existing framebuffer set up.
_________________
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
qspec
n00b
n00b


Joined: 07 Jun 2016
Posts: 7

PostPosted: Tue Aug 29, 2017 3:50 pm    Post subject: Reply with quote

@charles17

Why do you recommend /boot/EFI? I'm certainly not opposed to it. The work to change the mount point is very little. The only reason I went with /boot/efi/EFI is because it is what I'm used to from other distros, and because it is recommended in the rEFInd documentation, though it does explicitly say that some distros like Gentoo prefer /boot/EFI. Are there any side-effects to choosing on over the other?

@NeddySeagoon

Thanks for that. It is probably the most clear information on the whole subject that I have found in one place. Obviously you can't know this without knowing my system, but in theory, if I'm compiling efifb and simplefb, I can probably remove the option for simplefb in the kernel and have it work? As for efifb, the nvidia page says:
Quote:
For (U)EFI systems, uvesafb will not work. Be warned that enabling efifb support in kernel (CONFIG_FB_EFI=y) causes intermittent problems with the initialization of the NVIDIA drivers. There is no known alternative framebuffer for (U)EFI systems.

Is this not really true anymore? Or is it only true with the proprietary drivers (I'm currently using nouveau)?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2374

PostPosted: Tue Aug 29, 2017 4:41 pm    Post subject: Reply with quote

qspec wrote:
@charles17

Why do you recommend /boot/EFI? I'm certainly not opposed to it. The work to change the mount point is very little. The only reason I went with /boot/efi/EFI is because it is what I'm used to from other distros, and because it is recommended in the rEFInd documentation, though it does explicitly say that some distros like Gentoo prefer /boot/EFI. Are there any side-effects to choosing on over the other?

True, the changes are not very big. But in Gentoo, the standard throughout the Handbook is /boot/EFI. It's for the sake of simplicity as the additional level in /boot/efi/EFI is superfluous and only causes confusion. Good for nothing.

Who wants to have its root directory tree like this?
Quote:
/
├── bin
├── boot/efi
├── dev
├── etc
├── home
├...


Regarding the rEFInd documentation, did I miss doing some adjustments?


Last edited by charles17 on Tue Aug 29, 2017 5:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 29, 2017 5:51 pm    Post subject: Reply with quote

qspec,

My previous answer about framebuffer drivers was incomplete.

All of the Direct Render Manager video drivers provide a framebuffer console. These drivers are in two parts.
A kernel part, that includes the frmebuffer console driver and an Xorg part that works with the kernel part to give you Direct Rendering.

Nouveau is one of the DRM kernel video drivers. It includes a framebuffer too.

Now it gets a bit tricky. What happens when depends on how your kernel is made. Here's a worked example from my system.
Code:
$ dmesg | grep buffer
[    1.442961] e820: reserve RAM buffer [mem 0x0009e400-0x0009ffff]
[    1.442962] e820: reserve RAM buffer [mem 0xcfe90000-0xcfffffff]
[    1.974192] vesafb: framebuffer at 0xf9000000, mapped to 0xffffc90000800000, using 3072k, total 14336k
[    1.976335] Console: switching to colour frame buffer device 128x48
[    1.978360] fb0: VESA VGA frame buffer device
[    2.178054] nouveau 0000:01:00.0: DRM: MM: using CRYPT for buffer copies
[    2.363979] Console: switching to colour frame buffer device 320x90
[    2.397288] nouveau 0000:01:00.0: fb0: nouveaufb frame buffer device


First, the kernel uses the old VGA console, then it switches to vesafb (I used to use nvidia-drivers), then it switches to nouveau. Its all over in under 2.3 seconds.
You might not notice.
The nouveau framebuffer cannot be used until the kernel module is loaded and initialised. How long that takes depends where the code is.
If its built into the kernel <*>, its loaded by the boot loader and comes up fastest.
If its a <M> it may be in the initrd. The initrd needs to be mounted by the kernel before the module can be loaded.
Lastly, it might only be on the root filesystem, which may not be mounted until several seconds into the boot process.
Here, that happens at
Code:
[    4.518764] EXT4-fs (dm-10): mounted filesystem with ordered data mode. Opts: (null)
but if that's your only console driver, the console is blank and you don't see any console messages until
nouveau is active. Or to be a little bit more direct, if you get a boot fail before nouveau is active, you don't get any hints as to why.

That nvidia-drivers warning about framebuffers applies only to the nvidia-drivers. If you use a boot loader, or something else sets up a framebuffer, simple framebuffer may work.
Reading dmesg will shed some light on your boot process and the framebuffer switching the kernel does.
_________________
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
qspec
n00b
n00b


Joined: 07 Jun 2016
Posts: 7

PostPosted: Tue Aug 29, 2017 8:38 pm    Post subject: Reply with quote

charles17 wrote:
qspec wrote:
@charles17

Why do you recommend /boot/EFI? I'm certainly not opposed to it. The work to change the mount point is very little. The only reason I went with /boot/efi/EFI is because it is what I'm used to from other distros, and because it is recommended in the rEFInd documentation, though it does explicitly say that some distros like Gentoo prefer /boot/EFI. Are there any side-effects to choosing on over the other?

True, the changes are not very big. But in Gentoo, the standard throughout the Handbook is /boot/EFI. It's for the sake of simplicity as the additional level in /boot/efi/EFI is superfluous and only causes confusion. Good for nothing.

Who wants to have its root directory tree like this?
Quote:
/
├── bin
├── boot/efi
├── dev
├── etc
├── home
├...


Regarding the rEFInd documentation, did I miss doing some adjustments?


No, I don't believe you missed anything. I meant the actual documentation for rEFInd (as opposed to the wiki about rEFInd).

Quote:
On a UEFI-based PC, you'll normally install rEFInd to the ESP, which is usually mounted at /boot/efi. You can verify that this is the case by using the df command (source)


There is this warning in the handbook (I'd assume because rEFInd makes the assumption above).
Quote:
If /boot cannot be found in /etc/fstab, refind-install will default to using /boot/efi/EFI and even move an existing /boot/EFI to /boot/efi/EFI.


@NeddySeagoon

Thanks for the information. I'll check my dmesg when I get home. Any potential gotchas if I decide to go with nvidia proprietary drivers from nouveau?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2374

PostPosted: Wed Aug 30, 2017 5:36 am    Post subject: Reply with quote

qspec wrote:
There is this warning in the handbook (I'd assume because rEFInd makes the assumption above).
Quote:
If /boot cannot be found in /etc/fstab, refind-install will default to using /boot/efi/EFI and even move an existing /boot/EFI to /boot/efi/EFI.

I am aware ot that warning, and the next version IMHO should be patched for an adjustment.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Aug 30, 2017 7:54 am    Post subject: Reply with quote

qspec,

Getting a console (at all) is the hard part. Try Simple Framebuffer asd UEFI Framebuffer.
nvidia-drivers does not provide a console, at all.
_________________
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
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