View previous topic :: View next topic |
Author |
Message |
mark4 n00b

Joined: 26 Feb 2011 Posts: 73
|
Posted: Wed Mar 19, 2025 3:55 pm Post subject: |
|
|
pietinger wrote: | mark4 wrote: | [...] I have never been able to get this working without a custom built kernel using Genkernel [...] |
I have never recommended genkernel ... I always recommend either our binary gentoo distribution kernel, or configuring EVERYTHING yourself ... yes, you can also build the initramfs yourself (I did it on my other box because I use IMA there):
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview |
The problem with building this from scratch thign is that while I used to do that many many years ago i can no longer get a working kernel + initramfs + encrypted / no matter how hard I try. With Genkernel it just works (tm).
I also have a huge problem when I have to RTFM howtos for a whole bunch of what I consider to be highly complex procedures when I am simply trying to get a new kernel built and up and running so I can get on with my stuff.
For example, I abandoned doing Android NDK development because I absolutely REJECT (rabidly) having to learn Groovy just to be able to build stuff. OTOH, I did spent 8 hours (literally) doing repeated man 5 terminfo RTFM followed by 3 hours of writing my own terminfo parser which I later turned into a (wip) fully functional curses library that allows for moving, overlappign windows etc.... But if i have to do 8 hours of RTFM for dracut or what ever other tools I would need to learn to use I would literally reject that whole procedure as way too much trouble.
I dont want to have to know 100% of everything about network administration, java script, groovy, python, bash, haskel, sed, awk, grep and 32823745 other technical subjects just to ... power on and start working on my own development tools such as the 8051 assembler, compiler, simulator I am currently working on.
I would much rather do...
Genkernel all --menuconfig
... and go through and tweak the things I do know about, ask for help with the things I dont know about (such as how to permanantly unmute my headphones that are not plugged in so that my built in speakers which are plugged in are not muted so i dont have to manually unmute that every single reboot lol).
This is not lazyness. If every astronaught had to build their own space ships we would never have made it to the moon (assuming we actually did : ). |
|
Back to top |
|
 |
zen_desu Apprentice

Joined: 25 Oct 2024 Posts: 154
|
Posted: Wed Mar 19, 2025 5:24 pm Post subject: |
|
|
If you're having trouble getting a LUKS encrypted setup to boot, ugrd is kinda built specifically to make that process simpler on Gentoo. The structure and build procedure used mostly lines up with the guides described in the wiki. By this, I mean it doesn't do a lot more than get dependency binaries/libraries as needed, kmods as needed, make a simple shell script and pack it into a cpio. If you're interested in learning about this part of the boot process, it leaves the build dir behind so it can be explored or modified.
A large part of why it was made was because genkernel was slowly falling into deprecation. This being said, ugrd has pretty different goals. Genkernel did a _lot_ and had substantial (and confusing) overlap with other tools such as installkernel. When it works, it works really well, but when it doesn't, it can fail really hard and is pretty difficult to maintain.
If you haven't already tried dist-kernel, I think it's a really great experience and isn't any "less gentoo" than anything else, really. If you're having trouble getting your system to boot, ugrd does its best to warn you about missing parts/bad config during image building time, which should make it easier to find issues with things like kernel config or even cryptographic backends/algorithms for cryptsetup. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
 |
mark4 n00b

Joined: 26 Feb 2011 Posts: 73
|
Posted: Wed Mar 19, 2025 6:01 pm Post subject: |
|
|
zen_desu wrote: | If you're having trouble getting a LUKS encrypted setup to boot, ugrd is kinda built specifically to make that process simpler on Gentoo. The structure and build procedure used mostly lines up with the guides described in the wiki. By this, I mean it doesn't do a lot more than get dependency binaries/libraries as needed, kmods as needed, make a simple shell script and pack it into a cpio. If you're interested in learning about this part of the boot process, it leaves the build dir behind so it can be explored or modified.
A large part of why it was made was because genkernel was slowly falling into deprecation. This being said, ugrd has pretty different goals. Genkernel did a _lot_ and had substantial (and confusing) overlap with other tools such as installkernel. When it works, it works really well, but when it doesn't, it can fail really hard and is pretty difficult to maintain.
If you haven't already tried dist-kernel, I think it's a really great experience and isn't any "less gentoo" than anything else, really. If you're having trouble getting your system to boot, ugrd does its best to warn you about missing parts/bad config during image building time, which should make it easier to find issues with things like kernel config or even cryptographic backends/algorithms for cryptsetup. |
When genkernel is retired i will be forced into learning ugrd but I honestly do not want a one size fits all anything on my system, im not even sure if it would work out of the box. I have some ultra modern hardware here and that does make setting it up more of a challenge because im having to switch to SOF for audio drivers with pipewire instead of pulse (which i never acutally liked lol). Linux is always a constant steep learning curve lol so learning new tools to create bootable systems with will have to be done.
I will hate to see genkernel die off, it will make things extremely painful for me as an end user but I can understand how painful having to constantly duct-tape "fixing" it is for the gentoo devs. |
|
Back to top |
|
 |
