Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo journey (+ other problems)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 21

PostPosted: Sat Nov 02, 2024 3:58 pm    Post subject: Reply with quote

The error log for trying to remove /mnt/gentoo
Error removing directory
Error removing directory
Repeated a million times, so I couldn't even read it.

What made me get my conclusion is that it never created a module directory, /lib was completely empty, not even a modules directory.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22593

PostPosted: Sat Nov 02, 2024 4:07 pm    Post subject: Reply with quote

On systems with a monolithic kernel, the lack of a /lib/modules/version directory is normal. It is a bit odd for /lib to be completely empty though. Do you still need help with something?
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 21

PostPosted: Sat Nov 02, 2024 4:15 pm    Post subject: Reply with quote

Yes, dracut would always try to find the modules directory, so it would always fail, which made me ragequit that install, effectively breaking my Arch Linux.

A week before I had discovered what the .img files were for, so I didn't do anything else those excruciating minutes other than trying to generate an initramfs.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22593

PostPosted: Sat Nov 02, 2024 5:00 pm    Post subject: Reply with quote

I don't think abandoning your Gentoo install could damage your Arch Linux install. If Arch did not survive this, then it is because you made an incorrect change while trying to install Gentoo. In that case, your Arch Linux install was doomed whether you finished Gentoo or abandoned it.

Are you trying to use kernel modules? If yes, then you need to build them for dracut to find. If no, then you need to tell dracut not to use them.

Why are you using an initramfs? Do you need one?
Back to top
View user's profile Send private message
zen_desu
n00b
n00b


Joined: 25 Oct 2024
Posts: 10

PostPosted: Sat Nov 02, 2024 5:08 pm    Post subject: Reply with quote

BluePy_251 wrote:
Yes, dracut would always try to find the modules directory, so it would always fail, which made me ragequit that install, effectively breaking my Arch Linux.

A week before I had discovered what the .img files were for, so I didn't do anything else those excruciating minutes other than trying to generate an initramfs.


If you do not need any kmods, and don't have any "special" filesystems like LUKS/LVM, etc. then you likely do not need an initramfs. Adding one can cause problems without doing much to help.

If this is a desktop system, it's likely some amount of kmods will be more or less required. Any kmods which need firmware, like many network cards and GPUs need to load that firmware when they are initialized. If these are builtin, they won't be able to load the firmware unless that is also built into the kernel. In cases where firmware is needed, it's generally best to keep that as a module.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 21

PostPosted: Sat Nov 02, 2024 5:24 pm    Post subject: Reply with quote

Hu wrote:
I don't think abandoning your Gentoo install could damage your Arch Linux install. If Arch did not survive this, then it is because you made an incorrect change while trying to install Gentoo. In that case, your Arch Linux install was doomed whether you finished Gentoo or abandoned it.

Are you trying to use kernel modules? If yes, then you need to build them for dracut to find. If no, then you need to tell dracut not to use them.

Why are you using an initramfs? Do you need one?


I could never find any command for dracut so it ignored modules, also, I installed linux-firmware (which it might be unnecessary), and sof-firmware (which my system actually needs because it is an HP Laptop 17-cn0023dx, with 16 GB of RAM, 1 TB SSD (only has around 931 GB that I can use), and somehow all of that out of the box), because my computer happens to use an Intel chip (11th gen), and also, I saw all of these videos where systemd (the init system I want to use and have experience with), and some other essential parts were modules, maybe because it was a completely different distribution shown in the video, and that messed it up.

Also, I want to use an initramfs because I realized that no .img files were creating, not even an UKI would work, so GRUB would recognize Gentoo (on Arch), just that it cannot boot it up. If I don't need an initramfs, what do I actually need for it to generate a Linux kernel .img?
Back to top
View user's profile Send private message
zen_desu
n00b
n00b


Joined: 25 Oct 2024
Posts: 10

PostPosted: Sat Nov 02, 2024 5:39 pm    Post subject: Reply with quote

BluePy_251 wrote:
Hu wrote:
I don't think abandoning your Gentoo install could damage your Arch Linux install. If Arch did not survive this, then it is because you made an incorrect change while trying to install Gentoo. In that case, your Arch Linux install was doomed whether you finished Gentoo or abandoned it.

Are you trying to use kernel modules? If yes, then you need to build them for dracut to find. If no, then you need to tell dracut not to use them.

Why are you using an initramfs? Do you need one?


I could never find any command for dracut so it ignored modules, also, I installed linux-firmware (which it might be unnecessary), and sof-firmware (which my system actually needs because it is an HP Laptop 17-cn0023dx, with 16 GB of RAM, 1 TB SSD (only has around 931 GB that I can use), and somehow all of that out of the box), because my computer happens to use an Intel chip (11th gen), and also, I saw all of these videos where systemd (the init system I want to use and have experience with), and some other essential parts were modules, maybe because it was a completely different distribution shown in the video, and that messed it up.

