Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72928 - no shell started on serial console using 2004.3 livecd (livecd-tools)
Summary: no shell started on serial console using 2004.3 livecd (livecd-tools)
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Everything (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
Depends on:
Reported: 2004-11-30 08:43 UTC by Patrick Landry
Modified: 2005-06-10 07:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Landry 2004-11-30 08:43:13 UTC
It would appear to me that the init process is running before
the edits are made to the /etc/inittab file thus starting the shells
attached to tty1 through tty6 but not starting the shell for ttyS0.

When booting from the 2004.3 (or 2004.3-r1) livecd using a serial console, i.e.

  boot: gentoo-nofb console=ttyS0,115200

no shell is spawned for the serial console. A shell is started
attached to the graphics console, and there is a line in 
/etc/inittab which should start the serial console shell

  c1:12345:respawn:/sbin/agetty -nl /bin/bashlogin 115200 ttyS0 vt100

but no shell is started. If the agetty command from the /etc/inittab
file is executed, like this

  livecd root # /sbin/agetty -nl /bin/bashlogin 115200 ttyS0 vt100

the shell on the serial console is started correctly.

I also noted that there are bash shells running attached to tty1 through
tty6 even though the lines which would start those shells are commented out
in /etc/inittab.

  # End of /etc/inittab
  #c1:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty1 linux
  #c2:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty2 linux
  #c3:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty3 linux
  #c4:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty4 linux
  #c5:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty5 linux
  #c6:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty6 linux
  c1:12345:respawn:/sbin/agetty -nl /bin/bashlogin 115200 ttyS0 vt100

Booting from the 2004.2 livecd behaves as expected.

Reproducible: Always
Steps to Reproduce:
1. boot from livecd
2. boot: gentoo-nofb console=ttyS0,115200
Actual Results:  
shell prompt appears on graphics console but not on serial console

Expected Results:  
shell prompt should appear on serial console

Dell Poweredge 2650
console redirection enabled
console attached to first serial port
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-30 15:07:44 UTC
Hrrrmn... I'll try to see what is up with this and get a resolution.  As for the comments, don't worry about that.  We hacked up some stuff to get that going.
Comment 2 Patrick Landry 2005-01-14 08:22:40 UTC
Does anyone know if this has been addressed for 2005.0?
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2005-01-14 09:46:32 UTC
It has not been addressed yet.  If you have any ideas on how to resolve this, I'm definitely open for suggestions.
Comment 4 Patrick Landry 2005-01-18 11:46:44 UTC
I'm afraid I do not know nearly enough about the LiveCD boot process to
have any real suggestions. I did poke around enough to make the observations
that were in the original bug report. Namely, it looks as though the /etc/inittab
file is being edited correctly to start the serial console shell yet the
init process is not starting it. I presume that either the init process is
not paying attention to the file which is located at /etc/inittab after the
system is running or that the init process is being started before the edits
to the file are being made.
Comment 5 Patrick Landry 2005-03-28 12:54:19 UTC
Just an update to note that the bug still exists in 2005.0
Comment 6 Patrick Landry 2005-03-28 16:07:31 UTC
I dug a little deeper into this today using a 2005.0 boot CD. It is the /sbin/rc script which edits the /etc/inittab file. /sbin/rc calls the function livecd_fix_inittab which is defined in the file /sbin/
The function livecd_fix_inittab adds a line to /etc/inittab to start a shell on the serial console. 

I noticed that if I commented out the line with id "c1" which livecd_fix_inittab added, ran "telinit q", and then un-commented the line, the console was terminated on /dev/vc/1 and started on the serial console as it should have at boot time.

I also noticed that if I replaced the "c1" id field with "c9" on the line that livecd_fix_inittab added and then ran "telinit q" the serial console shell was also started.

So there must be some confusion within init about the line which livecd_fix_inittab adds having the id field "c1". I would suggest changing livecd_fix_inittab so that the label on the line which starts the serial console is "c9" or even "c999" rather than "c1". Granted this is a work-around but it should get serial consoles working again when booting off of the live CDs until someone can figure out why init is confused about the line which live_cd_inttab adds with the "c1" id field.
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2005-05-03 10:26:25 UTC
Just curious (I have nothing with serial to verify) but what if it is c0 rather than c9?  It shouldn't make a difference, correct?

The reason why I ask, is I now have control over in livecd-tools, so I can make changes without baselayout bumps.  I've currently got it using c0 for the serial consoles, which should work.  I beleive that Project Dolphin should be using this updated version of livecd-tools, but I can also understand your reluctance to download such a large ISO, if you have not already.

If you're willing to help with more testing (you've been awesome already) then I can build a newer ISO image with the newer livecd-tools to see if this resolves the issue.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2005-06-10 07:45:02 UTC
No response...