zen_desu Apprentice

Joined: 25 Oct 2024 Posts: 154
|
Posted: Wed Mar 19, 2025 6:06 pm Post subject: |
|
|
mark4 wrote: | zen_desu wrote: | If you're having trouble getting a LUKS encrypted setup to boot, ugrd is kinda built specifically to make that process simpler on Gentoo. The structure and build procedure used mostly lines up with the guides described in the wiki. By this, I mean it doesn't do a lot more than get dependency binaries/libraries as needed, kmods as needed, make a simple shell script and pack it into a cpio. If you're interested in learning about this part of the boot process, it leaves the build dir behind so it can be explored or modified.
A large part of why it was made was because genkernel was slowly falling into deprecation. This being said, ugrd has pretty different goals. Genkernel did a _lot_ and had substantial (and confusing) overlap with other tools such as installkernel. When it works, it works really well, but when it doesn't, it can fail really hard and is pretty difficult to maintain.
If you haven't already tried dist-kernel, I think it's a really great experience and isn't any "less gentoo" than anything else, really. If you're having trouble getting your system to boot, ugrd does its best to warn you about missing parts/bad config during image building time, which should make it easier to find issues with things like kernel config or even cryptographic backends/algorithms for cryptsetup. |
When genkernel is retired i will be forced into learning ugrd but I honestly do not want a one size fits all anything on my system, im not even sure if it would work out of the box. I have some ultra modern hardware here and that does make setting it up more of a challenge because im having to switch to SOF for audio drivers with pipewire instead of pulse (which i never acutally liked lol). Linux is always a constant steep learning curve lol so learning new tools to create bootable systems with will have to be done.
I will hate to see genkernel die off, it will make things extremely painful for me as an end user but I can understand how painful having to constantly duct-tape "fixing" it is for the gentoo devs. |
I'm running ugrd on a gen 4 lenovo x13, 7950x and epyc 7r13 systems, it works on all of them with (minimal) config, I just tell it the location of my key files/headers and that sorta thing. The rest is autodetected. ugrd is "one size fits all" as a goal, in the sense that it attempts to autodetect what is needed based on the system running it. The result is the image should only have what is needed to boot the system which built it. In this sense, it greatly differs from dracut which does "non-hostonly" by default, trying to make a generic image that should boot most systems.
Here's the output from my destkop as an example you can see it doesn't include many kmods:
Code: | INFO | [root] Autodetected device mapper container: nvme1n1p1
INFO | Auto-enabling ugrd.kmod.usb for USB device: /dev/sda1
INFO | Processing module: ugrd.kmod.usb
INFO | [/dev/sda1] Auto-enabling kernel modules for device: sd_mod
INFO | [/dev/sda1] Autodetected mount type from device: vfat
INFO | [boot] Autodetected mount source: uuid=4182-B466
INFO | Detected kernel version: 6.12.16-custom
INFO | Build directory does not exist, skipping cleaning: /tmp/initramfs_build
INFO | Processing module: ugrd.kmod.novideo
INFO | Processing module: ugrd.kmod.nosound
INFO | Processing module: ugrd.kmod.nonetwork
INFO | Detected cryptsetup backend: openssl
INFO | Setting shebang to: #!/bin/sh -l
INFO | Wrote file: /tmp/initramfs_build/etc/fstab
INFO | Regenerating kernel module metadata files.
INFO | -- | Generating init functions
INFO | Init kernel modules: dm_crypt, uhid, crc32c, uas, vfat, nvme
INFO | Included kernel modules: usb_storage, fat, nvme_core, nvme_auth, sha256
INFO | Wrote file: /tmp/initramfs_build/etc/profile
INFO | Included functions: check_var, setvar, readvar, wait_enter, prompt_user, retry, klog, edebug, einfo, ewarn, eerror, rd_fail, rd_restart, _find_init, mount_default_root, parse_cmdline_bool, parse_cmdline_str, get_crypt_dev, open_crypt_dev, mount_base, export_exports, parse_cmdline, print_banner, load_modules, mount_fstab, crypt_init, mount_root, umount_fstab, do_switch_root
INFO | Wrote file: /tmp/initramfs_build/init_main.sh
INFO | Wrote file: /tmp/initramfs_build/init
INFO | -- | Packing build
INFO | No compression specified, writing uncompressed data.
INFO | Wrote 66.85 MiB to: /tmp/initramfs_out/ugrd-6.12.16-custom.cpio
INFO | -- | Running checks |
One thing to note is that the initramfs only _needs_ drivers which are required to boot, so stuff like sound drivers can be loaded later after switch_root (by the "real" init, etc) _________________ µgRD dev
Wiki writer |
|
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
|
|