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: 28
Location: Costa Rica

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: 22768

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: 28
Location: Costa Rica

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: 22768

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: 35

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: 28
Location: Costa Rica

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: 35

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: 28
Location: Costa Rica

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: 35

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: 5174
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
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Sun Nov 03, 2024 8:50 pm    Post subject: Reply with quote

I want the binary kernel (I will need to configure some GPG stuff apparently), with a boot manager (GRUB in my case), and if possible (maybe not), initramfs.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5174
Location: Bavaria

PostPosted: Mon Nov 04, 2024 12:07 pm    Post subject: Reply with quote

BluePy_251 wrote:
I want the binary kernel (I will need to configure some GPG stuff apparently), with a boot manager (GRUB in my case), and if possible (maybe not), initramfs.

If you install our binary distribution kernel you will get automatically the (needed) initramfs. Because you want grub and systemd as init system, you should add "grub" globally to your use-flags (USE="..." in /etc/ortage/make.conf). See more here: https://wiki.gentoo.org/wiki/Installkernel#Layouts_with_GRUB
You can do the installation of your kernel and grub as described here:
https://wiki.gentoo.org/wiki/User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System#Kernel

Just get started :D
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Mon Nov 04, 2024 1:58 pm    Post subject: Reply with quote

Thank you, I will install most likely on Friday, because of my studies.


Wait, I could install faster (and therefore, I can do it today), if I use the binary packages, so how do I configure them?

Also, what is the estimated time to install a base system on this computer? (Compiling)
-CPU: Intel Core i5 11th Gen
-GPU: Intel Graphics Xe
-RAM: 16GB, same on swap
-Disk type and size: SSD, 1 TB

Nevermind, it took me like 2 hours to get a base system on one of my tries (no DE), so I'll go for it in the afternoon.
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Thu Nov 14, 2024 9:53 pm    Post subject: Reply with quote

Currently installing from Arch, why does it complain about /etc/portage/make.profile not being a symlink?

Last edited by BluePy_251 on Thu Nov 14, 2024 10:02 pm; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Thu Nov 14, 2024 9:57 pm    Post subject: Reply with quote

What is the output of namei -l /etc/portage/make.profile at the point where that error is printed?
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Thu Nov 14, 2024 10:00 pm    Post subject: Reply with quote

The output:

drwxr-xr-x root root /
drwxr-xr-x root root etc
drwxr-xr-x root root portage
lrwxrwxrwx root root make.profile -> ../../var/db/repos/gentoo/profiles/default/linux/amd64/23.0/desktop/plasma/systemd
drwxr-xr-x root root ..
drwxr-xr-x root root ..
var - No such file or directory

The error I am getting:

!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /var/db/repos/gentoo/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)


!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Fri Nov 15, 2024 12:00 am    Post subject: Reply with quote

Did you remember to mount /var before trying this?
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Fri Nov 15, 2024 12:56 am    Post subject: Reply with quote

I copied and pasted the mount commands, so maybe I missed one (because I can seriously ignore things even when they matter, sadly), I will try tomorrow (it's almost 7pm here)
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Mon Nov 18, 2024 4:50 pm    Post subject: Reply with quote

I couldn't neither on Friday nor on Saturday, I was too busy, but, now that I have the knowledge of mounting everything it asks for, do I remount all that?
Back to top
View user's profile Send private message
BluePy_251
n00b
n00b


Joined: 14 Oct 2024
Posts: 28
Location: Costa Rica

PostPosted: Sun Nov 24, 2024 4:35 pm    Post subject: Reply with quote

I am seriously busy right now, so I cannot really find time to install, so, again, do I have to remount all the partitions that the tutorial said just before chrooting or should I just mount whatever I forgot?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22768

PostPosted: Sun Nov 24, 2024 4:51 pm    Post subject: Reply with quote

Mounts are not remembered across reboots. If you have rebooted or halted since the last time you worked on this, then you need to rerun every mount command. Take care to rerun only the mount commands. You don't want to remake the filesystems, since that would cause data loss.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5174
Location: Bavaria

PostPosted: Sun Nov 24, 2024 5:42 pm    Post subject: Reply with quote

BluePy_251 wrote:
I am seriously busy right now, so I cannot really find time to install, so, again, do I have to remount all the partitions that the tutorial said just before chrooting or should I just mount whatever I forgot?

If you use our GentooCD for booting, then you can use the command "arch-chroot" which does all necessary mounting for you ;-)

See also: https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo#Pause_during_Installation
_________________
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