All of lore.kernel.org
 help / color / mirror / Atom feed
* Loosing stdin/stdout over serial consoleafter bootup
@ 2014-09-08 22:30 Mandeep Sandhu
  2014-09-09  0:07 ` Mandeep Sandhu
  0 siblings, 1 reply; 6+ messages in thread
From: Mandeep Sandhu @ 2014-09-08 22:30 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I'm having a strange problem of loosing stdout output over serial console.

I'm booting a kernel (3.14.16) on a x86_64 based board with a serial
port. The board has Grub and Linux (with a minimal initrd) installed
on a SATA HDD and starts linux with the following cmdline parameters
from GRUB:

console=tty0 console=ttyS0,115200n8 init=/bin/bash

Grub loads the kernel fine and I can see the various debug messages on minicom.

However, once the kernel starts init (i.e bash), I stop seeing any
output. There's no error, no crash anywhere. It just looks like the
stdin/stdout of the application (in this case bash) is not connected
to the serial console.

I'm sure it's a config issue, but I can't fathom what I need to
change? Any hints?

Thanks,
-mandeep

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Loosing stdin/stdout over serial consoleafter bootup
  2014-09-08 22:30 Loosing stdin/stdout over serial consoleafter bootup Mandeep Sandhu
@ 2014-09-09  0:07 ` Mandeep Sandhu
  2014-09-09  5:37   ` Sudip Mukherjee
  0 siblings, 1 reply; 6+ messages in thread
From: Mandeep Sandhu @ 2014-09-09  0:07 UTC (permalink / raw)
  To: kernelnewbies

Anyone?

On Mon, Sep 8, 2014 at 3:30 PM, Mandeep Sandhu
<mandeepsandhu.chd@gmail.com> wrote:
> Hi All,
>
> I'm having a strange problem of loosing stdout output over serial console.
>
> I'm booting a kernel (3.14.16) on a x86_64 based board with a serial
> port. The board has Grub and Linux (with a minimal initrd) installed
> on a SATA HDD and starts linux with the following cmdline parameters
> from GRUB:
>
> console=tty0 console=ttyS0,115200n8 init=/bin/bash
>
> Grub loads the kernel fine and I can see the various debug messages on minicom.
>
> However, once the kernel starts init (i.e bash), I stop seeing any
> output. There's no error, no crash anywhere. It just looks like the
> stdin/stdout of the application (in this case bash) is not connected
> to the serial console.
>
> I'm sure it's a config issue, but I can't fathom what I need to
> change? Any hints?
>
> Thanks,
> -mandeep

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Loosing stdin/stdout over serial consoleafter bootup
  2014-09-09  0:07 ` Mandeep Sandhu
@ 2014-09-09  5:37   ` Sudip Mukherjee
  2014-09-09 16:47     ` Mandeep Sandhu
  0 siblings, 1 reply; 6+ messages in thread
From: Sudip Mukherjee @ 2014-09-09  5:37 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 9, 2014 at 5:37 AM, Mandeep Sandhu
<mandeepsandhu.chd@gmail.com> wrote:
> Anyone?

are you really seriously expecting an answer within 2 hours of posting
your question, and that too a question not related to any kernel
problem ?

>
> On Mon, Sep 8, 2014 at 3:30 PM, Mandeep Sandhu
> <mandeepsandhu.chd@gmail.com> wrote:
>> Hi All,
>>
>> I'm having a strange problem of loosing stdout output over serial console.
>>
>> I'm booting a kernel (3.14.16) on a x86_64 based board with a serial
>> port. The board has Grub and Linux (with a minimal initrd) installed
>> on a SATA HDD and starts linux with the following cmdline parameters
>> from GRUB:
>>
>> console=tty0 console=ttyS0,115200n8 init=/bin/bash
>>
>> Grub loads the kernel fine and I can see the various debug messages on minicom.
>>
>> However, once the kernel starts init (i.e bash), I stop seeing any
>> output. There's no error, no crash anywhere. It just looks like the
>> stdin/stdout of the application (in this case bash) is not connected
>> to the serial console.

this is a configuration issue . check if you have a file /etc/inittab .
usually the setting will be there - but it again depends on the
filesystem you are using.

thanks
sudip

