1 |
On Tue, Jan 29, 2019 at 3:15 PM Grant Taylor |
2 |
<gtaylor@×××××××××××××××××××××.net> wrote: |
3 |
> |
4 |
> On 01/29/2019 01:08 PM, Rich Freeman wrote: |
5 |
> |
6 |
> You seem to be focusing on the second kernel that the initramfs execs. |
7 |
> |
8 |
|
9 |
Uh, an initramfs typically does not exec a second kernel. I guess it |
10 |
could, in which case that kernel would need its own initramfs to get |
11 |
around to mounting its root filesystem. Presumably at some point |
12 |
you'd want to have your system stop kexecing kernels and start |
13 |
actually doing something useful... |
14 |
|
15 |
If an initramfs did kexec a second kernel then that initramfs would |
16 |
basically be wiped out along with anything the first kernel did. |
17 |
Unless you're talking about something like Xen a linux kernel |
18 |
generally takes complete control over the system. |
19 |
|
20 |
An initramfs typically loads kernel modules, assuming there are any |
21 |
that need to be loaded. They're loaded by the kernel that was run by |
22 |
grub, and they stay around after the new root/init is pivoted. |
23 |
|
24 |
> The initramfs won't be able to do crap if it doesn't have the device and |
25 |
> file system drives necessary for the initramfs kernel & init scripts to |
26 |
> boot. |
27 |
|
28 |
Sure, and those are in the kernel that runs the initramfs. |
29 |
|
30 |
Remember, it is the kernel that runs the initramfs, not the other way |
31 |
around, though the initramfs might modprobe some modules just as you |
32 |
might do 5 minutes after booting. If those drivers are already |
33 |
built-in to the kernel then there is no need to modprobe them. |
34 |
|
35 |
-- |
36 |
Rich |