Also, I want to use an initramfs because I realized that no .img files were creating, not even an UKI would work, so GRUB would recognize Gentoo (on Arch), just that it cannot boot it up. If I don't need an initramfs, what do I actually need for it to generate a Linux kernel .img?



https://wiki.gentoo.org/wiki/Installkernel does most of the work here.

By default, the kernel will install to /boot and will install a "vmlinuz-" file, not anything that ends with .img.
Depending on the installkernel USE flags, the "layout" may differ, changing where these files are installed, and the file name scheme.
If configured to make an initramfs, installkernel will make an initramfs-<version>.img file. This file is only necessary if you need an initramfs to boot.
If you have a UKI, it will combine the kernel and initramfs into a single file, likely with the .img suffix.

You mentioned a variety of firmware, the actual firmware files must be built into the kernel (complicated and breakable) if you want these components to function builtin. If they can be modules, making them modules would likely work better.
Any initramfs generator supported by installkernel should make an attempt to include required-to-boot kmods. ugrd has a "no_kmod" option which will stop it from looking for /lib/modules/<kver>, in case you have a totally monolithic kernel.

If you're using UKIs, it may be worth trying to boot them directly, without GRUB. If grub-mkconfig doesn't see kernels for another distro, it won't add entries for them, not sure how to help here.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 21

PostPosted: Sat Nov 02, 2024 5:47 pm    Post subject: Reply with quote

Ok, so then, you are saying that I don't necessarily need the modules, so then, what extra options do I add to the dracut command so it doesn't care about no modules existing?
Back to top
View user's profile Send private message
zen_desu
n00b
n00b


Joined: 25 Oct 2024
Posts: 10

PostPosted: Sat Nov 02, 2024 6:01 pm    Post subject: Reply with quote

BluePy_251 wrote:
Ok, so then, you are saying that I don't necessarily need the modules, so then, what extra options do I add to the dracut command so it doesn't care about no modules existing?

I'm saying that if you use sof/linux-firmware, then you likely want things to be modules rather than builtin. Trying to force all components as builtin will generally complicate things. Having a few things as modules won't really hurt and will generally reduce your kernel image size and make things more flexible when you're booted. For example, you can't unload something which was builtin to the kernel, or reload it. If it's a module you can force load, unload, reload etc. Importantly, firmware tends to be loaded at kernel module load time, so if there are firmware changes you can reload it without rebooting.

I'm not sure how to do this with Dracut, but if you truly don't have any kernel modules and don't have anything like RAID or drive encryption, you can likely just not use an initramfs at all. An initramfs is mostly there to help mount the root if the kernel itself cannot do it. For most typical file systems, if you have a single root device with no special setup, the kernel alone can mount the root with the "root=" kernel command line option.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5044
Location: Bavaria

PostPosted: Sat Nov 02, 2024 6:21 pm    Post subject: Reply with quote

BluePy_251,

with Gentoo you can configure and install your system the way you want it. The question is what you want ... and why? The question is also whether you want to install everything automatically or whether you are prepared to configure your kernel yourself.

The easiest way is to use our Gentoo distribution kernel. In cooperation with installkernel, everything is installed fully automatically (including microcode, firmware and sof-firmware; you only have to emerge the packages "intel-microcode", "linux-firmware" and "sof-firmware" beforehand). Our dist-kernel naturally uses an initramfs (which is also automatically created by dracut). An example of an OpenRC system is here:

https://wiki.gentoo.org/wiki/User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System#Kernel

You may also want to read this short article:

https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo

... especially this sentence:
Quote:
Secondly, even if you want to use a manually configured kernel, you should first install the precompiled kernel image sys-kernel/gentoo-kernel-bin because you can then select it at any time via the boot manager and thus have a backup kernel when your manually configured kernel causes problems.

If you want to configure the kernel yourself, the question arises whether you need an initramfs. To put it bluntly: You only need this if you want to boot from an encrypted root partition. Yes, an initramfs also does other “nice” things, such as integrating the microcode for the CPU and firmware ... BUT ... if you really want to configure the kernel completely yourself, you can do it yourself. Read this short chapter:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Driver_needs_Firmware
(How to include the CPU microcode is here: https://forums.gentoo.org/viewtopic-t-1065464.html)

Yes, you can build everything “into” the kernel image. Yes, I myself have integrated a monolithic kernel (=no module support) with my Intel microcode and the firmware for my ethernet ... and I don't use a bootmanager and let UEFI boot my kernel directly (https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI).

Whether you use systemd or OpenRC is irrelevant for all the above questions.

So if you tell us what you want to do, we can give you the relevant links that will help you. ;-)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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