Debian Bug report logs - #442289
25configure_init Mangles ttyS Lines in /etc/inittab

version graph

Package: live-initramfs; Maintainer for live-initramfs is Debian Live Project <debian-live@lists.debian.org>;

Reported by: Svend Sorensen <debian-bugs@ssorensen.fastmail.fm>

Date: Fri, 14 Sep 2007 18:36:03 UTC

Severity: normal

Found in version 2.3.6.ds1-13

Fixed in version live-boot/2.0~a1-1

Done: daniel@debian.org

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#442289; Package live-initramfs. Full text and rfc822 format available.

Acknowledgement sent to Svend Sorensen <debian-bugs@ssorensen.fastmail.fm>:
New Bug report received and forwarded. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Svend Sorensen <debian-bugs@ssorensen.fastmail.fm>
To: submit@bugs.debian.org
Subject: 25configure_init Mangles ttyS Lines in /etc/inittab
Date: Fri, 14 Sep 2007 11:34:33 -0700
Package: live-initramfs
Version: 2.3.6.ds1-13

The 25configure_ini file 
(/usr/share/initramfs-tools/scripts/casper-bottom/25configure_init) 
mangles the ttyS[0-9] lines in /etc/inittab.  This is due to the sed 
expression on line 54:

sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab

The regex "tty[0-9]*" matches ttyS0, but only saves the string tty.  
This results in lines which contain /dev/tty on boot.  If the serial 
console line is uncommented in the original /etc/inittab, the system 
fails to open the serial console on boot due to /dev/tty not existing.

This could be fixed by:

1. Changing the regex so that ttyS* lines are not matched: 

    "tty[0-9][0-9]*"

2. or saving the entire ttyS* filename:

    "ttyS\?[0-9]*"

    (This regex contains "\?" which is a GNU extension to sed.)

$ uname -a
Linux agate.ciffer.net 2.6.9-023stab041.3-smp #1 SMP Wed Feb 14 13:13:03 MSK 2007 i686 GNU/Linux

$ dpkg -s libc6 | grep ^Version
Version: 2.3.6.ds1-13




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#442289; Package live-initramfs. Full text and rfc822 format available.

Acknowledgement sent to "Alex Owen" <r.alex.owen@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 442289@bugs.debian.org (full text, mbox):

From: "Alex Owen" <r.alex.owen@gmail.com>
To: 442289@bugs.debian.org
Subject: 25configure_init: misunderstood?
Date: Fri, 30 May 2008 15:26:12 +0100
I think 25configure init is misunderstood by some.. or maybe it is just me!

Some time ago I wrote casper-getty which is now live-getty.
The idea is that where ever /sbin/getty appears in the default debian
inittab 25configrue init replaces it with /sbin/casper-getty (or now
/sbin/live-getty) and you get to login on the VGA console.

I then extended the idea to detect from kernel command line if a
serial console is in use.
If a serial console is in use then a serial console line is written
into the default debian /etc/inittab using /sbin/casper-getty (or now
/sbin/live-getty) and your serial console will JUST WORK!

So in summary:
Do you use casper of liveinitramfs to boot?
CASPER: Have you tried booting with "casper-getty" on the kernel command line?
LIVEINTRAMFS: Have you tried booting with "live-getty" on the kernel
command line?
NB: don't try and add a serial console line to /etc/inittab if you
boot like this...
The code in 25configure init will determine if a serial console is in
use and generate a line in /etc/inittab at boot time.


Further thoughts:
(1) I'm biased as I wrote gasper-getty/live-getty
(2) We shoul have a way to stop 25 configure init from messing with
/etc/inittab at all!
(3) if casper/live- getty was made default then we could use teh
kernel command line no-live-getty to stop 25configure init from
touching /etc/inittab at all and then it would be down to the
live-image builder to configure /etc/inittab in teh chroot as they see
fit.

Just some thought!!!
Alex Owen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#442289; Package live-initramfs. Full text and rfc822 format available.

Acknowledgement sent to "Alex Owen" <r.alex.owen@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#442289; Package live-initramfs. Full text and rfc822 format available.

