On Tue, Jan 29, 2019 at 3:15 PM Grant Taylor
<[email protected]> wrote:
>
> On 01/29/2019 01:08 PM, Rich Freeman wrote:
>
> You seem to be focusing on the second kernel that the initramfs execs.
>

Uh, an initramfs typically does not exec a second kernel.  I guess it
could, in which case that kernel would need its own initramfs to get
around to mounting its root filesystem.  Presumably at some point
you'd want to have your system stop kexecing kernels and start
actually doing something useful...

If an initramfs did kexec a second kernel then that initramfs would
basically be wiped out along with anything the first kernel did.
Unless you're talking about something like Xen a linux kernel
generally takes complete control over the system.

An initramfs typically loads kernel modules, assuming there are any
that need to be loaded.  They're loaded by the kernel that was run by
grub, and they stay around after the new root/init is pivoted.

> The initramfs won't be able to do crap if it doesn't have the device and
> file system drives necessary for the initramfs kernel & init scripts to
> boot.

Sure, and those are in the kernel that runs the initramfs.

Remember, it is the kernel that runs the initramfs, not the other way
around, though the initramfs might modprobe some modules just as you
might do 5 minutes after booting.  If those drivers are already
built-in to the kernel then there is no need to modprobe them.

-- 
Rich

Reply via email to