[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#470951: marked as done (grub-installer: serial console broken for words!=8 and flow control)



Your message dated Wed, 19 Mar 2008 21:02:18 +0000
with message-id <E1Jc5QQ-0006MT-BY@ries.debian.org>
and subject line Bug#470951: fixed in grub-installer 1.30
has caused the Debian Bug report #470951,
regarding grub-installer: serial console broken for words!=8 and flow control
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
470951: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470951
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: grub-installer
Tags: patch

I was surprised by grub not showing up on the serial 
console after an installation over serial with kernel
option console=ttyS0,11520n8r

The grub menu.lst contained

  serial --unit=1 --speed=115200 --word=r --parity=no --stop=1

But 'r' is an invalid value for word (it takes 5-8).

It turns out the parsing in grub_serial_console() doesn't
handle options strings correctly that specify a word size != 8 
or a flow control parameter (or both).

grub_serial_console() interprets the third character after
the baud rate as value for 'word'. serial-console.txt in 
linux-2.6/Documentation, OTOH, says:

  options:	depend on the driver. For the serial port this
  		defines the baudrate/parity/bits/flow control of
  		the port, in the format BBBBPNF, where BBBB is the
  		speed, P is parity (n/o/e), N is number of bits,
  		and F is flow control ('r' for RTS). Default is
  		9600n8. The maximum baudrate is 115200.

So it should actually take the second character as value 
for word and ignore any third character, because grub doesn't 
seem to offer any option for setting flow control.

The attached patch makes it work for me and fixes both word
and flow control handling. I've checked the results against 
Alex' test script [1], and the results look good to me. 

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416310#25

	Max

Index: grub-installer/debian/changelog
===================================================================
--- grub-installer/debian/changelog	(Revision 51918)
+++ grub-installer/debian/changelog	(Arbeitskopie)
@@ -9,6 +9,10 @@
   [ Guido Guenther ]
   * Add multipath support modelled after dmraid. Closes: #468832.
 
+  [ Max Vozeler ]
+  * Fix serial console setup for console= options that include either a
+    word size != 8 or a flow control parameter.
+
  -- Guido Guenther <agx@sigxcpu.org>  Mon, 10 Mar 2008 13:29:51 +0100
 
 grub-installer (1.29) unstable; urgency=low
Index: grub-installer/grub-installer
===================================================================
--- grub-installer/grub-installer	(Revision 51918)
+++ grub-installer/grub-installer	(Arbeitskopie)
@@ -53,10 +53,10 @@
 		options=${serconsole##*,}
 	fi
 	local speed=$(echo "$options" | sed -e 's/^\([0-9]*\).*$/\1/')
-	# Take optional 1st (parity) and 3rd (word) characters after speed
+	# Take optional 1st (parity) and 2nd (word) characters after speed
 	options=${options##${speed}}
 	local parity=$(echo $options | sed 's/^\(.\?\).*$/\1/')
-	local word=$(echo $options | sed 's/^.\?.\?\(.\?\).*$/\1/')
+	local word=$(echo $options | sed 's/^.\?\(.\?\).*$/\1/')
 	if [ -z "$speed" ]; then
 		speed="9600"
 	fi
grub_serial_console console=ttyS0
serial --unit=0 --speed=9600 --stop=1
grub_serial_console console=ttyS1
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS0,9600
serial --unit=0 --speed=9600 --stop=1
grub_serial_console console=ttyS0,115200
serial --unit=0 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS1,115200
serial --unit=1 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600n
serial --unit=1 --speed=9600 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n
serial --unit=1 --speed=115200 --parity=no --stop=1
grub_serial_console console=ttyS1,9600e
serial --unit=1 --speed=9600 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e
serial --unit=1 --speed=115200 --parity=even --stop=1
grub_serial_console console=ttyS1,9600o
serial --unit=1 --speed=9600 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o
serial --unit=1 --speed=115200 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600n8
serial --unit=1 --speed=9600 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n8
serial --unit=1 --speed=115200 --parity=no --stop=1
grub_serial_console console=ttyS1,9600n7
serial --unit=1 --speed=9600 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n7
serial --unit=1 --speed=115200 --parity=no --stop=1
grub_serial_console console=ttyS1,9600n8r
serial --unit=1 --speed=9600 --word=r --parity=no --stop=1
grub_serial_console console=ttyS1,115200n8r
serial --unit=1 --speed=115200 --word=r --parity=no --stop=1
grub_serial_console console=ttyS1,9600n7r
serial --unit=1 --speed=9600 --word=r --parity=no --stop=1
grub_serial_console console=ttyS1,115200n7r
serial --unit=1 --speed=115200 --word=r --parity=no --stop=1
grub_serial_console console=ttyS1,9600o8
serial --unit=1 --speed=9600 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o8
serial --unit=1 --speed=115200 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o7
serial --unit=1 --speed=9600 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o7
serial --unit=1 --speed=115200 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o8r
serial --unit=1 --speed=9600 --word=r --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o8r
serial --unit=1 --speed=115200 --word=r --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o7r
serial --unit=1 --speed=9600 --word=r --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o7r
serial --unit=1 --speed=115200 --word=r --parity=odd --stop=1
grub_serial_console console=ttyS1,9600e8
serial --unit=1 --speed=9600 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e8
serial --unit=1 --speed=115200 --parity=even --stop=1
grub_serial_console console=ttyS1,9600e7
serial --unit=1 --speed=9600 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e7
serial --unit=1 --speed=115200 --parity=even --stop=1
grub_serial_console console=ttyS1,9600e8r
serial --unit=1 --speed=9600 --word=r --parity=even --stop=1
grub_serial_console console=ttyS1,115200e8r
serial --unit=1 --speed=115200 --word=r --parity=even --stop=1
grub_serial_console console=ttyS1,9600e7r
serial --unit=1 --speed=9600 --word=r --parity=even --stop=1
grub_serial_console console=ttyS1,115200e7r
serial --unit=1 --speed=115200 --word=r --parity=even --stop=1
================================
The following are invalid inputs but are still handeled
grub_serial_console console=ttyS1,9600X
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS1,115200X
serial --unit=1 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600X8
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS1,115200X7
serial --unit=1 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600X7r
serial --unit=1 --speed=9600 --word=r --stop=1
grub_serial_console console=ttyS1,115200X8r
serial --unit=1 --speed=115200 --word=r --stop=1
grub_serial_console console=ttyS0
serial --unit=0 --speed=9600 --stop=1
grub_serial_console console=ttyS1
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS0,9600
serial --unit=0 --speed=9600 --stop=1
grub_serial_console console=ttyS0,115200
serial --unit=0 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS1,115200
serial --unit=1 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600n
serial --unit=1 --speed=9600 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n
serial --unit=1 --speed=115200 --parity=no --stop=1
grub_serial_console console=ttyS1,9600e
serial --unit=1 --speed=9600 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e
serial --unit=1 --speed=115200 --parity=even --stop=1
grub_serial_console console=ttyS1,9600o
serial --unit=1 --speed=9600 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o
serial --unit=1 --speed=115200 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600n8
serial --unit=1 --speed=9600 --word=8 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n8
serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1
grub_serial_console console=ttyS1,9600n7
serial --unit=1 --speed=9600 --word=7 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n7
serial --unit=1 --speed=115200 --word=7 --parity=no --stop=1
grub_serial_console console=ttyS1,9600n8r
serial --unit=1 --speed=9600 --word=8 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n8r
serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1
grub_serial_console console=ttyS1,9600n7r
serial --unit=1 --speed=9600 --word=7 --parity=no --stop=1
grub_serial_console console=ttyS1,115200n7r
serial --unit=1 --speed=115200 --word=7 --parity=no --stop=1
grub_serial_console console=ttyS1,9600o8
serial --unit=1 --speed=9600 --word=8 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o8
serial --unit=1 --speed=115200 --word=8 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o7
serial --unit=1 --speed=9600 --word=7 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o7
serial --unit=1 --speed=115200 --word=7 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o8r
serial --unit=1 --speed=9600 --word=8 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o8r
serial --unit=1 --speed=115200 --word=8 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600o7r
serial --unit=1 --speed=9600 --word=7 --parity=odd --stop=1
grub_serial_console console=ttyS1,115200o7r
serial --unit=1 --speed=115200 --word=7 --parity=odd --stop=1
grub_serial_console console=ttyS1,9600e8
serial --unit=1 --speed=9600 --word=8 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e8
serial --unit=1 --speed=115200 --word=8 --parity=even --stop=1
grub_serial_console console=ttyS1,9600e7
serial --unit=1 --speed=9600 --word=7 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e7
serial --unit=1 --speed=115200 --word=7 --parity=even --stop=1
grub_serial_console console=ttyS1,9600e8r
serial --unit=1 --speed=9600 --word=8 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e8r
serial --unit=1 --speed=115200 --word=8 --parity=even --stop=1
grub_serial_console console=ttyS1,9600e7r
serial --unit=1 --speed=9600 --word=7 --parity=even --stop=1
grub_serial_console console=ttyS1,115200e7r
serial --unit=1 --speed=115200 --word=7 --parity=even --stop=1
================================
The following are invalid inputs but are still handeled
grub_serial_console console=ttyS1,9600X
serial --unit=1 --speed=9600 --stop=1
grub_serial_console console=ttyS1,115200X
serial --unit=1 --speed=115200 --stop=1
grub_serial_console console=ttyS1,9600X8
serial --unit=1 --speed=9600 --word=8 --stop=1
grub_serial_console console=ttyS1,115200X7
serial --unit=1 --speed=115200 --word=7 --stop=1
grub_serial_console console=ttyS1,9600X7r
serial --unit=1 --speed=9600 --word=7 --stop=1
grub_serial_console console=ttyS1,115200X8r
serial --unit=1 --speed=115200 --word=8 --stop=1

--- End Message ---
--- Begin Message ---
Source: grub-installer
Source-Version: 1.30

We believe that the bug you reported is fixed in the latest version of
grub-installer, which is due to be installed in the Debian FTP archive:

grub-installer_1.30.dsc
  to pool/main/g/grub-installer/grub-installer_1.30.dsc
grub-installer_1.30.tar.gz
  to pool/main/g/grub-installer/grub-installer_1.30.tar.gz
grub-installer_1.30_amd64.udeb
  to pool/main/g/grub-installer/grub-installer_1.30_amd64.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 470951@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Frans Pop <fjp@debian.org> (supplier of updated grub-installer package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 19 Mar 2008 20:59:41 +0100
Source: grub-installer
Binary: grub-installer
Architecture: source amd64
Version: 1.30
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Frans Pop <fjp@debian.org>
Description: 
 grub-installer - Install GRUB on a hard disk (udeb)
Closes: 468832 470951
Changes: 
 grub-installer (1.30) unstable; urgency=low
 .
   [ Frans Pop ]
   * Correct off-by-one error in SATA RAID sanity checks. Thanks Guido Günther.
   * Add the "quiet" boot parameter only to 'defoptions' and not to 'kopt' so
     that it is not included for "single user" mode. The same could be done for
     other parameters.
 .
   [ Guido Guenther ]
   * Add multipath support modelled after dmraid. Closes: #468832.
 .
   [ Max Vozeler ]
   * Fix serial console setup for console= options that include either a
     word size != 8 or a flow control parameter. Closes: #470951
 .
   [ Updated translations ]
   * Amharic (am.po) by Tegegne Tefera
   * Arabic (ar.po) by Ossama M. Khayat
   * Bulgarian (bg.po) by Damyan Ivanov
   * Czech (cs.po) by Miroslav Kure
   * Esperanto (eo.po) by Serge Leblanc
   * Basque (eu.po) by Piarres Beobide
   * Finnish (fi.po) by Esko Arajärvi
   * French (fr.po) by Christian Perrier
   * Galician (gl.po) by Jacobo Tarrio
   * Indonesian (id.po) by Arief S Fitrianto
   * Japanese (ja.po) by Kenshi Muto
   * Korean (ko.po) by Changwoo Ryu
   * Dutch (nl.po) by Frans Pop
   * Panjabi (pa.po) by Amanpreet Singh Alam
   * Polish (pl.po) by Bartosz Fenski
   * Portuguese (Brazil) (pt_BR.po) by Felipe Augusto van de Wiel (faw)
   * Portuguese (pt.po) by Miguel Figueiredo
   * Russian (ru.po) by Yuri Kozlov
   * Slovak (sk.po) by Ivan Masár
   * Swedish (sv.po) by Daniel Nylander
   * Thai (th.po) by Theppitak Karoonboonyanan
Files: 
 fe6af5e1374481367b48a3ce7583cc3e 796 debian-installer standard grub-installer_1.30.dsc
 b52c4cb6bbfc102dc5318a852bbc15d7 140259 debian-installer standard grub-installer_1.30.tar.gz
 1a8c68b689efde130a596b28327330e8 122704 debian-installer standard grub-installer_1.30_amd64.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH4XE+gm/Kwh6ICoQRAgyeAKCzzPCaSc8BBxrWM8D8XNFFm4vKrgCgykmM
FS1zyqtljh8ph8qEcXdMgVI=
=9WsP
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: