View previous topic :: View next topic |
Author |
Message |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
Posted: Wed Mar 08, 2023 12:39 pm Post subject: Moving from gentoo-kernel-bin to gentoo-sources [solved] |
|
|
Hi,
recently I installed Gentoo in a new machine, and to get things moving quickly I went with gentoo-kernel-bin. Now, I'm trying to move from gentoo-kernel-bin to gentoo-sources. What I did so far is:
- make localyesconfig
- then I dropped support for initrd in the kernel
but when I try to boot with this kernel I get an error message saying
Code: | initrd=boot\initramfs-6.1.12-gentoo-dist.img |
cannot be found, which is shochking since my /boot/refind_linux.conf doesn't have that option (just "root" and "init").
Also, when compling the (gentoo-sources) kernel, modules are saved in /lib/modules/-gentoo-gentoo-dist, which is kind of weird...
Any clues?
Last edited by mani001 on Sat Mar 11, 2023 7:19 am; edited 1 time in total |
|
Back to top |
|
 |
stefan11111 l33t

Joined: 29 Jan 2023 Posts: 954 Location: Romania
|
Posted: Wed Mar 08, 2023 1:16 pm Post subject: Re: Moving from gentoo-kernel-bin to gentoo-sources |
|
|
mani001 wrote: | Hi,
recently I installed Gentoo in a new machine, and to get things moving quickly I went with gentoo-kernel-bin. Now, I'm trying to move from gentoo-kernel-bin to gentoo-sources. What I did so far is:
- make localyesconfig
- then I dropped support for initrd in the kernel
but when I try to boot with this kernel I get an error message saying
Code: | initrd=boot\initramfs-6.1.12-gentoo-dist.img |
cannot be found, which is shochking since my /boot/refind_linux.conf doesn't have that option (just "root" and "init").
Also, when compling the (gentoo-sources) kernel, modules are saved in /lib/modules/-gentoo-gentoo-dist, which is kind of weird...
Any clues? |
Post your grub config.
Did you run grub-mkconfig after compiling the kernel?
Edit
Didn't notice you're using refund, as I'm reading on mobile, you'll have to wait for someone else to reply. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Last edited by stefan11111 on Wed Mar 08, 2023 1:29 pm; edited 1 time in total |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Wed Mar 08, 2023 1:22 pm Post subject: |
|
|
He is using refind. _________________
 |
|
Back to top |
|
 |
GDH-gentoo Veteran


Joined: 20 Jul 2019 Posts: 1832 Location: South America
|
Posted: Wed Mar 08, 2023 2:25 pm Post subject: Re: Moving from gentoo-kernel-bin to gentoo-sources |
|
|
mani001 wrote: | but when I try to boot with this kernel I get an error message saying
Code: | initrd=boot\initramfs-6.1.12-gentoo-dist.img |
cannot be found, which is shochking since my /boot/refind_linux.conf doesn't have that option (just "root" and "init"). |
The initrd= parameter is autoadded by rEFInd's kernel discovery algorithm. Let's see what you have so far in your migration to gentoo-sources, post the output of:
Code: | $ ls /boot /lib/modules
$ emerge --pretend --verbose gentoo-sources |
_________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer  |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though  |
|
|
Back to top |
|
 |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
Posted: Wed Mar 08, 2023 4:35 pm Post subject: |
|
|
Yes, I'm using rEFind
Regarding
Code: | $ ls /boot /lib/modules
$ emerge --pretend --verbose gentoo-sources |
I get
Code: | root@pavilion ~ ls /boot /lib/modules
/boot:
./ efi/ System.map-5.19.17-gentoo-dist
../ initramfs-5.19.17-gentoo-dist.img System.map-6.1.12-gentoo-dist
bzImage-6.1.12-gentoo initramfs-6.1.12-gentoo-dist.img vmlinuz-5.19.17-gentoo-dist
config-5.19.17-gentoo-dist .keep vmlinuz-6.1.12-gentoo-dist
config-6.1.12-gentoo-dist refind_linux.conf
/lib/modules:
./ 5.15.77-gentoo-dist/ 5.15.80-gentoo-gentoo-dist/ 6.1.12-gentoo-dist/
../ 5.15.80-gentoo-dist/ 5.19.17-gentoo-dist/ 6.1.12-gentoo-gentoo-dist/
root@pavilion ~ emerge --pretend --verbose gentoo-sources
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 4.40 s.
[ebuild R ] sys-kernel/gentoo-sources-6.1.12:6.1.12::gentoo USE="-build -experimental -symlink" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB |
|
|
Back to top |
|
 |
