Rich Freeman posted on Sat, 09 Apr 2016 21:07:46 -0400 as excerpted: > On Sat, Apr 9, 2016 at 8:09 PM, J. Roeleveld <jo...@antarean.org> wrote: >> >> I actually write my own initramfs because neither dracut not genkernel >> end up with a convenient boot system. >> >> I have 2 disks, both encrypted. >> I prefer only to enter the decryption password once. Both Dracut and >> Genkernel insist on asking for the password/key for every single disk. >> >> > You can of course roll your own, but I imagine that it would be more > straightforward to just write your own dracut plugin. They're basically > just scripts that run at whatever boot stage you define. > You might also just be able to modify the existing plugin.
The problem with writing your own plugin, is that then you have to understand /both/ what you want to do, and the system you're writing a plugin for, in sufficient depth to actually do so. Whereas if you write the functionality directly, you only have to, by the end, understand the functionality you're implementing, nothing else. True, you'll probably be implementing something a bit broader than the plugin, and will probably learn a bit more about the topic as you do it, but if that was the intent in the first place, you'll definitely have achieved it when you're done, while if you write the plugin, you'll only have a so-so knowledge of two things, instead of a more in depth knowledge of the one you were actually interested in. This is actually one of the problems I had trying to learn firewalling on Linux, back when I switched from MS. I knew the general concepts, and indeed had played with them on my DSL router, back in the day, well enough to be the reference person from which many others learned. But I just couldn't get the hang of the various firewall helper scripts, shorewall and the like, because they were simply too far from the action, and I would have had to effectively learn both them and Linux IPTables, particularly when the helper script didn't cover what I wanted to do in its simplified model. When I finally gave up on the so-called helper scripts and decided to try IPTables directly, it was *MUCH* simpler, because now I was just learning ONE thing! Similarly, I learned kernel suspend/hibernate and resume by reading the kernel docs and writing my own script. Once I was part way done, I was able to actually understand the complex suspend-tools or whatever script far better, and could actually borrow a few tricks from it, whereas when I started I tried reading it and it was just trying to do far too much fancy stuff, far too far from the real action, for me to properly master the real kernel action that the fancy script covered. Grub2 same story. I ended up learning the advanced scripting stuff and doing my own thing, eventually install.masking the normal user-side config stuff, which wouldn't let me do what I wanted to do, without having to learn BOTH the advanced scripting and the user-side layout, because the userside stuff was too dumbed down to expose what I needed to do what I wanted to do. Tho with the initr*, I did go the dracut route myself. But I'm still not entirely convinced that I wouldn't have been better off rolling my own, as I'm still not entirely comfortable with the level to which I understand, or more accurately don't understand, dracut. Tho I do understand it well enough to have cut it down to the modules I need, only, but I still don't understand the scripts at the level I know I would had I created them myself... -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman