On 20/08/2013 16:08, Tanstaafl wrote: > On 2013-08-20 8:22 AM, Neil Bothwick <n...@digimed.co.uk> wrote: >> On Tue, 20 Aug 2013 14:10:21 +0200, J. Roeleveld wrote: >> >>>> Not really, because make is intelligent enough to no bother >>>> recompiling anything for which the source has not changed. >>> >>> True, but why recompile the kernel just to redo the initramfs? >>> As mentioned, I don't update/recompile the kernel as often. >>> "genkernel" puts the initramfs where it needs to be, kernel-make >>> doesn't. >> >> That depends on your needs. The reason I do it this way is so that the >> initramfs is locked to the kernel. Once that kernel boots, it will always >> boot because the initramfs cannot be changed. If I make a change to the >> initramfs, that's a new kernel and however broken it may be, the old one >> will still work. > > So, you're saying that whoever it was that said that some userland files > (that the initramfs 'refers to') could get updated, causing it to get > out of sync - and presumably causing it to fail to boot if/when you > rebooted - was wrong? > > The main thing about this whole initramfs thing is, like Dale, I just > don't understand it. I understand grub and grub.conf. I understand > enough about compiling a kernel to be able to get it done and be > reasonably sure it is done right.
What part don't you understand? How to use it, how it works, how to build it? The full correct way to test such a thing is to configure and build the new kernel, build the initramfs, install the whole lot, add new stanza to grub.conf and reboot. If it fails, reboot with the old kernel, then investigate. You have servers and the only time you would really be building a new kernel is to do an update you plan to use, correct? Presumably you have a defined maintenance window for that, so make full use of the time. You can copy debian's scheme in grub.conf to configure a known good fallback that will be used if the boot fails. > > But if my system ever failed to boot because of a problem with the > initramfs, I basically would be hosed. You can't fix them (well, not easily), you just rebuild them. If it helps, think of an initramfs as a minimal system image that is compressed and stored in a file. The kernels mounts it at /, uses it briefly to looad some drivers and do kernel-space setups then invokes some internal magic to toss it and mount the real (and now accessible) / correctly. It's magic because you cannot do this anymore once init has started > >> The kernel and initramfs are so closely coupled, it just seems sensible >> to keep them in the same file, since neitherof them is any use without >> the other. > > See above... > -- Alan McKinnon alan.mckin...@gmail.com