View previous topic :: View next topic |
Author |
Message |
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 3:59 pm Post subject: If dracut doesn't create bootable initramfs, will UKI work? |
|
|
Hello friends,
So I've in a way been "stuck" on kernel version 6.6.53 of the gentoo-sources for some time now. Dracut, after the updates to the profiles 17 - 23 (I'm on default/linux/amd64/23.0/split-usr/hardened), has never been able to create a bootable initramfs for me regardless version of dracut. I switched to genkernel from using the dist-kernel, as that was the only thing has ever worked for me. However having now switched to a bootstrapped LLVM/Clang genkernel seems to now be throwing a fit. I get some error some libtool about relinking a file from util-linux:
Code: |
libtool: install: error: relink `libmount.la' with the above command before installing it
|
The error (which I can't access at the moment), also mentions a different version of util-linux (the current is 24 something I believe, and the mentioned is 23 something) than what I have installed, so I re-emerged util-linux and that still didn't fix the issue.
That's a separate issue that I'll post about later with logs and such when I'm back at home, but part of me thinks it's something with cross-compilation, and makes me wonder if I should which to the no-multilib equivalent of the profile I currently use to see if there's something funky with compiling 32-bit specific code. I don't really use anything that's specifically needs 32-bit versions of libraries/objects/binaries/etc., unless if playing games with Steam or through Lutris specifically needs it (though I have feeling they don't).
Since I seemingly can't use genkernel at the moment, I thought I could try the dist-kernel again, as that made my life a lot simpler before I had to move to genkernel. Well, dracut still doesn't create a bootable initramfs, with the error when I boot mentioning it doesn't know where the device root=really-long-uuid is.
This is not me using UKI, though, and having a separate initramfs file that I reference in the initrd in the kernel commandline with efibootmgr. My question is, would using UKI produce any different results? Or would it still be the same, dracut not being able to produce a valid initramfs?
Again, I'll post about the genkernel issue in another thread when I can post all of the necessary information, I'm just curious if it's even useful to switch to UKI instead of having a separate initramfs if dracut can't even make a valid initramfs. I guess my last resort would be to build the initramfs myself or try UGRD even though I don't use LUKS or LVM. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1305 Location: Richmond Hill, Canada
|
Posted: Mon Nov 25, 2024 4:14 pm Post subject: |
|
|
UKI just have embedded initramfs into the result binary. It is not about eliminate initramfs.
So if you have setup require use of initramfs (i.e. encrypted rootfs) than UKI will not help. |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Nov 25, 2024 4:16 pm Post subject: |
|
|
If the initramfs alone does not function, baking it into a UKI likely won't help it work. The main reason I could see a UKI helping is if the root= cmdline option was incorrect outside the UKI but set correctly within it.
ugrd was mostly made to make it easier to boot LUKS setups, just because it detects config for you and attempts to validate it. It works fine for simpler setups. One notable thing about it is that it builds in root info from the host, so a "root=" option is not required, but attempted if passed.
Do you really need an initramfs? If you have a custom kernel you could probably just build in everything which is required to boot, modules can be loaded after the rootfs is mounted. In some cases an initramfs just adds parts which can break. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 4:49 pm Post subject: |
|
|
zen_desu wrote: | Do you really need an initramfs? If you have a custom kernel you could probably just build in everything which is required to boot, modules can be loaded after the rootfs is mounted. In some cases an initramfs just adds parts which can break. |
That's a great question, actually. I initially just went with the dist-kernel and initramfs because it seemed like the simplest path at the time. Although, if I understand correctly, if one is using the split-usr profiles (/usr is being separate) then you need to use initframfs? I could likely have that wrong.
If it's not much effort to move away from default/linux/amd64/split-usr/hardened to /default/linux/amd64/no-multilib/hardended then I'm definitely all for it.
So if I could go without initramfs and shove everything in the kernel, erm, someone might need to point me to a guide. I recall there being one somewhere on the wiki, I just don't remember what the page was called. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 4:52 pm Post subject: |
|
|
Oh well there is this which isn't gentoo specific, but it's certainly a helpful starting place. |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Nov 25, 2024 4:57 pm Post subject: |
|
|
alecStewart1 wrote: | zen_desu wrote: | Do you really need an initramfs? If you have a custom kernel you could probably just build in everything which is required to boot, modules can be loaded after the rootfs is mounted. In some cases an initramfs just adds parts which can break. |
That's a great question, actually. I initially just went with the dist-kernel and initramfs because it seemed like the simplest path at the time. Although, if I understand correctly, if one is using the split-usr profiles (/usr is being separate) then you need to use initframfs? I could likely have that wrong.
If it's not much effort to move away from default/linux/amd64/split-usr/hardened to /default/linux/amd64/no-multilib/hardended then I'm definitely all for it.
So if I could go without initramfs and shove everything in the kernel, erm, someone might need to point me to a guide. I recall there being one somewhere on the wiki, I just don't remember what the page was called. |
If you have a separate /usr partition, you may need an initramfs to boot because the system may need stuff from /usr to start the init. Essentially, the initramfs is just there to kickstart the boot process, it gets the root mounted and starts the "real" init system, which often handles things such as additional mounts. If there is no initramfs, the kernel may be able to directly mount the root filesystem, which could be enough for the init to start and do its thing. If not, then that is where the initramfs helps to get things ready.
In the case of LUKS, it decrypts the filesystem, then mounts it. In the case of a separate /usr partition, it mounts that so /usr/bin, etc. is available for the init system.
Depending on how you boot, an initramfs may not be required with dist-kernel. If you're sure you don't need one you can set "USE=-initramfs" for dist-kernel. One notable component which may be missing is the nvme module (important if you boot from a nvme). If you run ugrd, you should see it list some "init kernel modules" which should give you a good idea of what you need to build in if you want to avoid using an initramfs.
I would avoid building _everything_ into the kernel, and would start by simply adding portions which are required specifically to boot. This is also a somewhat advanced method and it's worth noting that using an initramfs here is generally simpler/easier to maintain, but there isn't technically anything wrong about this method. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1935
|
Posted: Mon Nov 25, 2024 5:11 pm Post subject: |
|
|
alecStewart1 wrote: | Although, if I understand correctly, if one is using the split-usr profiles (/usr is being separate) then you need to use initframfs? |
Please don't confuse split-usr/merged-usr with having a separate /usr volume.
The former is a layout where /{,s}bin and /lib{,64} are moved under /usr.
The latter is often broken and not recommended in modern times because of complexity. An initramfs that is aware of separate /usr is required or things will not work.
The simplest solution is to move the separate /usr back to the rootfs if space allows. This can be done easily via a bind mount and rsync. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 5:30 pm Post subject: |
|
|
grknight wrote: | alecStewart1 wrote: | Although, if I understand correctly, if one is using the split-usr profiles (/usr is being separate) then you need to use initframfs? |
Please don't confuse split-usr/merged-usr with having a separate /usr volume.
The former is a layout where /{,s}bin and /lib{,64} are moved under /usr.
The latter is often broken and not recommended in modern times because of complexity. An initramfs that is aware of separate /usr is required or things will not work.
The simplest solution is to move the separate /usr back to the rootfs if space allows. This can be done easily via a bind mount and rsync. |
Ah apologies. I don't actually have a separate /usr volume. Just ye 'ol simple boot (efi), swap and root. So I could go without an initramfs. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 5:32 pm Post subject: |
|
|
zen_desu wrote: |
If you have a separate /usr partition, you may need an initramfs to boot because the system may need stuff from /usr to start the init. Essentially, the initramfs is just there to kickstart the boot process, it gets the root mounted and starts the "real" init system, which often handles things such as additional mounts. If there is no initramfs, the kernel may be able to directly mount the root filesystem, which could be enough for the init to start and do its thing. If not, then that is where the initramfs helps to get things ready.
In the case of LUKS, it decrypts the filesystem, then mounts it. In the case of a separate /usr partition, it mounts that so /usr/bin, etc. is available for the init system.
Depending on how you boot, an initramfs may not be required with dist-kernel. If you're sure you don't need one you can set "USE=-initramfs" for dist-kernel. One notable component which may be missing is the nvme module (important if you boot from a nvme). If you run ugrd, you should see it list some "init kernel modules" which should give you a good idea of what you need to build in if you want to avoid using an initramfs.
I would avoid building _everything_ into the kernel, and would start by simply adding portions which are required specifically to boot. This is also a somewhat advanced method and it's worth noting that using an initramfs here is generally simpler/easier to maintain, but there isn't technically anything wrong about this method. |
I actually don't have a separate /usr partition and I just boot with an EFI stub. So I can give it a go. |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Nov 25, 2024 5:36 pm Post subject: |
|
|
alecStewart1 wrote: | grknight wrote: | alecStewart1 wrote: | Although, if I understand correctly, if one is using the split-usr profiles (/usr is being separate) then you need to use initframfs? |
Please don't confuse split-usr/merged-usr with having a separate /usr volume.
The former is a layout where /{,s}bin and /lib{,64} are moved under /usr.
The latter is often broken and not recommended in modern times because of complexity. An initramfs that is aware of separate /usr is required or things will not work.
The simplest solution is to move the separate /usr back to the rootfs if space allows. This can be done easily via a bind mount and rsync. |
Ah apologies. I don't actually have a separate /usr volume. Just ye 'ol simple boot (efi), swap and root. So I could go without an initramfs. |
You can if you're careful that required modules are built into the kernel. If you only need to add a few, this can be done simply with "gentoo-kernel":
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel#Using_.2Fetc.2Fkernel.2Fconfig.d
Essentially, if you need nvme modules, you can add something like:
to /etc/kernel/config.d/my_patches.config
You may need more modules than that, that's just an example.
You should see these config changes being logged when emerging the kernel, and can double check the resulting kernel .config to be sure required modules were included before rebooting. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 5:45 pm Post subject: |
|
|
zen_desu wrote: |
You can if you're careful that required modules are built into the kernel. If you only need to add a few, this can be done simply with "gentoo-kernel":
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel#Using_.2Fetc.2Fkernel.2Fconfig.d
Essentially, if you need nvme modules, you can add something like:
to /etc/kernel/config.d/my_patches.config
You may need more modules than that, that's just an example.
You should see these config changes being logged when emerging the kernel, and can double check the resulting kernel .config to be sure required modules were included before rebooting. |
I've used savedconfig with the dist-kernel, so I have a kernel .config for 6.6.62 that I can update. If I understand correctly, doing -initramfs on gentoo-kernel, intel-microcode and linux-firmware and then going through the kernel .config and changing CONFIG_SOME_MODULE=m to CONFIG_SOME_MODULE=y.
What would the "best" or "easiest" way to figure out what modules are needed for creating a monolithic kernel (I just remembered the term)/kernel without initramfs? |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Nov 25, 2024 6:27 pm Post subject: |
|
|
I think monolithic would mean a kernel with NO modules. Here, it would probably be most reasonable to make it so kmods aren't required to boot, but can be used later.
Once you build _everything_ into the kernel, you may run into issues, such as firmware loading problems. Some components expect to be modules, especially so firmware can be loaded later. Firmware must be loaded when the kmod is initialized in most cases. If you have a true monolothic kernel this means all required firmware must be builtin to function. This is generally complex and means you can no longer unload/reload modules.
You should still be able to use a microcode initramfs, even with a fully monolothic kernel. This initramfs just contains microcode which is loaded very early in the boot process. The alternative is to build the ucode into the kernel but that is extra work, and having a separate ucode image means you can update microcode without updating your kernel.
I think using ugrd may be a reasonable way to see which kmods are required to boot. It should find them (through various mechanisms) and it will clearly list what it pulls. You can test this it and then use that info to figure out what needs to be built in once you confirm it does what is needed. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5184 Location: Bavaria
|
Posted: Mon Nov 25, 2024 6:43 pm Post subject: |
|
|
alecStewart1 wrote: | [...] I've used savedconfig with the dist-kernel, so I have a kernel .config for 6.6.62 that I can update. If I understand correctly, doing -initramfs on gentoo-kernel, intel-microcode and linux-firmware and then going through the kernel .config and changing CONFIG_SOME_MODULE=m to CONFIG_SOME_MODULE=y.
What would the "best" or "easiest" way to figure out what modules are needed for creating a monolithic kernel (I just remembered the term)/kernel without initramfs? |
I dont recommend to edit the .config (even if your think it is possible) ... but sometimes a module loaded as <M>odule has OTHER dependencies than a module loaded statically <*>
I have a manually configured, signed, monolithic and hardened (with KSPP) kernel (booted by UEFI directly) and I suggest to start here:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration (please follow all the links)
You can select whatever you want - maybe you want emerge the newest gentoo-cources (6.12.1 at the moment) and play a little bit with the configuration ...
In this article you will find also this chapter:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Before_you_start _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Mon Nov 25, 2024 8:48 pm Post subject: |
|
|
zen_desu wrote: | I think monolithic would mean a kernel with NO modules. Here, it would probably be most reasonable to make it so kmods aren't required to boot, but can be used later.
Once you build _everything_ into the kernel, you may run into issues, such as firmware loading problems. Some components expect to be modules, especially so firmware can be loaded later. Firmware must be loaded when the kmod is initialized in most cases. If you have a true monolothic kernel this means all required firmware must be builtin to function. This is generally complex and means you can no longer unload/reload modules.
You should still be able to use a microcode initramfs, even with a fully monolothic kernel. This initramfs just contains microcode which is loaded very early in the boot process. The alternative is to build the ucode into the kernel but that is extra work, and having a separate ucode image means you can update microcode without updating your kernel.
I think using ugrd may be a reasonable way to see which kmods are required to boot. It should find them (through various mechanisms) and it will clearly list what it pulls. You can test this it and then use that info to figure out what needs to be built in once you confirm it does what is needed. |
Okay, so, I'm getting a bit lost in the weeds here, but let me see if I understand here with presenting what I think it actionable.
Change the USE flags I have for sys-kernel/installkernel to be
Code: |
ugrd uki efistub -dracut -systemd -systemd-boot -refind -grub
|
Change sys-kernel/gentoo-kernel to have the following USE flags (hardened is implied on my profile)
Code: |
experimental savedconfig modules-compress modules-sign -initramfs
|
Make sure sys-kernel/linux-firmware is installed with the following USE flags
Code: |
compress-zstd deduplicate savedconfig dist-kernel redistributable -initramfs
|
Make sure sys-firmware/intel-microcode is installed with the following USE flags
Code: |
hostonly initramfs dist-kernel
|
Reinstall the above packages, see what firmware and kmods ugrd reports.
Then...?
Or, for sys-firmware/intel-microcode I need to have sys-kernel/gentoo-kernel have +initramfs, or do I need to turn off initramfs for sys-firmware microcode? |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Nov 25, 2024 8:54 pm Post subject: |
|
|
the linux-firmware initramfs USE flag essentially makes amd microcode, while the initramfs USE flag for the intel package makes intel microcode. You only really need initramfs set on whichever matches your processor.
If you set "-initramfs" on the kernel packages, it won't require installkernel has an initrd generator (ugrd or dracut) set. If you first emerge installkernel with ugrd support, then you can run it and check which kmods it tries to pull and use those as a base for what you will build into your kernel. It's worth making sure it actually boots at least once to be reasonably sure the kmods listed are what you need.
Once you have an idea of which kmods you need, you can simply enable them in your kernel config with Y instead of M then rebuild the kernel. This resulting kernel should not need an initramfs. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 12:32 am Post subject: |
|
|
zen_desu wrote: | the linux-firmware initramfs USE flag essentially makes amd microcode, while the initramfs USE flag for the intel package makes intel microcode. You only really need initramfs set on whichever matches your processor.
If you set "-initramfs" on the kernel packages, it won't require installkernel has an initrd generator (ugrd or dracut) set. If you first emerge installkernel with ugrd support, then you can run it and check which kmods it tries to pull and use those as a base for what you will build into your kernel. It's worth making sure it actually boots at least once to be reasonably sure the kmods listed are what you need.
Once you have an idea of which kmods you need, you can simply enable them in your kernel config with Y instead of M then rebuild the kernel. This resulting kernel should not need an initramfs. |
Okay so just to double check, here's what I've have so far:
package.use
Code: |
sys-kernel/gentoo-kernel experimental savedconfig modules-compress modules-sign
sys-kernel/installkernel ugrd efistub
sys-kernel/linux-firmware compress-zstd deduplicate dist-kernel savedconfig redistributable -initramfs
sys-firmware/intel-microcode hostonly dist-kernel initramfs
|
package.env
Code: |
sys-kernel/gentoo-kernel kernel-clang
|
kernel-clang env file
Code: |
LLVM=1
LLVM_IAS=1
LTO_CLANG_THIN=1
|
/etc/kernel/install.conf
Code: |
layout=efi
initrd_generator=ugrd
uki_generator=none
|
Modules loaded on init (reported by ugrd)
Code: |
INFO | Init kernel modules: nvme, igc, intel_vsec, mei_me
|
So now I'm just going to re-emerge linux-firmware and intel-microcode just to see if everything is fine before emerging gentoo-kernel, but I'll look for those modules in the kernel .config. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 12:41 am Post subject: |
|
|
alecStewart1 wrote: | zen_desu wrote: | the linux-firmware initramfs USE flag essentially makes amd microcode, while the initramfs USE flag for the intel package makes intel microcode. You only really need initramfs set on whichever matches your processor.
If you set "-initramfs" on the kernel packages, it won't require installkernel has an initrd generator (ugrd or dracut) set. If you first emerge installkernel with ugrd support, then you can run it and check which kmods it tries to pull and use those as a base for what you will build into your kernel. It's worth making sure it actually boots at least once to be reasonably sure the kmods listed are what you need.
Once you have an idea of which kmods you need, you can simply enable them in your kernel config with Y instead of M then rebuild the kernel. This resulting kernel should not need an initramfs. |
Okay so just to double check, here's what I've have so far:
package.use
Code: |
sys-kernel/gentoo-kernel experimental savedconfig modules-compress modules-sign
sys-kernel/installkernel ugrd efistub
sys-kernel/linux-firmware compress-zstd deduplicate dist-kernel savedconfig redistributable -initramfs
sys-firmware/intel-microcode hostonly dist-kernel initramfs
|
package.env
Code: |
sys-kernel/gentoo-kernel kernel-clang
|
kernel-clang env file
Code: |
LLVM=1
LLVM_IAS=1
LTO_CLANG_THIN=1
|
/etc/kernel/install.conf
Code: |
layout=efi
initrd_generator=ugrd
uki_generator=none
|
Modules loaded on init (reported by ugrd)
Code: |
INFO | Init kernel modules: nvme, igc, intel_vsec, mei_me
|
So now I'm just going to re-emerge linux-firmware and intel-microcode just to see if everything is fine before emerging gentoo-kernel, but I'll look for those modules in the kernel .config. |
Oh god, I forgot uefi-mkconfig keeps sticking EFI files in /boot even though my /etc/fstab has /efi as the vfat partition that has the EFI flag. |
|
Back to top |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Tue Nov 26, 2024 12:53 am Post subject: |
|
|
USE flags on installkernel handle the default config, and I believe the config you set may be what it would set with your USE flags. I would avoid setting it like that unless the settings installed by installkernel do not work.
Code: | INFO | Init kernel modules: nvme, igc, intel_vsec, mei_me |
Some of these may have been detected by seeing the kmods on lspci, and may or may not actually be required. I think of those, the nvme one may be the only one required to boot.
Are you installing with "emerge --config gentoo-kernel" or some other way? _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 1:12 am Post subject: |
|
|
zen_desu wrote: | USE flags on installkernel handle the default config, and I believe the config you set may be what it would set with your USE flags. I would avoid setting it like that unless the settings installed by installkernel do not work.
Code: | INFO | Init kernel modules: nvme, igc, intel_vsec, mei_me |
Some of these may have been detected by seeing the kmods on lspci, and may or may not actually be required. I think of those, the nvme one may be the only one required to boot.
|
I see more stuff via lsmod | more (mentioned in one of pietinger's wiki pages):
Code: |
Module Size Used by
iptable_mangle 12288 1
iptable_raw 12288 1
ip_tables 24576 2 iptable_raw,iptable_mangle
xt_connmark 12288 4
nf_conntrack 159744 1 xt_connmark
nf_defrag_ipv6 24576 1 nf_conntrack
nf_defrag_ipv4 12288 1 nf_conntrack
xt_mark 12288 2
ip6table_mangle 12288 1
xt_comment 12288 6
xt_addrtype 12288 2
ip6table_raw 12288 1
ip6_tables 24576 2 ip6table_raw,ip6table_mangle
wireguard 110592 0
curve25519_x86_64 32768 1 wireguard
libcurve25519_generic 45056 2 curve25519_x86_64,wireguard
ip6_udp_tunnel 12288 1 wireguard
udp_tunnel 24576 1 wireguard
fuse 204800 2
rfcomm 90112 4
snd_seq_dummy 12288 0
snd_hrtimer 12288 1
snd_seq 102400 7 snd_seq_dummy
8021q 49152 0
garp 12288 1 8021q
mrp 16384 1 8021q
stp 12288 1 garp
llc 12288 2 stp,garp
des_generic 12288 0
libdes 20480 1 des_generic
md4 12288 0
bnep 32768 2
vfat 20480 1
fat 94208 1 vfat
pkcs8_key_parser 12288 0
intel_rapl_msr 16384 0
snd_sof_pci_intel_tgl 12288 0
intel_rapl_common 32768 1 intel_rapl_msr
iwlmvm 684032 0
snd_sof_intel_hda_common 192512 1 snd_sof_pci_intel_tgl
soundwire_intel 65536 1 snd_sof_intel_hda_common
soundwire_generic_allocation 12288 1 soundwire_intel
snd_sof_intel_hda_mlink 28672 2 soundwire_intel,snd_sof_intel_hda_common
soundwire_cadence 36864 1 soundwire_intel
snd_sof_intel_hda 16384 1 snd_sof_intel_hda_common
snd_sof_pci 20480 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
intel_uncore_frequency 12288 0
snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common
intel_uncore_frequency_common 12288 1 intel_uncore_frequency
amdgpu 11497472 24
snd_sof 315392 3 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_hda
x86_pkg_temp_thermal 16384 0
intel_powerclamp 16384 0
snd_sof_utils 16384 1 snd_sof
snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common
snd_hda_ext_core 28672 4 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda_mlink,snd_sof_intel_hda
snd_soc_acpi_intel_match 73728 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
soundwire_bus 98304 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
coretemp 20480 0
snd_soc_core 348160 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress 28672 1 snd_soc_core
kvm_intel 405504 0
mac80211 1429504 1 iwlmvm
ac97_bus 12288 1 snd_soc_core
snd_pcm_dmaengine 12288 1 snd_soc_core
kvm 1196032 1 kvm_intel
|
zen_desu wrote: | Are you installing with "emerge --config gentoo-kernel" or some other way? |
I'm just doing emerge -av gentoo-kernel. Normally, I wouldn't have to do emerge --config, but uefi-mkconfig fails and emerge asks to fix the issue by running emerge --config. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 3:09 am Post subject: |
|
|
Okay, there's still a iniramfs file create that's a little under 4MB, but whatever.
uefi-mkconfig makes emerge "fail" even though an vmlinuz image is created, it just doesn't move it to the correct place and doesn't add the kernel commandline. I can move the files and add the kernel commandline myself, though. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 4:31 am Post subject: |
|
|
Okay, well, things seems like they were going to do fine until the system rebooted upon getting to the display manager. Lovely.
I'm guessing there's other modules I need to bake in to the kernel to get it to boot right, but I really don't feel like dealing with it at the moment.
At least I know ugrd will actually make a bootable initramfs compared to dracut.
Kernel config I used
Modules I changed from m to y in my kernel config:
Code: |
CONFIG_INTEL_MEI=y
CONFIG_INTEL_MEI_ME=y
CONFIG_INTEL_VSEC=y
CONFIG_IGC=y
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
|
lsmod | more
Code: |
Module Size Used by
fuse 204800 2
rfcomm 90112 4
snd_seq_dummy 12288 0
snd_hrtimer 12288 1
snd_seq 102400 7 snd_seq_dummy
8021q 49152 0
garp 12288 1 8021q
mrp 16384 1 8021q
stp 12288 1 garp
llc 12288 2 stp,garp
des_generic 12288 0
libdes 20480 1 des_generic
md4 12288 0
bnep 32768 2
vfat 20480 1
fat 94208 1 vfat
snd_sof_pci_intel_tgl 12288 0
pkcs8_key_parser 12288 0
snd_sof_intel_hda_common 192512 1 snd_sof_pci_intel_tgl
soundwire_intel 65536 1 snd_sof_intel_hda_common
soundwire_generic_allocation 12288 1 soundwire_intel
snd_sof_intel_hda_mlink 28672 2 soundwire_intel,snd_sof_intel_hda_common
soundwire_cadence 36864 1 soundwire_intel
snd_sof_intel_hda 16384 1 snd_sof_intel_hda_common
snd_sof_pci 20480 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common
intel_rapl_msr 16384 0
snd_sof 315392 3 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_hda
intel_rapl_common 32768 1 intel_rapl_msr
intel_uncore_frequency 12288 0
intel_uncore_frequency_common 12288 1 intel_uncore_frequency
snd_sof_utils 16384 1 snd_sof
snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common
x86_pkg_temp_thermal 16384 0
snd_hda_ext_core 28672 4 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda_mlink,snd_sof_intel_hda
intel_powerclamp 16384 0
snd_soc_acpi_intel_match 73728 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
soundwire_bus 98304 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
coretemp 20480 0
snd_soc_core 348160 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
iwlmvm 684032 0
kvm_intel 405504 0
amdgpu 11497472 23
snd_compress 28672 1 snd_soc_core
ac97_bus 12288 1 snd_soc_core
snd_hda_codec_hdmi 94208 1
snd_pcm_dmaengine 12288 1 snd_soc_core
mac80211 1429504 1 iwlmvm
kvm 1196032 1 kvm_intel
btusb 81920 0
irqbypass 12288 1 kvm
libarc4 12288 1 mac80211
crct10dif_pclmul 12288 1
iTCO_wdt 12288 0
ghash_clmulni_intel 16384 0
btrtl 28672 1 btusb
sha512_ssse3 45056 0
snd_hda_intel 53248 1
amdxcp 12288 1 amdgpu
sha256_ssse3 28672 0
btintel 49152 1 btusb
gpu_sched 49152 1 amdgpu
snd_intel_dspcfg 32768 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
btbcm 20480 1 btusb
intel_pmc_bxt 12288 1 iTCO_wdt
btmtk 12288 1 btusb
sha1_ssse3 32768 0
i2c_algo_bit 12288 1 amdgpu
pmt_telemetry 12288 0
snd_intel_sdw_acpi 16384 2 snd_sof_intel_hda_common,snd_intel_dspcfg
mei_hdcp 24576 0
mei_pxp 16384 0
iTCO_vendor_support 12288 1 iTCO_wdt
snd_usb_audio 380928 3
mxm_wmi 12288 0
wmi_bmof 12288 0
pmt_class 12288 1 pmt_telemetry
rapl 16384 0
drm_suballoc_helper 12288 1 amdgpu
bluetooth 933888 34 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
snd_hda_codec 176128 4 snd_hda_codec_hdmi,snd_hda_intel,snd_soc_hdac_hda,snd_sof_intel_hda
iwlwifi 430080 1 iwlmvm
drm_ttm_helper 12288 1 amdgpu
snd_usbmidi_lib 45056 1 snd_usb_audio
ttm 86016 2 amdgpu,drm_ttm_helper
snd_rawmidi 45056 1 snd_usbmidi_lib
snd_hda_core 110592 7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
drm_exec 12288 1 amdgpu
snd_seq_device 12288 2 snd_seq,snd_rawmidi
intel_cstate 16384 0
mc 69632 1 snd_usb_audio
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
drm_display_helper 176128 1 amdgpu
snd_pcm 159744 12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
video 69632 1 amdgpu
intel_uncore 229376 0
cfg80211 1179648 3 iwlmvm,iwlwifi,mac80211
pcspkr 12288 0
joydev 24576 0
hid_logitech_hidpp 61440 0
snd_timer 45056 3 snd_seq,snd_hrtimer,snd_pcm
cec 69632 1 drm_display_helper
mei_me 53248 2
snd 131072 24 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
ecdh_generic 12288 2 bluetooth
xpad 45056 0
i2c_i801 32768 0
igc 180224 0
drm_buddy 16384 1 amdgpu
mei 159744 5 mei_hdcp,mei_pxp,mei_me
rfkill 24576 5 iwlmvm,bluetooth,cfg80211
soundcore 12288 1 snd
ff_memless 16384 1 xpad
i2c_smbus 16384 1 i2c_i801
serial_multi_instantiate 16384 0
wmi 32768 3 video,wmi_bmof,mxm_wmi
acpi_tad 20480 0
pinctrl_alderlake 32768 0
acpi_pad 28672 0
intel_vsec 16384 0
crc32_pclmul 12288 0
crc32c_intel 16384 1
nvme 57344 4
uas 32768 0
nvme_core 163840 5 nvme
usb_storage 77824 1 uas
hid_logitech_dj 36864 0
|
|
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 443 Location: Nijmegen
|
Posted: Tue Nov 26, 2024 7:31 am Post subject: |
|
|
This is not a valid layout. Please do not manually override install.conf unless you really have to and know what you are doing. Setting undefined values will cause undefined behaviour. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 1:28 pm Post subject: |
|
|
Nowa wrote: |
This is not a valid layout. Please do not manually override install.conf unless you really have to and know what you are doing. Setting undefined values will cause undefined behaviour. |
Ah dammit. Appreciate it, Nowa. |
|
Back to top |
|
|
alecStewart1 Apprentice
Joined: 03 Jul 2022 Posts: 166
|
Posted: Tue Nov 26, 2024 3:24 pm Post subject: |
|
|
Okay, everything seems to have been emerged and built correctly. I don't know if my motherboard will accept the installkernel path to the EFI file of
But I'll try rebooting and report back. Probably will since it was okay with
Code: |
# EFI files were named bootx64.efi in both places
/${ESP}/EFI/
/${ESP}/EFI/backup
|
But I imagine I'll have to rename the vmlinuz-x.y.z-gentoo-dist file to bootx64.efi and run efibootmgr myself again. Hurray for differing specifications...
EDIT:
Although I could put a postinstall script at /etc/kernel/postinst.d to do this so I don't have to do it manually every time. |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 443 Location: Nijmegen
|
Posted: Tue Nov 26, 2024 4:26 pm Post subject: |
|
|
alecStewart1 wrote: | But I imagine I'll have to rename the vmlinuz-x.y.z-gentoo-dist file to bootx64.efi and run efibootmgr myself again. Hurray for differing specifications...
EDIT:
Although I could put a postinstall script at /etc/kernel/postinst.d to do this so I don't have to do it manually every time. |
There should be no need to rename, this is the part that uefi-mkconfig takes care of provided the UEFI supports boot entries and manipulating them from the OS. If it does not then you can make a copy of the vmlinuz-x.y.z-gentoo-dist.efi named vmlinuz.efi (and register that with the UEFI), sys-kernel/installkernel will automatically keep that copy up to date. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
|
|
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
|
|