LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-03-2009, 01:59 AM   #1
beparas
Member
 
Registered: Nov 2006
Location: Pune
Posts: 48

Rep: Reputation: 0
getty command


Hi friends,

I am working on Freescale`s MPC8313 Board.
The /etc/inittab file on board, contain the one line given below, "::respawn:/sbin/getty -L console 0 screen"

So,what is the meaning of console & 0 in this line.
screen is the value of my TERM environment variable.

So, Please tell me, what is the use of console & 0 here.

Thanks in Advance
 
Old 02-03-2009, 07:04 PM   #2
Le Hibou
LQ Newbie
 
Registered: Jun 2007
Location: La Hulpe, Belgium
Distribution: Ubuntu 8.10 Intrepid
Posts: 6

Rep: Reputation: 1
console is the name of the device or port in the /dev directory, that is, the getty process will control the serial port which is connected to /dev/console. The 0 is in the position where I would usually expect to see the baud rate (or a list of baud rates which are tried in order), eg 9600 or 19200,9600,4800,1200. The effect of having a zero in this position may depend on the flavour of Linux/Unix you are running, maybe it means "try and auto-detect the baud rate" or maybe it's just a place-holder where you are expected to fill in the value yourself?

It's a long time since I used a serial terminal on Unix, but "man getty" is a useful guide.
 
Old 02-03-2009, 10:15 PM   #3
beparas
Member
 
Registered: Nov 2006
Location: Pune
Posts: 48

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Le Hibou View Post
console is the name of the device or port in the /dev directory, that is, the getty process will control the serial port which is connected to /dev/console. The 0 is in the position where I would usually expect to see the baud rate (or a list of baud rates which are tried in order), eg 9600 or 19200,9600,4800,1200. The effect of having a zero in this position may depend on the flavour of Linux/Unix you are running, maybe it means "try and auto-detect the baud rate" or maybe it's just a place-holder where you are expected to fill in the value yourself?

It's a long time since I used a serial terminal on Unix, but "man getty" is a useful guide.


Thank you for your great response.

I am working on Linux Kernel-2.6.20(vanila), patched with Freescale board support packages.

I just want to ask one more think,
Why the id (first) field in this line is empty. ?

If you are using tty1 this filed having value 1.
In this case we are using console.
So is there any relation of console and this filed.
Why id field is empty?

Thanks In Advance,

Last edited by beparas; 02-03-2009 at 10:17 PM.
 
Old 02-04-2009, 01:47 AM   #4
Le Hibou
LQ Newbie
 
Registered: Jun 2007
Location: La Hulpe, Belgium
Distribution: Ubuntu 8.10 Intrepid
Posts: 6

Rep: Reputation: 1
Quote:
Originally Posted by beparas View Post
Thank you for your great response.

I am working on Linux Kernel-2.6.20(vanila), patched with Freescale board support packages.

I just want to ask one more think,
Why the id (first) field in this line is empty. ?

If you are using tty1 this filed having value 1.
In this case we are using console.
So is there any relation of console and this filed.
Why id field is empty?

Thanks In Advance,
Usually the first field is a 1 to 4 character unique identifier of the inittab line. Some systems limit it to 2 characters. I'm not sure what it does, if anything, it might just be to help you extract selected lines from your inittab using grep or something. In the case of tty lines, I remember we used to set it to the tty line number (eg 01 for /dev/tty01), again I don't know the effect of not doing this.

In the case of the console, I would probably try setting it to 00, and if that didn't work, maybe 01 or 1.

Lots of things to do with getty and inittab often seem to be historical relics, and different Unix systems could interpret fields differently. My Ubuntu system doesn't even have an inittab, so if you are having problems, maybe inittab is not the place to be looking. init on my system starts off by looking at scripts in /etc/event.d, and in that directory there are text files called tty1...tty7 which make some reference to respawning gettys.
 
  


Reply

Tags
inittab, linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What about getty lupinix Bluewhite64 4 09-11-2008 09:20 PM
Help my getty is being a yetti!! Law1213 Slackware 6 06-24-2006 02:07 AM
Getting getty to run. kulmis Debian 2 09-03-2004 01:51 PM
What is getty? swmok Linux - Software 2 07-07-2004 05:54 AM
Autologin Getty rch Linux - Security 5 04-15-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration