Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Serial console to RHEL6 on Dell R310?

766 views
Skip to first unread message

Jeremiah DeWitt Weiner

unread,
Jun 13, 2011, 5:19:16 PM6/13/11
to
I'm trying to set up a new server so I can get to a serial console
on it. The server is a Dell PowerEdge R310, and the OS is Red Hat
Enterprise Linux 6. The problem is that no matter what I do, I'm unable
to get a login prompt on the serial line, from a remote machine running
minicom.

I tried following these directions:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Technical_Notes/deployment.html
No dice. (It should be noted that /etc/serial/init.conf suggests a
different approach.)

I tried manually starting an agetty on the serial port. No luck -
it would run, but I couldn't get a login prompt on the remote machine.

I tried setting kernel arguments in grub as described here:
http://www.dell.com/content/topics/global.aspx/power/en/ps1q03_stanton?c=us&cs=555&l=en&s=biz
No luck. The agetty is running, but I'm still unable to connect.
I tried turning SELinux off, in case that had something to do with it.
I tried setting a serial console in grub. Nothing worked. No output on
the serial console.

I know the cable and remote machine are good, because I can use
minicom and that cable to connect to the console port of a network
switch, and that works fine. I know the serial port itself works
because I can use it to connect _out_ to a network switch. So what the
hell is going on? Any suggestions much appreciated...


--
Oh to have a lodge in some vast wilderness. Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper, 1731 - 1800

Tim Watts

unread,
Jun 13, 2011, 6:45:54 PM6/13/11
to
Jeremiah DeWitt Weiner wrote:

> I'm trying to set up a new server so I can get to a serial console
> on it. The server is a Dell PowerEdge R310, and the OS is Red Hat
> Enterprise Linux 6. The problem is that no matter what I do, I'm unable
> to get a login prompt on the serial line, from a remote machine running
> minicom.
>
> I tried following these directions:
> http://docs.redhat.com/docs/en-
US/Red_Hat_Enterprise_Linux/6/html/Technical_Notes/deployment.html
> No dice. (It should be noted that /etc/serial/init.conf suggests a
> different approach.)
>
> I tried manually starting an agetty on the serial port. No luck -
> it would run, but I couldn't get a login prompt on the remote machine.
>
> I tried setting kernel arguments in grub as described here:
>
http://www.dell.com/content/topics/global.aspx/power/en/ps1q03_stanton?c=us&cs=555&l=en&s=biz
> No luck. The agetty is running, but I'm still unable to connect.
> I tried turning SELinux off, in case that had something to do with it.
> I tried setting a serial console in grub. Nothing worked. No output on
> the serial console.
>
> I know the cable and remote machine are good, because I can use
> minicom and that cable to connect to the console port of a network
> switch, and that works fine. I know the serial port itself works
> because I can use it to connect _out_ to a network switch. So what the
> hell is going on? Any suggestions much appreciated...
>
>

Couple of things:

Has linux (well, udev) made you a /dev/ttyS0 or /dev/ttyS1 device?

Next I'd try

bash < /dev/ttyS0 > /dev/ttyS0 2>&1

and see if there's life at the other end.

stty -a < /dev/ttyS0

should give you the current serial config.

Lack of grub rules out SElinux - it seems to be something a little more
fundamental.

--
Tim Watts

Todd

unread,
Jun 13, 2011, 11:51:42 PM6/13/11
to
On 06/13/2011 02:19 PM, Jeremiah DeWitt Weiner wrote:
> I'm trying to set up a new server so I can get to a serial console
> on it. The server is a Dell PowerEdge R310, and the OS is Red Hat
> Enterprise Linux 6. The problem is that no matter what I do, I'm unable
> to get a login prompt on the serial line, from a remote machine running
> minicom.
>
> I tried following these directions:
> http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Technical_Notes/deployment.html
> No dice. (It should be noted that /etc/serial/init.conf suggests a
> different approach.)
>
> I tried manually starting an agetty on the serial port. No luck -
> it would run, but I couldn't get a login prompt on the remote machine.
>
> I tried setting kernel arguments in grub as described here:
> http://www.dell.com/content/topics/global.aspx/power/en/ps1q03_stanton?c=us&cs=555&l=en&s=biz
> No luck. The agetty is running, but I'm still unable to connect.
> I tried turning SELinux off, in case that had something to do with it.
> I tried setting a serial console in grub. Nothing worked. No output on
> the serial console.
>
> I know the cable and remote machine are good, because I can use
> minicom and that cable to connect to the console port of a network
> switch, and that works fine. I know the serial port itself works
> because I can use it to connect _out_ to a network switch. So what the
> hell is going on? Any suggestions much appreciated...
>
>

Hi Jeremiah,

I am going to be of little help here. Sorry. Mainly
just moral support.

I did this on Solaris about 20 years ago and have little
memory of what I did. Somewhere in the back of my head,
I remember you had to configure /etc/inittab with
a respawn on your serial ports.

