Loosing stdin/stdout over serial consoleafter bootup
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
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
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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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
participants (2)
-
Mandeep Sandhu -
Sudip Mukherjee