From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RBSYH-0005zX-AW for garchives@archives.gentoo.org; Wed, 05 Oct 2011 14:34:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7EF6721C09F; Wed, 5 Oct 2011 14:34:17 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 1845B21C0E1 for ; Wed, 5 Oct 2011 14:33:15 +0000 (UTC) Received: from mail-yx0-f181.google.com ([209.85.213.181]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1RBSX7-002eBB-EI for gentoo-user@lists.gentoo.org; Wed, 05 Oct 2011 21:33:17 +0700 Received: by yxk30 with SMTP id 30so2212619yxk.40 for ; Wed, 05 Oct 2011 07:33:12 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.223.17.219 with SMTP id t27mr3593575faa.123.1317825191311; Wed, 05 Oct 2011 07:33:11 -0700 (PDT) Received: by 10.223.74.196 with HTTP; Wed, 5 Oct 2011 07:33:11 -0700 (PDT) Received: by 10.223.74.196 with HTTP; Wed, 5 Oct 2011 07:33:11 -0700 (PDT) In-Reply-To: References: <4E8AD6C4.7070901@gmail.com> <20111004110746.395635e0@zaphod.digimed.co.uk> Date: Wed, 5 Oct 2011 21:33:11 +0700 Message-ID: Subject: Re: [gentoo-user] Re: Is grub2 stable and who uses it? From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=001517440f6667794204ae8e1620 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: 79786538eea82beff6cb4962c47fda2b --001517440f6667794204ae8e1620 Content-Type: text/plain; charset=UTF-8 On Oct 5, 2011 8:59 PM, "Grant Edwards" wrote: > > On 2011-10-04, Canek Pel??ez Vald??s wrote: > > On Tue, Oct 4, 2011 at 3:14 PM, Grant Edwards wrote: > >> On 2011-10-04, Canek Pel??ez Vald??s wrote: > >>> On Tue, Oct 4, 2011 at 2:24 PM, Grant Edwards < grant.b.edwards@gmail.com> wrote: > >>>> On 2011-10-04, Canek Pel??ez Vald??s 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, --001517440f6667794204ae8e1620 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Oct 5, 2011 8:59 PM, "Grant Edwards" <grant.b.edwards@gmail.com> wrote:
>
> On 2011-10-04, Canek Pel??ez Vald??s <caneko@gmail.com> wrote:
> > On Tue, Oct 4, 2011 at 3:14 PM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> >> On 2011-10-04, Canek Pel??ez Vald??s <caneko@gmail.com> wrote:
> >>> On Tue, Oct 4, 2011 at 2:24 PM, Grant Edwards <grant.b.edwards@gmail.com> wro= te:
> >>>> On 2011-10-04, Canek Pel??ez Vald??s <caneko@gmail.com> wrote:
> >>>>
> >>>>> Then any boot loader will need to call something = to start it.
> >>>>> Understand this: any Linux/Unix init system (syst= emd, SysV, Upstart,
> >>>>> OpenRC) is simply a program... that the Linux ker= nel itself executes.
> >>>>
> >>>> I know. ??What I don't understand is the statemen= t that grub2 calls (or
> >>>> connects to) the init system.
> >>>>
> >>>>> That's the init=3D command line in the kernel= .
> >>>>>
> >>>>> The bootloader calls an operating system. The ini= t system (if at all)
> >>>>> that the OS uses doesn't matter: so if you ha= ve 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 awa= re of the booted
> >>>> OS's init system.
> >>>
> >>> Oh. The configuration file of GRUB2 is autogenerated, and= this means
> >>> that the init=3Dsystemd has to be passed to the kernel li= ne.
> >>>
> >>> In that sense, GRUB2 is "aware" of it.
> >>
> >> So to use grub2 you have to replace the normal "init&quo= t; program that's
> >> started by the kernle as PID#1 with something else?
> >
> > No.
>
> I give up. =C2=A0I'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 o= n 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 porti= on has specified something to be passed to the OS. And that's what it d= oes, without understanding anything about pid#0.

rgds,

--001517440f6667794204ae8e1620--