Bug#453749: simpler solution
I couldn't find any difference in how the kernel was setting up the
console that would affect the /proc/$dipid/fd/0 link, so I started
looking into userspace.
Busybox's console_init() tries to find and use the real console
device. It starts by checking to see if its a serial device in much
the same way that serial-console-info does. After determining what it
thinks *should* be the right device name, init tries to open that
device file. If this fails, it falls back to using /dev/console, which
I believe leads to this problem.
It turns out that rootskel init only creates two serial devices before
calling busybox init - ttyS0 and ttyS1. My system where
/proc/$dipid/fd/0 was pointing to /dev/console used ttyS3 as the real
console, while my system where /proc/$dipid/fd/0 pointed to the
real device used ttyS0.
ttyS3 as a serial console is very commonplace for HP ia64 systems, as
this is the device typically emulated by the management processor to
make the console available over the network.
Index: debian/changelog
===================================================================
--- debian/changelog (revision 50286)
+++ debian/changelog (working copy)
@@ -1,3 +1,11 @@
+rootskel (1.58) UNRELEASED; urgency=low
+
+ * Create more serial device files in the ramdisk before calling
+ busybox init, in case they are needed for a serial console.
+ Closes: #453749.
+
+ -- dann frazier <dannf@debian.org> Mon, 03 Dec 2007 20:25:03 -0700
+
rootskel (1.57) unstable; urgency=low
* debian-installer-startup.d/S02netwinder-net: restructure so
Index: src/lib/debian-installer/init-udev-devices
===================================================================
--- src/lib/debian-installer/init-udev-devices (revision 50286)
+++ src/lib/debian-installer/init-udev-devices (working copy)
@@ -13,6 +13,6 @@
for i in 0 1 2 3 4; do
makedev 600 /dev/tty"$i" c 4 "$i"
done
-for i in 0 1; do
+for i in 0 1 2 3; do
makedev 600 /dev/ttyS"$i" c 4 "$(($i + 64))"
done
Reply to: