On Oct 5, 2011 8:59 PM, "Grant Edwards" <grant.b.edwa...@gmail.com> wrote:
>
> On 2011-10-04, Canek Pel??ez Vald??s <can...@gmail.com> wrote:
> > On Tue, Oct 4, 2011 at 3:14 PM, Grant Edwards <grant.b.edwa...@gmail.com>
wrote:
> >> On 2011-10-04, Canek Pel??ez Vald??s <can...@gmail.com> wrote:
> >>> On Tue, Oct 4, 2011 at 2:24 PM, Grant Edwards <
grant.b.edwa...@gmail.com> wrote:
> >>>> On 2011-10-04, Canek Pel??ez Vald??s <can...@gmail.com> wrote:
> >>>>
> >>>>> Then any boot loader will need to call something to start it.
> >>>>> Understand this: any Linux/Unix init system (systemd, SysV, Upstart,
> >>>>> OpenRC) is simply a program... that the Linux kernel itself
executes.
> >>>>
> >>>> I know. ??What I don't understand is the statement that grub2 calls
(or
> >>>> connects to) the init system.
> >>>>
> >>>>> That's the init= command line in the kernel.
> >>>>>
> >>>>> The bootloader calls an operating system. The init system (if at
all)
> >>>>> that the OS uses doesn't matter: so if you have an operating system,
> >>>>> any bootloader should be able to boot it (bearing things like being
> >>>>> able to understand the filesystem etc.)
> >>>>
> >>>> I know how bootloaders like LILO and grub-legacy work. ??What I don't
> >>>> understand is the statement that grub2 is somehow aware of the booted
> >>>> OS's init system.
> >>>
> >>> Oh. The configuration file of GRUB2 is autogenerated, and this means
> >>> that the init=systemd has to be passed to the kernel line.
> >>>
> >>> In that sense, GRUB2 is "aware" of it.
> >>
> >> So to use grub2 you have to replace the normal "init" program that's
> >> started by the kernle as PID#1 with something else?
> >
> > No.
>
> I give up.  I've absolutely no idea what grub2 has to do with the OS's
> init system, and none of what you've written makes any sense to me.

I think what he meant was:

The *installer* portion of grub2 is aware of which pid#0 is running when it
auto-creates the bootloader's configuration. That pid#0 is passed on to the
kernel by the bootloader.

The *bootloader* portion of grub2 don't know and don't care what is being
used as pid#0 by the OS. All it knows is that the installer portion has
specified something to be passed to the OS. And that's what it does, without
understanding anything about pid#0.

rgds,

Reply via email to