1 |
On Oct 5, 2011 8:59 PM, "Grant Edwards" <grant.b.edwards@×××××.com> wrote: |
2 |
> |
3 |
> On 2011-10-04, Canek Pel??ez Vald??s <caneko@×××××.com> wrote: |
4 |
> > On Tue, Oct 4, 2011 at 3:14 PM, Grant Edwards <grant.b.edwards@×××××.com> |
5 |
wrote: |
6 |
> >> On 2011-10-04, Canek Pel??ez Vald??s <caneko@×××××.com> wrote: |
7 |
> >>> On Tue, Oct 4, 2011 at 2:24 PM, Grant Edwards < |
8 |
grant.b.edwards@×××××.com> wrote: |
9 |
> >>>> On 2011-10-04, Canek Pel??ez Vald??s <caneko@×××××.com> wrote: |
10 |
> >>>> |
11 |
> >>>>> Then any boot loader will need to call something to start it. |
12 |
> >>>>> Understand this: any Linux/Unix init system (systemd, SysV, Upstart, |
13 |
> >>>>> OpenRC) is simply a program... that the Linux kernel itself |
14 |
executes. |
15 |
> >>>> |
16 |
> >>>> I know. ??What I don't understand is the statement that grub2 calls |
17 |
(or |
18 |
> >>>> connects to) the init system. |
19 |
> >>>> |
20 |
> >>>>> That's the init= command line in the kernel. |
21 |
> >>>>> |
22 |
> >>>>> The bootloader calls an operating system. The init system (if at |
23 |
all) |
24 |
> >>>>> that the OS uses doesn't matter: so if you have an operating system, |
25 |
> >>>>> any bootloader should be able to boot it (bearing things like being |
26 |
> >>>>> able to understand the filesystem etc.) |
27 |
> >>>> |
28 |
> >>>> I know how bootloaders like LILO and grub-legacy work. ??What I don't |
29 |
> >>>> understand is the statement that grub2 is somehow aware of the booted |
30 |
> >>>> OS's init system. |
31 |
> >>> |
32 |
> >>> Oh. The configuration file of GRUB2 is autogenerated, and this means |
33 |
> >>> that the init=systemd has to be passed to the kernel line. |
34 |
> >>> |
35 |
> >>> In that sense, GRUB2 is "aware" of it. |
36 |
> >> |
37 |
> >> So to use grub2 you have to replace the normal "init" program that's |
38 |
> >> started by the kernle as PID#1 with something else? |
39 |
> > |
40 |
> > No. |
41 |
> |
42 |
> I give up. I've absolutely no idea what grub2 has to do with the OS's |
43 |
> init system, and none of what you've written makes any sense to me. |
44 |
|
45 |
I think what he meant was: |
46 |
|
47 |
The *installer* portion of grub2 is aware of which pid#0 is running when it |
48 |
auto-creates the bootloader's configuration. That pid#0 is passed on to the |
49 |
kernel by the bootloader. |
50 |
|
51 |
The *bootloader* portion of grub2 don't know and don't care what is being |
52 |
used as pid#0 by the OS. All it knows is that the installer portion has |
53 |
specified something to be passed to the OS. And that's what it does, without |
54 |
understanding anything about pid#0. |
55 |
|
56 |
rgds, |