The following is my inittab HylaFax respawn on my six serial
ports:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Sorry for not being more help. Would love to
know what you eventually come up with.

-T

The Natural Philosopher

unread,
Jun 14, 2011, 6:04:11 AM6/14/11
to

yebbut its changed a bit on RHEL 6.

From years of doing this but years ago, the fiorst step is to put
something on the port itself like an old modem, and see if you can 'cu'
to it.

If that works its then down to getting a getty to respawn on the port
via whatver convoluted reinvented wheel the thing has, and, if you want
to login as root, making sure its got the privileges to do that.

Doug Freyburger

unread,
Jun 14, 2011, 10:32:11 AM6/14/11
to
Todd wrote:
>
> I did this on Solaris about 20 years ago and have little
> memory of what I did. Somewhere in the back of my head,
> I remember you had to configure /etc/inittab with
> a respawn on your serial ports.

On Solaris one of the problems was modem settings on serial lines.
Since Linux boxes tend to have their console on KVM I have not needed to
do much serial line debugging on Linux boxes. Typically a crash cart
with a laptop running Hyperterm is available and it works when it is
plugged in.

Tim Watts already posted the starting point to debug modem settings,
parity and baud rates on serial lines:

Jeremiah DeWitt Weiner

unread,
Jun 14, 2011, 11:37:08 AM6/14/11
to
Tim Watts <t...@dionic.net> wrote:
> Has linux (well, udev) made you a /dev/ttyS0 or /dev/ttyS1 device?

Yes, the devices are there.

crw-------. 1 root root 4, 64 Jun 13 17:20 /dev/ttyS0
crw-------. 1 root root 4, 65 Jun 13 17:18 /dev/ttyS1


> Next I'd try
> bash < /dev/ttyS0 > /dev/ttyS0 2>&1
> and see if there's life at the other end.

Nothing there. The agetty is running -
PID TTY STAT TIME COMMAND
1650 ttyS0 Ss+ 0:00 /sbin/agetty /dev/ttyS0 9600 vt100-nav
- but I get nothing back when running that shell.


> stty -a < /dev/ttyS0
> should give you the current serial config.

That looks OK...not going to retype the whole thing, but:
speed 9600 baud; rows 0; columns 0; line = 0;
- the rest looks pretty normal.

Now here is the really weird thing...connecting ttyS0 on the target
server to the console port of one of our network switches (with the getty
still running on the server!) and running minicom, I hit Enter a couple
times and see:

ServerIronADX 1000>
ServerIronADX 1000>Red Hat Enterprise Linux Server release 6.1 (Santiago)
Invalid input

and then further intermixed switch login prompts, server login prompts,
and error messages from both devices. So the server _is_ outputting a
login prompt on the serial console! But then why doesn't it show up
anywhere else? This is breaking my brain. All I can think of is that
there's some misconfiguration somewhere, but some of the hardware is
also doing some autocorrection or something...crazy, but I'm kind of out
of other ideas.

Tauno Voipio

unread,
Jun 14, 2011, 1:25:10 PM6/14/11
to

The switch serial port is configured as a DCE (modem), and the
computer serial port is configured as a DTE, and I guess that your
cable is a straight cable.

You need a null-modem cable.

--

Tauno Voipio

Bill Marcum

unread,
Jun 14, 2011, 4:20:58 PM6/14/11
to
Are you running minicom on the same port that getty is running on? Run it
through a null modem cable to another port or another machine. Depending
what you're using as a serial terminal, maybe you can use pppd instead.


--
Linux and Windows both win.
Best Documentary Feature: March of the Penguins
Best Picture: Crash

Jeremiah DeWitt Weiner

unread,
Jun 16, 2011, 3:35:11 PM6/16/11
to
Tauno Voipio <tauno....@notused.fi.invalid> wrote:
> The switch serial port is configured as a DCE (modem), and the
> computer serial port is configured as a DTE, and I guess that your
> cable is a straight cable.

> You need a null-modem cable.

You know, I bet that that's it...it's been a long time since I had
to think about serial communications! I'll try and get my hands on a
null-modem cable and see if that does it. Thanks for the advice -

Nico Kadel-Garcia

unread,
Jun 29, 2011, 7:49:31 AM6/29/11
to
Away from the group for a while: did this ever get solved?

There are some other possibilities: some rotten motherboards *ignored* serial port settings and would automatically set them 115 KBaud, much to my dismay, no matter what you did. Another is that "null modem cable" issue, for which one of those little serial port LED monitors from Radio Shack is preciseless to debug.

Another is that a lot of hand-made serial cables are complete crap and ignore the RS-232 spec in more ways that I can think of. (This is why I used to always buy my cables from Yankee, which was good about labeling and didn't just say "searial")

Another is to connect a real modem and install and use HylaFAX for debugging purposes. Written by Sam Leffler, one of the BSD authors, it was my delight to do some early Linux and SunOS porting work with that. The "faxaddmodem" tool is one of the best serial probing software tools I've run into.

0 new messages