serial terminal with archlinux
I was working on getting serial hooked up from my laptop to one of my linux desktop/servers.
I haven't done a whole lot of work with serial on linux before. First I had to find a linux serial client.
I discovered two:
- gtkterm
- screen
I was very surprised that screen worked as a serial talker. It works great in fact!
Here is what I did.
The server config
Edit grub on the server. I wanted serial access to kernel choices too!
This is what I put in the option section of
/boot/grub/menu.lsttimeout 5 default 0 color light-blue/black light-cyan/blue serial --unit=0 --speed=115200 terminal --timeout=5 serial consoleThe
--unit=0option specifies the serial device number. I have ttyS0, so I need--unit=0. The--speed=115200option is the flow-rate you specify for your serial device.
Then in the kernel section...title ArchLinux root (hd0,0) kernel /vmlinuz26 root=/dev/sda3 ro console=tty0 console=ttyS0,115200 initrd /kernel26.imgIn the kernel line, the
consoleoptions specify the devices that are granted console access. I specified a normal tty first, and the serial second. That seems to work fine for me.Next I needed to make an addition to
/etc/inittabS0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100If you want root to be able to login over the serial tty that you just specified, then you need to add it to the
/etc/securettyfile. Just add a new line, withttyS0on it (based on the above configs).I rebooted the box, so that I could try out my serial terminal goodness.
The client w/ screen hotness
I executed the following command...
screen -R serial /dev/ttyS0 115200That was it. To kill the screen session, I just did a
C-a k. Say yes, and bam. Disconnected. Using gtkterm is fairly self explanatory.