Previously I had always setup console redirection on my Ubuntu servers using this (PDF link) guide, which worked great up until Ubuntu switched to Upstart and there was no more /etc/inittab file. So for my own, and anyone else’s future reference, here is what you need to do…
First follow the linked guide on how to enable serial redirection in the BIOS and on the DRAC card, these have not changed.
Next add the following anywhere above the ### BEGIN AUTOMAGIC KERNELS LIST line in /boot/grub/menu.lst
#DRAC serial access
serial --unit=0 --speed=57600
terminal --timeout=10 serial
Now find the line that starts with # defoptions=, in my vanilla install it is on line 93 and by default says # defoptions=quiet splash. Append to the end of the line console=ttyS0,57600 so it now looks like…
# defoptions=quiet splash console=ttyS0,57600
Make absolutely sure you leave the line commented out, that is how it is supposed to be. The reason we do it this way rather than appending directly to the kernel options is so we don’t have to add this line onto every new kernel we install, grub will do it automatically.
No onto the big difference with Upstart. Create a file /etc/event.d/ttyS0 with the following…
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /sbin/getty -h -L 57600 ttyS0 vt100
Now double check that “ttyS0″ is listed in the file /etc/securetty, it was already there on my install towards the top.
Now reboot your server and SSH into your DRAC’s IP and issue the command connect -h com2 and you should see the login prompt waiting for you just as it will at 3AM when your pager goes off and you cannot connect to the server by normal means. I assume this will be the same for DRAC 5 cards also, but I don’t have one to test so YMMV.
Tagged 8.04, dell, drac, hardy, Ubuntu, upstart