Nov
06
2008
Serial console with upstart / for Fedora 9
Posted by: ben in Linux, Uncategorized, tags: Linux, SerialSince Fedora 9, the init process is managed by upstart. To get a serial console with a login prompt the old method doesn’t work anymore. The old method is to add the following line into /etc/inittab:
s0:3:respawn:/sbin/agetty -L 115200 ttyS0 vt100
This spawns a agetty for the ttyS0 in runlevel 3. The new method is event based where all event description files are inside /etc/event.d/. For a normal Fedora installation the file “serial” will be called from a udev event. If udev is not running and doesn’t generate events the following method will work. The spawned agetty should be for a ttyS0 so we name the file ttyS0. The content for the same behaviour as above looks like:
# ttyS0 - agetty start on stopped rc3 respawn exec /sbin/agetty -L 115200 ttyS0 vt100 UPDATE: fedora 17 including grub2
edit /etc/sysconfig/grub: GRUB_TERMINAL="serial console" GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" GRUB_CMDLINE_LINUX="... console=ttyS0,115200" generate grub-config grub2-mkconfig -o /etc/grub2.cfg
Entries (RSS)
Your post is contrary to many I have seen. The /etc/event.d/ttyS0 in many of these posts llooks like:
start on runlevel 1
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn /sbin/getty -L 38400 ttyS0 vt102