"Wil Reichert" <[email protected]> posted [email protected], excerpted below, on Fri, 19 Dec 2008 07:50:34 -0800:
> I build my own kernels but since my / partition is lvm I use genkernel > to create an initrd. Previously 'genkernel --lvm initrd' did what I > wanted but it seems that the since genkernel-3.4.10.902 thats no longer > the case. Reading the man page it seems that the initrd parameter has > been replaced by initramfs. However, when I attempt to run it with that > I get > > matter boot # genkernel --lvm initramfs Error: Unknown option > 'initramfs'! > > I can easily roll back to a previous version of genkernel, I'm just > wondering if genkernel is broken or I'm just doing something wrong? I do /not/ use either genkernel or an initramfs/initrd, so this is from various reading I've done and I have no idea how accurate it might or might not be. Never-the-less, it's likely the case based on what I've come across on the subject. Formerly, the kernel used a separate "init-ram-disk" aka initrd (init-r- d). Now, the kernel uses (if enabled) an "init-file-system", directly appended to the kernel itself, not a separate file. Therefore, what I'd guess is happening is that there's no separate command to make it in the new genkernel, since it's not a separate file. Rather, it probably reads the associated kernel option as to whether to create it or not, and then does so before generating the final kernel, finally appending the compressed initramfs to the already created kernel. Far be it from me to tell you how to arrange your system, and it sounds like it's a bit late for you anyway, but this is something to keep in mind for those just setting up. While I'm running both LVM2 and kernel/ md RAID (0,1 and 6, 0 for speed on stuff like ccache and the gentoo tree where redundancy isn't needed, 1 for /boot since that's all grub understands, and 6 for the main system), the fact that LVM2 requires userspace help and therefore an initrd if the / filesystem is to be placed on it, while with RAID the necessary info can be auto-detected or passed on the command line, was the reason I chose to go with partitioned RAID for / (and a backup I call rootbak) instead of putting it on LVM2. /home and my media and mail and news partitions, etc, with their backups, are all on LVM2, but / and rootbak are directly on partitioned RAID-6. Also, / (and rootbak) include /usr and /var as well (except for /usr/local and /var/log, with /var/tmp being a symlink to /tmp, which is tmpfs), so the full installed system along with the portage data in /var/db and /var/lib/portage, are all on the same volume and managed together, thus kept in sync. This is because I had some major headaches in a disaster recovery scenario where the /, /var, and /usr partitions weren't in sync with each other, so I didn't know /what/ package versions I actually had on disk. Keep it all on the same volume and it stays in sync, if I go to rootbak, tho it may be dated, it too is in sync. Thus I can pass the necessary parameters to assemble the partitioned- RAID-6 upon which the / filesystem is located directly to the kernel, and don't need an initrd/initramfs. Later, as the system boots normally, it loads the raid and lvm services (baselayout-2 with openrc treats them as full services, not the "addons" baselayout-1 used, and loads them as such), bringing up the rest of the RAID devices, and then LVM on top of the RAID-6 (the RAID-0,1 only have a single partition/volume each anyway, so no need for LVM there). I thus entirely avoid the complexity of an initramfs/initrd. As I said, whether something like this may or may not have been better for you, it's kind of late now that you're / is on LVM, but it's something others just setting up should at least evaluate as an option, as they plan out their system. One other comment for those considering this. I only created my main / and a single rootbak backup for it. If I had it to do over, I'd create two backup / images, thus handling the case of tragedy striking just as I was updating the first backup and the resultant loss of both it and the working /. That should be a rather rare event, but were I prepared for it I'd certainly have rather better peace of mind now. -- 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
