OpenSolaris with Serial Console

I’m one of those types who thinks that Unix makes for a good server but a bad desktop. I also think a server should be tucked away somewhere and accessed entirely remotely. The problem comes when you need to do lower level work that requires console login. Fortunately most Unix systems still support running a console over a serial port. And I happen to have a couple of terminal server boxes that allow me to log in over the network and access one of the servers’ consoles. I’ve been moving my non-desktop machines into a closet to get them out of the way, so I wanted to get my OpenSolaris box using serial console.

OpenSolaris and Solaris 11 now have a new boot architecture based on the GRUB boot loader that is popular on current Linux boxes (except for some people who like the older LILO). As such, the method of enabling serial console is a bit different. On earlier boxes you would run “eeprom input-device=ttya ; eeprom output-device=ttya” and you’d be set, but that procedure no longer works.

Here’s how to do it for OpenSolaris or Solaris 11: To get the unix kernel to use serial console, as root run “eeprom console=ttya”. If you only do that, then you won’t have access to the GRUB boot loader over the console. To enable serial console with GRUB, as root edit /boot/grub/menu.lst and find and uncomment these lines:

serial –unit=0 –speed=9600
terminal serial

Then comment this line:

#splashimage /boot/grub/splash.xpm.gz

The comments in the file also tell you what to do.

If you want to use the second serial port instead, use ttyb in the eeprom command, and –unit=1 in the serial line in menu.lst. If you want to use a different port speed than 9600, you need to change the eeprom ttya-mode (or ttyb-mode) setting and the –speed setting on the serial line in menu.lst.

On x86 hardware you may also need to make sure that the BIOS will boot without a keyboard attached or you will get the moronic “Keyboard not present. Press F1 to continue.” message and your system won’t boot. There’s usually a “ignore keyboard errors” or a “halt on: all but keyboard” option to get it to ignore the lack of keyboard.

Leave a Reply

Your email address will not be published.