Acknowledgement sent to Frédéric BOITEUX <fboiteux@calistel.com>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #20 received at 442289@bugs.debian.org (full text, mbox):

From: Frédéric BOITEUX <fboiteux@calistel.com>
To: debian-live-devel@lists.alioth.debian.org
Cc: Alex Owen <r.alex.owen@gmail.com>, 442289@bugs.debian.org
Subject: Re: Bug#442289: 25configure_init: misunderstood?
Date: Wed, 4 Jun 2008 07:35:42 +0200
Le ven 30 mai 2008 15:26:12 CEST, "Alex Owen" <r.alex.owen@gmail.com> a
écrit :

> I think 25configure init is misunderstood by some.. or maybe it is just me!
> 
> Some time ago I wrote casper-getty which is now live-getty.
> The idea is that where ever /sbin/getty appears in the default debian
> inittab 25configrue init replaces it with /sbin/casper-getty (or now
> /sbin/live-getty) and you get to login on the VGA console.
> 
> I then extended the idea to detect from kernel command line if a
> serial console is in use.
> If a serial console is in use then a serial console line is written
> into the default debian /etc/inittab using /sbin/casper-getty (or now
> /sbin/live-getty) and your serial console will JUST WORK!
> 
> So in summary:
> Do you use casper of liveinitramfs to boot?
> CASPER: Have you tried booting with "casper-getty" on the kernel command line?
> LIVEINTRAMFS: Have you tried booting with "live-getty" on the kernel
> command line?
> NB: don't try and add a serial console line to /etc/inittab if you
> boot like this...
> The code in 25configure init will determine if a serial console is in
> use and generate a line in /etc/inittab at boot time.

	Hello,

  I just didn't know about 'live-getty' cmd line option. I've tested
it, it works, so I leave my /etc/inittab's patch and also the
live-initramfs patch previously proposed :-)

	Fred.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live-maint@lists.alioth.debian.org>:
Bug#442289; Package live-initramfs. Full text and rfc822 format available.

Acknowledgement sent to Frédéric BOITEUX <fboiteux@calistel.com>:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live-maint@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #25 received at 442289@bugs.debian.org (full text, mbox):

From: Frédéric BOITEUX <fboiteux@calistel.com>
To: Frédéric BOITEUX <fboiteux@calistel.com>, 442289@bugs.debian.org
Cc: debian-live-devel@lists.alioth.debian.org, 403369@bugs.debian.org
Subject: Re: Bug#442289: 25configure_init: misunderstood?
Date: Wed, 4 Jun 2008 09:33:32 +0200
Le mer 04 jun 2008 07:35:42 CEST, Frédéric BOITEUX
<fboiteux@calistel.com> a écrit :

>   I just didn't know about 'live-getty' cmd line option. I've tested
> it, it works, so I leave my /etc/inittab's patch and also the
> live-initramfs patch previously proposed :-)

I still have a problem with live-getty : when enabling bootlogd, having
the serial console as primary one, I don't get the boot messages on the
serial console, only at the end in the /var/log/boot file, like in bug
#403369 (without solution). I've tried to look at the problem, but
didn't find a solution, so I have to keep my patch and stay with my
current config.

	Fred.




Blocking bugs of 442289 added: 403369 Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Fri, 06 Mar 2009 16:03:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#442289; Package live-initramfs. (Mon, 07 Jun 2010 15:27:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel@debian.org:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Mon, 07 Jun 2010 15:27:09 GMT) Full text and rfc822 format available.

Message #32 received at 442289@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 442289@bugs.debian.org
Subject: Re: 25configure_init Mangles ttyS Lines in /etc/inittab
Date: Mon, 07 Jun 2010 17:25:47 +0200
tag 442289 pending
thanks

not an issue in live-config (aka live-initramfs 2.x) anymore.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Added tag(s) pending. Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Mon, 07 Jun 2010 15:27:13 GMT) Full text and rfc822 format available.

Bug marked as fixed in version 2.0~a1-1, send any further explanations to Svend Sorensen <debian-bugs@ssorensen.fastmail.fm> Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Fri, 16 Jul 2010 03:03:06 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 13 Aug 2010 07:39:25 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:04:23 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.