>>
>> I'm sure it's a config issue, but I can't fathom what I need to
>> change? Any hints?
>>
>> Thanks,
>> -mandeep
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Loosing stdin/stdout over serial consoleafter bootup
  2014-09-09  5:37   ` Sudip Mukherjee
@ 2014-09-09 16:47     ` Mandeep Sandhu
  2014-09-10  5:39       ` Sudip Mukherjee
  0 siblings, 1 reply; 6+ messages in thread
From: Mandeep Sandhu @ 2014-09-09 16:47 UTC (permalink / raw)
  To: kernelnewbies

>
> are you really seriously expecting an answer within 2 hours of posting
> your question, and that too a question not related to any kernel
> problem ?

And how are you so sure about that? It could very well be an incorrect
kernel command line or a missing config in the kernel. So don't jump
to conclusions.

>>> However, once the kernel starts init (i.e bash), I stop seeing any
>>> output. There's no error, no crash anywhere. It just looks like the
>>> stdin/stdout of the application (in this case bash) is not connected
>>> to the serial console.
>
> this is a configuration issue . check if you have a file /etc/inittab .
> usually the setting will be there - but it again depends on the
> filesystem you are using.

This is a busybox build and it's spawning a shell on startup:

::askfirst:-/bin/onie-console

Where onie-console is:

cat bin/onie-console
#!/bin/sh

cat /etc/issue
exec /bin/sh -l

This is being run from the initrd image.

And how is this related to the filesystem?

Thanks for your time.

Regards,
-mandeep

>
> thanks
> sudip
>
>>>
>>> I'm sure it's a config issue, but I can't fathom what I need to
>>> change? Any hints?
>>>
>>> Thanks,
>>> -mandeep
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Loosing stdin/stdout over serial consoleafter bootup
  2014-09-09 16:47     ` Mandeep Sandhu
@ 2014-09-10  5:39       ` Sudip Mukherjee
  2014-09-10 17:53         ` Mandeep Sandhu
  0 siblings, 1 reply; 6+ messages in thread
From: Sudip Mukherjee @ 2014-09-10  5:39 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 9, 2014 at 10:17 PM, Mandeep Sandhu
<mandeepsandhu.chd@gmail.com> wrote:
>>
>> are you really seriously expecting an answer within 2 hours of posting
>> your question, and that too a question not related to any kernel
>> problem ?
>
> And how are you so sure about that? It could very well be an incorrect
> kernel command line or a missing config in the kernel. So don't jump
> to conclusions.
>

according to my understanding if it was a problem of kernel command
line or a missing config in the kernel , then you wont have got the
output while booting. but since you are getting the output while
booting and the output stops once the control is handed over to your
bash, that implies it is something with the configuration.
ofcourse i can be wrong , but if i was in your position now , i would
have looked at configuration for busybox compilation.

>>>> However, once the kernel starts init (i.e bash), I stop seeing any
>>>> output. There's no error, no crash anywhere. It just looks like the
>>>> stdin/stdout of the application (in this case bash) is not connected
>>>> to the serial console.
>>
>> this is a configuration issue . check if you have a file /etc/inittab .
>> usually the setting will be there - but it again depends on the
>> filesystem you are using.
>
> This is a busybox build and it's spawning a shell on startup:
>
> ::askfirst:-/bin/onie-console
>
> Where onie-console is:
>
> cat bin/onie-console
> #!/bin/sh
>
> cat /etc/issue
> exec /bin/sh -l
>
> This is being run from the initrd image.
>
> And how is this related to the filesystem?
>

i said about filesystem , because you have not mentioned in your first
mail that you are running busybox. you mentioned x86 board and bash ,
so it could have been any linux distribution .

thanks
sudip


> Thanks for your time.
>
> Regards,
> -mandeep
>
>>
>> thanks
>> sudip
>>
>>>>
>>>> I'm sure it's a config issue, but I can't fathom what I need to
>>>> change? Any hints?
>>>>
>>>> Thanks,
>>>> -mandeep
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Loosing stdin/stdout over serial consoleafter bootup
  2014-09-10  5:39       ` Sudip Mukherjee
@ 2014-09-10 17:53         ` Mandeep Sandhu
  0 siblings, 0 replies; 6+ messages in thread
From: Mandeep Sandhu @ 2014-09-10 17:53 UTC (permalink / raw)
  To: kernelnewbies

>
> according to my understanding if it was a problem of kernel command
> line or a missing config in the kernel , then you wont have got the
> output while booting. but since you are getting the output while
> booting and the output stops once the control is handed over to your
> bash, that implies it is something with the configuration.

Well, my problem is that the 'controlling tty' is somehow NOT the
serial console even if I boot the kernel with console=ttyS0,115200n.
So thats why I was wondering if there some kernel config that could
change that or help me debug it further.

Could be a misbehaving BIOS too. Don't know for sure.

> ofcourse i can be wrong , but if i was in your position now , i would
> have looked at configuration for busybox compilation.

Yeah, thats were I'm poking around right now. Busybox's inittab has a
slightly different interpretation of the commands (eg: the id field is
interpreted as a terminal console (tty0/ttyS0 etc)).

I also suspect the board's BIOS of playing foul. Although I've no idea
how or why.

>
> i said about filesystem , because you have not mentioned in your first
> mail that you are running busybox. you mentioned x86 board and bash ,
> so it could have been any linux distribution .

Busybox can run off a filesystem too. Although if there was some error
mounting the rootfs I guess I should've seen some error from the
kernel?

Thanks for your time!

Regards,
-mandeep

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-10 17:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 22:30 Loosing stdin/stdout over serial consoleafter bootup Mandeep Sandhu
2014-09-09  0:07 ` Mandeep Sandhu
2014-09-09  5:37   ` Sudip Mukherjee
2014-09-09 16:47     ` Mandeep Sandhu
2014-09-10  5:39       ` Sudip Mukherjee
2014-09-10 17:53         ` Mandeep Sandhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.