Lost in Gentoo installation, need help

After several failed attempts, I tend to give up.

I’m lost in configuring the kernel. Most combinations result in a config error.

Who is the Gentoo wizard here?

2 Likes

You don’t need to compile kernel. Start with gentoo-kernel-bin and after you have a working system you can compile the kernel to your liking.

Just read the handbook and choose which option you use. There’s usually few options per chapter like systemd/OpenRC, grub/efibootmngr.. I find this page very helpful but keep also the handbook open

Edit: boot from a working system with web browser and use gparted to format the partitions to your SSD. And remember to install sudo and give your user sudo access.

2 Likes

@abu

I have Gentoo running on two machines!!! You have followed the Handbook?

What kernel are you trying to compile?

1 Like

Already tried; it doesn’t work either, meaning it doesn’t end up with an installable kernel?

I’m trying to follow the handbook, but it’s relatively messy, too many optionals in between the meat.
@4dandl4

I’ll try to follow the given link for now. Thanks so far.

1 Like

If you try the Gentoo live image it uses binary kernel (IMO). So if you can boot that the binary kernel should work. Maybe you didn’t build modules with dracut? Or you didn’t emerge gentoo-sources?
also grub-mkconfig -o /boot/grub/grub.cfg is needed (I’m pulling from memory the command and the place for grub.cfg)…

1 Like

Did anyone told me to do so and how?

I followed the handbook step by step but don’t remember meeting this.

BTW, the given link is marked as outdated.

EDIT: I’m booting a Gentoo live media.

2 Likes

OK, it’s compiling now, but don’t ask me why… :roll_eyes:

1 Like

That is true.
Last time I did it ( before binaries came in) there were 2 ways to build a kernel

  1. using genkernel ( i think this may be deprecated now or soon)
  2. doing a hand configure to match your hardware… that gets you into a myriad of choices of kernel config options.

I think the advent of a binary kernel is a good move. Sure you lose a bit of optimization. Try it. You can always compile a kernel later when Gentoo is running.

If my view of this is out of date, can someone please correct it.

4 Likes

This is why I don’t like wikis. Naming a chaotic wiki a “handbook” is rarely helpful. :unamused_face:

3 Likes

you got it right. Always bin kernel first and if you need to modify it’s easier when you can boot to the binary kernel if the config didn’t work.

2 Likes

especially this:

System administrators who want to avoid compiling the kernel sources locally can instead use precompiled kernel images:

`emerge --ask sys-kernel/gentoo-kernel-bin`

**Important**
*[Distribution Kernels](https://wiki.gentoo.org/wiki/Project:Distribution_Kernel)*, such as [sys-kernel/gentoo-kernel](https://packages.gentoo.org/packages/sys-kernel/gentoo-kernel) and [sys-kernel/gentoo-kernel-bin](https://packages.gentoo.org/packages/sys-kernel/gentoo-kernel-bin), by default, expect to be installed alongside an [initramfs](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Initramfs). Before running emerge to install the kernel users should ensure that [sys-kernel/installkernel](https://packages.gentoo.org/packages/sys-kernel/installkernel) has been configured to utilize an initramfs generator (for example [Dracut](https://wiki.gentoo.org/wiki/Dracut)) as described in the [installkernel section](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Initramfs).

and


#### Post-install/upgrade tasks

An upgrade of a distribution kernel is capable of triggering an automatic rebuild for external kernel modules installed by other packages (for example: [sys-fs/zfs-kmod](https://packages.gentoo.org/packages/sys-fs/zfs-kmod) or [x11-drivers/nvidia-drivers](https://packages.gentoo.org/packages/x11-drivers/nvidia-drivers)). This automated behaviour is enabled by enabling the [dist-kernel](https://packages.gentoo.org/useflags/dist-kernel) USE flag. When required, this same flag will also trigger re-generation of the [initramfs](https://wiki.gentoo.org/wiki/Initramfs).

It is highly recommended to enable this flag globally via /etc/portage/make.conf when using a distribution kernel:

FILE **`/etc/portage/make.conf`** **Enabling USE=dist-kernel**

USE="dist-kernel"

##### Manually rebuilding the initramfs or Unified Kernel Image

If required, manually trigger such rebuilds by, after a kernel upgrade, executing:

`emerge --ask @module-rebuild`

If any kernel modules (e.g. ZFS) are needed at early boot, rebuild the initramfs afterward via:

`emerge --config sys-kernel/gentoo-kernel`

`emerge --config sys-kernel/gentoo-kernel-bin`

After installing the Distribution Kernel successfully, it is now time to proceed to the next section: [Configuring the system](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/System).

### Installing the kernel sources

When installing and compiling the kernel for amd64-based systems, Gentoo recommends the [sys-kernel/gentoo-sources](https://packages.gentoo.org/packages/sys-kernel/gentoo-sources) package.

Choose an appropriate kernel source and install it using emerge:

`emerge --ask sys-kernel/gentoo-sources`

This will install the Linux kernel sources in /usr/src/ using the specific kernel version in the path. It will not create a symbolic link by itself without the [symlink](https://packages.gentoo.org/useflags/symlink) USE flag being enabled on the chosen kernel sources package.

Yes, the quick install guide is outdated because no one has modifyed it :laughing: but I used it as a list to do when I installed Gentoo last time. The commands are in nice groups like how to chroot.

1 Like

@ihasama Ok, thanks. Meanwhile, I have finished a gentoo-kernel-bin running.

Maybe this question is relatively naive: After selecting a profile containing “desktop plasma”, all I get is a pure console. I’m certain I missed something, but what? How to proceed from here?

2 Likes

You get a console when

  • the DM does not work… either logind or X11 failing
  • there is no DM

So check your stage 3 profile has a DM, and the DM daemon and login daemon are running. … you may just need to use OpenRC to enable the services.

You may be able to start plasma with startx.

3 Likes

So you got to the tty? Great! Now go to KDE - Gentoo Wiki
You need wayland/Xorg and then compile the plasma-meta or plasma-desktop according the wiki page

EDIT: before you start you could also add the binrepos. Again wiki: Gentoo Binary Host Quickstart - Gentoo Wiki

4 Likes

@abu

I can tell you, there are no shortcuts, when compiling Gentoo, use the Handbook,!!! Depending on the machine, leave the binaries alone, until you boot the Gentoo CLI!!! Make sure the “/etc/portage/make.conf” is configured!!!

If you need help, I would need a little history of your machine and a look-see of your “make.conf”

I usually use the Gentoo live ISO , but the minimal ISO works well for beginners, it makes you type the commands, instead of copy and paste!!!

2 Likes

Neville, you forgot that the Gentoo Handbook’s install stops to booting to tty. Then you’re on your own. That’s why I said to install sudo. The profile (as per Abu’s “desktop plasma”) is only for setting sane defaults (flags etc) but it won’t install the package. You need Xorg / Wayland and then install the DE or WM. I prefer Wayland and Sway because it’s quicker and easier than Xorg and full DE.

3 Likes

Thanks. Yes I could not remember that. He has yet to install Xorg, and the DE, and the DM… I think I also remember now something to do with kernel modules?
Its time I had another go at a Gentoo install.

3 Likes

The stage3 profile has no DM!!!

2 Likes

This is far too vague. But for now I’m happy with the dist-kernel. And I’m not a pure beginner; I’ve done kernel builds earlier with other Linuxes. But Gentoo is so different …

4 Likes

Then I have tonight’s program complete! :grin:
Thanks!

4 Likes