Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Bug#453749: Fix serial console detection on ia64

From: dann frazier <dannf(at)debian.org>
Date: Fri Nov 30 2007 - 17:37:47 EST


Package: finish-install
Version: 2.13
Severity: important
Tags: patch

If you boot an ia64 system[1] without specifying a console= parameter, the kernel will try to map /dev/console to whatever settings were detected from EFI (firmware interface). If EFI uses a serial console,
/dev/console will be mapped to that same serial device.

d-i interacts with the user via /dev/console, so most of the time the installer doesn't really care what the underlying device is. That is, until the system needs to decide where it should run gettys, and where root logins are permitted. This works is done by 90console.

90console attempts to detect the real console device by dereferencing
/proc/<di-pid>/fd/0. If a system was booted w/ console=ttyS0,
/proc/<di-pid>/fd/0 will link to /dev/ttyS0.

However, on certain ia64 platforms[2], this link points to the ever-so-helpful /dev/console. The only way we've found to identify the correct device is to use a small C program that issues an ioctl to the device to retrieve the line number and speed (thanks to Bryan Stillwell for this research/work[3]).

The workaround for this in etch is to always specify a console= parameter, thereby disabling the automatic console setup.

The attached patch to di-utils adds a slightly modified version of Bryan's utility. This utility was originally called getserialdev - I've renamed it to serial-console-info, since I think it better describes the function. Also, getserialdev's output was of the form:

# ./getserialdev
ttyS2 115200

Do you need help?X

I've modified this to instead tag the data, so that it should be easier to maintain backwards compatability should this utility provide additional output in the future. e.g.:

# ./serial-console-info
DEV=ttyS2
SPEED=115200 The attached patch to finish-install adds support for using serial-console-info, if available, to 90console. Processing behaves just as before, until it finds that /proc/<di-pid>/fd/0 is pointing at
/dev/console. It will only then run serial-console-info to see if it
can determine that /dev/console is actually a serial device.

I briefly considered implementing serial console detection entirely with serial-console-info - but decided against it. The major problem is that serial-console-info assumes that any device it finds has a ttyS prefix, which may not always be correct.

[1] Possibly other EFI-based systems as well, I haven't verified
[2] an rx1600 w/ an MP for one
[3] 
https://launchpad.net/bugs/48752
-- 
dann frazier




-- 
To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Fri Nov 30 18:06:37 2007

This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 03:35:35 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library