GDH-gentoo Veteran


Joined: 20 Jul 2019 Posts: 1832 Location: South America
|
Posted: Wed Mar 08, 2023 11:04 pm Post subject: |
|
|
mani001 wrote: | Code: | /boot:
./ efi/ System.map-5.19.17-gentoo-dist
../ initramfs-5.19.17-gentoo-dist.img System.map-6.1.12-gentoo-dist
bzImage-6.1.12-gentoo initramfs-6.1.12-gentoo-dist.img vmlinuz-5.19.17-gentoo-dist
config-5.19.17-gentoo-dist .keep vmlinuz-6.1.12-gentoo-dist
config-6.1.12-gentoo-dist refind_linux.conf |
|
Which one is your new kernel? /boot/bzImage-6.1.12-gentoo?
mani001 wrote: | Code: | /lib/modules:
./ 5.15.77-gentoo-dist/ 5.15.80-gentoo-gentoo-dist/ 6.1.12-gentoo-dist/
../ 5.15.80-gentoo-dist/ 5.19.17-gentoo-dist/ 6.1.12-gentoo-gentoo-dist/ |
|
The /lib/modules/5.15* directores are remnants from kernels that are no longer installed. You can probably delete them.
How did you create the kernel configuration for gentoo-sources-6.1.12? _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer  |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though  |
|
|
Back to top |
|
 |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
Posted: Thu Mar 09, 2023 10:28 am Post subject: |
|
|
Quote: | Which one is your new kernel? /boot/bzImage-6.1.12-gentoo? |
Yes
Quote: | The /lib/modules/5.15* directores are remnants from kernels that are no longer installed. You can probably delete them. |
Yes, I should do some cleaning
Quote: | How did you create the kernel configuration for gentoo-sources-6.1.12? |
After booting with gentoo-kernel-bin, I used
Code: | make localyesconfig |
to make a first .config out of the running kernel, and then tweaked a couple things (mainly removed support for openrc and initrd). |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5490 Location: Bavaria
|
Posted: Thu Mar 09, 2023 1:24 pm Post subject: |
|
|
mani001 wrote: | [...] mainly removed support for openrc and [...] |
Please examine the file /usr/src/linux/distro/Kconfig ... and read what this option "[*] OpenRC, runit and other script based systems and managers" does ... it selects some other options you really will need in every case ...  |
|
Back to top |
|
 |
GDH-gentoo Veteran


Joined: 20 Jul 2019 Posts: 1832 Location: South America
|
Posted: Thu Mar 09, 2023 9:38 pm Post subject: |
|
|
mani001 wrote: | After booting with gentoo-kernel-bin, I used
Code: | make localyesconfig |
to make a first .config out of the running kernel, and then tweaked a couple things (mainly removed support for openrc and initrd). |
Then see if youir new kernel's configuration inherited a nonblank CONFIG_LOCALVERSION from the distribution kernel's configuration:
Code: | General setup --->
(-gentoo-dist) Local version - append to kernel release |
Or something similar to that. That would explain directory /lib/modules/6.1.12-gentoo-gentoo-dist with the double "gentoo".
With respect to the initrd= parameter, if I understand correctly, rEFInd's kernel detection algorithm thinks that the existing initramfs also goes with your new kernel (which has initramfs support disabled?), because numbers 6.1.12 from /boot/bzImage-6.1.12-gentoo and /boot/initramfs-6.1.12-gentoo-dist.img match, so it appends the parameter to the kernel command line. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer  |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though  |
|
|
Back to top |
|
 |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
