WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Serial Port console with syslinux question?  (Read 14675 times)

Offline killthebabysitter

  • Newbie
  • *
  • Posts: 10
Serial Port console with syslinux question?
« on: August 09, 2011, 03:22:52 PM »
I'm trying to create a boot setup that can redirect the console output the serial port for debugging purposes.

I've managed to get it so that the
SYSLINUX 4.01 0x4c3de821  Copyright (C) 1994-2010 H. Peter Anvin et al
Loading /boot/bzImage.....
etc... all print to the serial console rather than the vga monitor, but the login is still printed to the vga instead.

Currently this is my extlinux.conf
SERIAL 0 115200
DEFAULT tinycore
LABEL tinycore
KERNEL /boot/bzImage
APPEND initrd=/boot/tinycore.gz quiet text nodhcp tce=UUID="f0cdd75c-71e4-41a9-8e9c-ed457e74cda5" console=ttyS0,115200

Can someone help me figure out what else I need to change to make the login go to ttyS0?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Serial Port console with syslinux question?
« Reply #1 on: August 09, 2011, 03:45:01 PM »
That'd be /etc/inittab. IIRC you also need to change the getty, there's been threads on this.
The only barriers that can stop you are the ones you create yourself.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Serial Port console with syslinux question?
« Reply #2 on: August 09, 2011, 03:46:21 PM »
Look at your /etc/inittab file. You need to specify a serial port here, as explained on this page which uses agetty from util-linux-ng.tcz, although getty is reported to work in these posts:

Login at /dev/ttyS0

local root login
« Last Edit: August 09, 2011, 03:50:56 PM by danielibarnes »

Offline killthebabysitter

  • Newbie
  • *
  • Posts: 10
Re: Serial Port console with syslinux question?
« Reply #3 on: August 09, 2011, 04:42:44 PM »
Thanks for the help:

Here's the steps I took to get it working.

extlinux.conf now looks like this
Code: [Select]
SERIAL 0 115200
DEFAULT tinycore
LABEL tinycore
KERNEL /boot/bzImage
APPEND initrd=/boot/tinycore.gz quiet text  waitusb=5:UUID="f0cdd75c-71e4-41a9-8e9c-ed457e74cda5" tce=UUID="f0cdd75c-71e4-41a9-8e9c-ed457e74cda5" console=ttyS0,115200

I then decompressed tinycore.gz
Code: [Select]
mkdir file_system
cd file_system
zcat ../boot/tinycore.gz | sudo cpio -i -H newc -d

Then I changed /etc/inittab to the following
Code: [Select]
# /etc/inittab: init configuration for busybox init.
# Boot-time system configuration/initialization script.
#
::sysinit:/etc/init.d/rcS

# /sbin/getty respawn shell invocations for selected ttys.
tty1::respawn:/sbin/rungetty tty1 --autologin root
#tty2::respawn:/sbin/getty 38400 tty2
#tty3::respawn:/sbin/getty 38400 tty3
#tty4::respawn:/sbin/getty 38400 tty4
#tty5::respawn:/sbin/getty 38400 tty5
#tty6::respawn:/sbin/getty 38400 tty6

ttyS0::respawn:/sbin/getty 115200 ttyS0

# Stuff to do when restarting the init
# process, or before rebooting.
::restart:/etc/init.d/rc.shutdown
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/rc.shutdown

And changed /etc/securetty to
Code: [Select]
# /etc/securetty: List of terminals on which root is allowed to login.
#
console

# For people with serial port consoles
ttyS0

# Standard consoles
tty1
tty2
tty3
tty4
tty5
tty6
tty7

Then recompressed with
Code: [Select]
cd file_system
find | sudo cpio -o -H newc | gzip -2 > ../boot/tinycore.gz

Thanks for the help guys.


Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: Serial Port console with syslinux question?
« Reply #4 on: September 02, 2011, 11:02:01 PM »
Thank you for the quick refresher.  I use 9600 for speed out of compatibility with other devices.