View unanswered posts | View active topics It is currently Sat Sep 21, 2019 4:38 am



Reply to topic  [ 1 post ] 
 Serial console on Mint 9 
Author Message

Joined: Wed Feb 22, 2012 9:41 pm
Posts: 2
Post Serial console on Mint 9
I had some issues finding out how to do this through Google, so I thought I'd post the steps here.

This should be applicable to any Mint 9 installation, regardless of the hardware, but it's especially useful on the fit-PC since I'm sure many users will be installing them in "headless" configurations with no keyboard, mouse, or monitor.

To be clear, the serial console allows you to log into the system through an RS-232 null modem cable, giving you the ability to do maintenance in case the network connection goes down, without having to piece together a keyboard, mouse, and monitor just to troubleshoot. It's completely reversible, and doesn't affect your ability to log in graphically like normal.



Step 1 - Add the console information to the kernel parameters so you get boot/shutdown information in the console

First, backup your existing /boot/grub/grub.cfg file:
Code:
sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup

Open /boot/grub/grub.cfg in your favorite text editor using sudo.
Find the line that looks something like:
Code:
        linux   /boot/vmlinux-2.6.35-34-fitpc2 root=UUID-gibberish-gibberish-gibberish ro quiet splash

And append "console=tty0 console=ttyS0,115200n8" to the end of the line, so it looks something like:
Code:
        linux   /boot/vmlinux-2.6.35-34-fitpc2 root=UUID-gibberish-gibberish-gibberish ro quiet splash console=tty0 console=ttyS0,115200n8

There should be a couple of these lines in the file (for regular boot, recovery mode, etc), append the console information to all of them.


Step 2 - Now the OS should be dumping boot/shutdown information to the console, but you still need to allocate a terminal to it so you can log in

Open "/etc/init/ttyS0.conf" as sudo in your favorite text editor. This file shouldn't exist yet, you'll be creating it. Paste the following into this file:
Code:
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -L ttyS0 115200 vt100


Now just reboot, and it should be good to go. To reverse the procedure, just move /etc/boot/grub.cfg.backup back to /etc/boot/grub.cfg, and delete /etc/init/ttyS0.conf.



To connect to the console, use the provided adapter to convert the mini connector to DB9, then attach a DB9 null modem cable between the fit-PC and your computer (using the serial port if you have one, or a USB/serial adapter if you don't). On your computer, you can use any serial communication program (kermit/minicom on linux, hyperterminal on windows, among many others), set it for 115200 bps, 8 data bits, 1 stop bit, no parity, no flow control, then connect and go. Usage should be exactly like connecting to the fit-PC through SSH.



Hopefully this helps somebody out there, if not, oh well.


Thu Feb 23, 2012 3:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.