Skip to contentSkip to conversation

Serial Terminal - Can't get getty to run via inittab

DISCUSSION Chris DiTrani 5 participants 8 messages Apr 3, 2007 – Apr 5, 2007

lore
Share & tools
lore
#0 lore raw

I'm trying to get a headless Fedora 6 box working with a serial terminal on com1. I've got grub set up so that kernel output goes to the terminal, and I've added this line to my inittab:

s0:345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

but agetty is not being run.

If I run agetty with this same command line explicitly (from a prompt), then the terminal gets a login prompt and I can login fine, so it seems to just be a matter of getting init to run agetty.

I've read several how-tos on this but no joy. I've also tried mgetty with the same results.

Any ideas?

TIA.

#1 lore raw

... ciao:

: on "4-3-2007" "Chris DiTrani" writ:
: Fedora 6 box working with a serial terminal on com1

first. i 'think' i recall having seen something about that in the
kernel config stuff.

and, apropos offered 'setconsole' ...

Signature · 2 lines
... i'm a man, but i can change,
    if i have to , i guess ...
#2 lore raw
In reply to Chris DiTrani
Quoted 8 lines · Chris DiTrani

I'm trying to get a headless Fedora 6 box working with a serial terminal on com1. I've got grub set up so that kernel output goes to the terminal, and I've added this line to my inittab:

s0:345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

but agetty is not being run.

Quoted 8 lines

If I run agetty with this same command line explicitly (from a prompt), then the terminal gets a login prompt and I can login fine, so it seems to just be a matter of getting init to run agetty.

I've read several how-tos on this but no joy. I've also tried mgetty with the same results.

Any ideas?

Are you entering runlevel 3, 4 or 5? If you're booting into single-user mode, the above won't be run. If you want to use the terminal in single-user mode, you need to change 345 to 12345.

Is there anything in the log files? If agetty is being run but is terminating immediately, init will normally log an error.

Signature · 1 line
Glynn Clements <[email protected]>
#3 lore raw
Quoted 4 lines · Glynn Clements

Are you entering runlevel 3, 4 or 5? If you're booting into single-user mode, the above won't be run. If you want to use the terminal in single-user mode, you need to change 345 to 12345.

Running at level 3.

Quoted 4 lines

Is there anything in the log files? If agetty is being run but is terminating immediately, init will normally log an error.

No errors nor complaints from init in the logs.

Chris

#4 lore raw

So, two strange things that are probably clues:

1. I can change my inittab line to reference some non-existent executable (foo) instead of agetty, and init doesn't make any complaint to syslog after a 'init q'. It does log that it's reloading inittab, but nothing else. If I mess with the inittab syntax or command set (e.g. replacing 'respawn' with 'espawn', it also complains to syslog, but nothing logs for telling it to run a bogus program.

2. I've got no mingetty processes running on this machine either. I should have an instance for each of my virtual terminals. Maybe this is because there's not keyboard/mouse/monitor plugged in?

CD

#5 lore raw
In reply to Chris DiTrani
Quoted 7 lines · Chris DiTrani

I'm trying to get a headless Fedora 6 box working with a serial terminal on com1. I've got grub set up so that kernel output goes to the terminal, and I've added this line to my inittab:

s0:345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

but agetty is not being run.

[...]
your line say it will run on levels 3, 4 and 5

Quoted 1 line

Any ideas?

what is your initdefault ? mine is 2.

Quoted 3 lines

TIA.
-

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Chris DiTrani

So it turns out I was starting a script-based service in rc.local without sending it to the background with '&', so the last bit of the init process wasn't happening.

Haven't been this stumped by something this stupid in a while...

CD

Quoted 22 lines · Chris DiTrani

I'm trying to get a headless Fedora 6 box working with a serial terminal on com1. I've got grub set up so that kernel output goes to the terminal, and I've added this line to my inittab:

s0:345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

but agetty is not being run.

If I run agetty with this same command line explicitly (from a prompt), then the terminal gets a login prompt and I can login fine, so it seems to just be a matter of getting init to run agetty.

I've read several how-tos on this but no joy. I've also tried mgetty with the same results.

Any ideas?

TIA.
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 5 lines · Chris DiTrani

So it turns out I was starting a script-based service in rc.local without sending it to the background with '&', so the last bit of the init process wasn't happening.

Haven't been this stumped by something this stupid in a while...

If it helps i once spent 2 straight days troubleshooting in mayhem just to find the problem exactly where you did.
We all got some sort of ADD, just that over time it can get you to SUBSTRACT.. (ok, ok, that sounded better in my head)

--Adrian.