Posted: Fri Mar 10, 2023 12:59 pm Post subject: |
|
|
Quote: | Please examine the file /usr/src/linux/distro/Kconfig ... and read what this option "[*] OpenRC, runit and other script based systems and managers" does ... it selects some other options you really will need in every case ... |
I don't think this is the problem because in my desktop computer I don't have that and everything works fine. Anyway, out of despair, I will probably give it a try
Quote: | Then see if youir new kernel's configuration inherited a nonblank CONFIG_LOCALVERSION from the distribution kernel's configuration: |
Yes, you were exactly right. The "problem" with the modules is gone after emptying that field in the kernel config.
Quote: | With respect to the initrd= parameter, if I understand correctly, rEFInd's kernel detection algorithm thinks that the existing initramfs also goes with your new kernel (which has initramfs support disabled?), because numbers 6.1.12 from /boot/bzImage-6.1.12-gentoo and /boot/initramfs-6.1.12-gentoo-dist.img match, so it appends the parameter to the kernel command line. |
I tried moving away all the gentoo-kernel-bin *6.1.12* files, and I don't get an error anymore...but the boot process gets stuck after printing
Code: |
Starting bzImage-6.1.12-gentoo
Using load options 'ro root=..., init=/usr/lib/systemd rootfstype=ext4' |
|
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Fri Mar 10, 2023 4:09 pm Post subject: |
|
|
mani001,
You probably have framebuffer console support missing or incorrectly configured in your kernel.
Pastetbin your current kernel .config file. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Fri Mar 10, 2023 5:57 pm Post subject: |
|
|
mani001
Code: | CONFIG_EXTRA_FIRMWARE=""
...
CONFIG_DRM_AMDGPU=y |
That combination is broken by design.
The firmware needs to be available when the driver that needs it is initialised.
With DRM_AMDGPU build into the kernel the firmware must be included too. That's what EXTRA_FIRMWARE is for.
The system starts on EFI framebuffer and switches to the broken amdgpufb before anything is output on the console, so you see nothing.
The easy fix is to make DRM_AMDGPU a module. The firmware will then be loaded from /lib/firmware.
That works because the kernel has to mount root before it can load modules.
The harder fix is to list all the firmware in EXTRA_FIRMWARE=.
Its a space separated list. Then it becomes your problem to maintain the list.
The advantage of built in in that amdgpufb can start earlier, if that matters.
In either case yon need linux-firmware installed to provide the firmware.
Free an no extra cost :)
You have
Code: | CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
CONFIG_MICROCODE_AMD=y |
You only need the one that matches your CPU. To actually have the microcode loaded by the kernel, it must be listed in EXTRA_FIRMWARE.
Microcode updates are generally a good thing. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
mani001 Guru

Joined: 04 Dec 2004 Posts: 487 Location: Oleiros
|
Posted: Sat Mar 11, 2023 7:19 am Post subject: |
|
|
Quote: | The easy fix is to make DRM_AMDGPU a module. The firmware will then be loaded from /lib/firmware. |
That did the trick. Thank you so much!!
Quote: | You only need the one that matches your CPU. To actually have the microcode loaded by the kernel, it must be listed in EXTRA_FIRMWARE.
Microcode updates are generally a good thing. |
That's WIP Thank you for pointing it out.
Cheers.
EDIT:
If you have, like me, an encrypted home directory managed by homed, you also need
Code: |
Device Drivers --->
[*] Block Devices --->
<*> Loopback device support
[*] Enable loadable module support
Device Drivers --->
[*] Multiple devices driver support (RAID and LVM) --->
<*> Device mapper support
<*> Crypt target support |
|
|
Back to top |
|
 |
|