cu -l ttyS0 -38400 --nostop
Pretty self explanatory, I think. The --nostop option disables XON/XOFF handling.
# root access over ttyS0
In order to become root over the serial terminal, the tty needs to be added to /etc/securetty
I appended ttyS0 to the end of the file. It is now possible, to gain root access over the serial terminal. The agetty process needs to be restarted to apply changes.
# Accessing GRUB over ttyS0
To make bootloader access possible over ttyS0, some changes to /boot/grub/menu.lst need to be done. (GRUB is the bootloader I use, I suppose LiLo has similar capabilities.)
Those are the lines, I appended to the top of my menu.lst :
serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1
terminal --timeout=3 serial console
The serial command initiates the serial terminal option, --unit=0 defines our first serial connector, I my case, it's the only one I have on my machine. I used the standard Linux-Console speed, as well as the "8N1" connection strategy.
terminal defines the terminal priorities, first terminal (serial) is the standard one, the last one is the secondary terminal (console).
--timeout=3 enables a delay on both consoles, with a prompt for a keystroke. Depending on which terminal, the key is pressed, this terminal, will be used. If no key is pressed after the timeout, the standard console (in my case serial) will be used.
# Relaying Kernel output on boot
The Kernel accepts multiple console options, of which the last one, is the standard console, and the one that will be used in Single User mode. These are my Kernel options:
title Fedora Core (2.6.20-1.2316.fc5)
root (hd0,0)
kernel /vmlinuz-2.6.20-1.2316.fc5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet vga=795 console=tty0 console=ttyS0,38400
initrd /initrd-2.6.20-1.2316.fc5.img
console=tty0 is the standard console, located on the machine, i.e. monitor and keyboard.
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: