Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] debugging inittab
Date: Fri, 23 Aug 2013 01:36:22 +0200	[thread overview]
Message-ID: <5216A076.5030409@mind.be> (raw)
In-Reply-To: <2DD0B9C711CDFC45A3A266C78966CE7F451F39A0@G4W3291.americas.hpqcorp.net>

On 22/08/13 22:11, Jenkins, Lee (ISS Houston) wrote:
> Hello. I am debugging a boot problem for a few hours. I?m clearly in over
> my head and I could use some insight.
>
> For debugging purposes, I am booting from a kernel and rootfs on an nfs
> share of my dev machine. The console is ttyS0.

  The nfs-share is an extracted output/images/rootfs.tar, right? You're 
not using the target directory?

  Is busybox setuid root? Is the nfs not exported with rootsquash and such?


> The kernel boots and rootfs is mounted and the scripts in /etc/init.d are
> executed. The kernel messages and startup script messages appear on the tty.
>
> The problem is that right after the init.d scripts this message appears:
> ?can?t open /dev/ttyS0: Permission denied?. This message is repeated in
> an infinite loop.
>
> If I boot with the kernel argument ?init=/bin/sh? then the init is
> bypassed and the system boots OK. So the problem is definitely in the init.
>
> I?m new to debugging init-time and I cannot even figure out who is
> printing this message.
>
> The error message sounds like a permissions problem, so I added a hack
> script /etc/init.d/S99chmod, which does chmod 777 /dev/ttyS0 and then ls
> to show the result. The chmod works but the error still occurs.
>
> Then I thought maybe getty was having trouble opening ttyS0, so I wrote a
> ?wrapper? script called getty.shell to print a debug message and then
> modified the entry in inittab like this:
>
> # Put a getty on the serial port
>
> ttyS0::respawn:/sbin/getty.shell -L ttyS0 115200 vt100 # GENERIC_SERIAL
>
> It doesn?t look like the wrapper script is ever called because the debug
> message never appears.
>
> So, any ideas? What happens between /etc/init.d and /sbin/getty?

  The ttyS0 at the beginning of the line instructs (busybox) init to send 
the stderr/stdout of the process that is started to /dev/ttyS0. But the 
process is never started, because init cannot open /dev/ttyS0.

  You can try removing that, just start the line with ::


  Regards,
  Arnout

>
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2013-08-22 23:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 20:11 [Buildroot] debugging inittab Jenkins, Lee
2013-08-22 23:36 ` Arnout Vandecappelle [this message]
2013-08-27 22:38   ` Jenkins, Lee
2013-08-29  5:17     ` Arnout Vandecappelle
2013-08-29  7:29       ` Peter Korsgaard
2013-08-29  7:39         ` Arnout Vandecappelle
2013-08-29  8:45           ` Peter Korsgaard
2013-08-29  8:31       ` Thomas Petazzoni
2013-08-29 10:14         ` Peter Korsgaard

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=5216A076.5030409@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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