public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Frank Peters <frank.peters@comcast.net>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] Re: Kernel-3.10 Nvidia Emerge Failure And Other Stuff
Date: Tue, 2 Jul 2013 12:54:54 -0400	[thread overview]
Message-ID: <20130702125454.161f55f908460aedaabf030a@comcast.net> (raw)
In-Reply-To: <pan$ae026$5266269$46413cb2$14043d01@cox.net>

On Tue, 2 Jul 2013 11:29:47 +0000 (UTC)
Duncan <1i5t5.duncan@cox.net> wrote:

> > 
> > First, there is a new kernel option called "Kernel support for scripts
> > starting with #!." 
> >

> And no, as you found out it's *NOT* initramfs-only.  It's basic kernel 
> functionality that been assumed for (I guess) decades now.

> 
> But as you may have noticed, openrc, gentoo's default init system, uses 
> #!/sbin/runscript to point to runscript (part of openrc), as its script 
> interpreter, and it may well be that turning off kernel shebang support 
> screwed you up that way.
> 

I am entirely sure what is happening with this kernel "#!" option.

My boot scripts are very simple and customized for my specific machine
(as opposed to having a complex set of highly generalized scripts that
attempt to account for every possible situation).

Basically, once the kernel loads itself, it invokes the init binary
which then uses parameters in /etc/inittab to invoke appropriate
scripts (or other binaries).  From my inittab, only a single
bash script is called for system initialization and this bash script
runs just fine _without_ the kernel "#!" option.

However, after this bash initialization script executes, the console
login process then begins.  My inittab contains this line for login:

agetty -n -l /sbin/autologin 38400 tty1

Now /sbin/autologin is another bash script and it is *only at this point*
that the boot fails to complete without the kernel "#!" option.
IOW, my bash boot scripts succeed but the bash autologin script
fails w/o the kernel "#!" option.

I suspect, although I have not tested it, that if I substitute a normal
binary login (i.e. /bin/login) for the bash /sbin/autologin then
the boot will be completely successful w/o the kernel "#!" option.

So what does the "#!" option accomplish?  Does it allow the kernel to
effect redirection based on "#!?"  This should only be necessary if
bash itself is not invoked, but in boot-up based on init and inittab,
bash, I believe, is automatically invoked for all scripts.  But yet
the agetty program, after boot-up is essentially complete, fails
to execute the bash script in its parameter list.  At this point is
it agetty, or the kernel, that is responsible for executing the
autologin script?

I need to study this more.

Frank Peters



  reply	other threads:[~2013-07-02 16:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 19:35 [gentoo-amd64] Kernel-3.10 Nvidia Emerge Failure And Other Stuff Frank Peters
2013-07-01 19:51 ` Mark Knecht
2013-07-01 20:04   ` Dale
2013-07-02  0:57     ` B Vance
2013-07-02  0:38       ` Frank Peters
2013-07-01 20:30   ` Mark Knecht
2013-07-01 20:51     ` Rich Freeman
2013-07-04 23:57     ` Mark Knecht
2013-07-05  1:08       ` Frank Peters
2013-07-01 21:06   ` Frank Peters
2013-07-02 11:29 ` [gentoo-amd64] " Duncan
2013-07-02 16:54   ` Frank Peters [this message]
2013-07-03  2:10     ` Duncan
2013-07-04 23:48 ` Sven Köhler
2013-07-05  1:28   ` Frank Peters
2013-07-05 16:41     ` Sven Köhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130702125454.161f55f908460aedaabf030a@comcast.net \
    --to=frank.peters@comcast.net \
    --cc=gentoo-amd64@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox