Difference between revisions of "Working with the serial console"

From ArchWiki
Jump to: navigation, search
Line 13: Line 13:
 
=Configuration=
 
=Configuration=
  
===Configure console access on an existing machine===
+
===Configure console access on the target machine===
  
 
1. Edit the grub.conf file:
 
1. Edit the grub.conf file:
Line 33: Line 33:
 
</pre>
 
</pre>
  
2. Edit the /etc/inittab file:  
+
2. Edit the inittab file:  
  
 
<pre>
 
<pre>
Line 39: Line 39:
 
</pre>
 
</pre>
  
Add a new agettry line below the existing ones :
+
Add a new agetty line below the existing ones :
  
 
<pre>
 
<pre>
 
c0:2345:respawn:/sbin/agetty 9600 ttyS0 linux
 
c0:2345:respawn:/sbin/agetty 9600 ttyS0 linux
 
</pre>
 
</pre>
 +
 +
3. Edit the securetty file
 +
<pre>
 +
# vi /etc/securetty
 +
</pre>
 +
 +
Below the existing tty's add an entry for the the serial console:
 +
<pre>
 +
ttyS0
 +
</pre>
 +
 +
Note that in the steps above ttyS1 can also be used, in case that your machine has more than one serial port.

Revision as of 18:51, 26 May 2008

Under Construction

Introduction

Configure your Arch Linux machine, so you can connect to it via the serial console port (com port). This will enable you to administer the machine, even if it has no keyboard, mouse, monitor or network attached to it (a headless server).

As of Arch Linux 2007.x, installation of Arch Linux is possible via the serial console as well.

A basic environment for this scenario is connecting the administering machine to the administered machine, using a serial cable (9-pin connector cable). The administering machine can be any Linux or Windows machine with a terminal emulator program (putty and minicom for example)

Configuration

Configure console access on the target machine

1. Edit the grub.conf file:

# vi /boot/grub/menu.lst

Add the console parameters at the end of your current kernel line:

console=ttyS0,9600

For example, the kernel line should look something like this after modification:

kernel /vmlinuz26 root=/dev/md0 ro md=0,/dev/sda3,/dev/sdb3 vga=773 console=ttyS0,9600

2. Edit the inittab file:

# vi /etc/inittab

Add a new agetty line below the existing ones :

c0:2345:respawn:/sbin/agetty 9600 ttyS0 linux

3. Edit the securetty file

# vi /etc/securetty

Below the existing tty's add an entry for the the serial console:

ttyS0

Note that in the steps above ttyS1 can also be used, in case that your machine has more than one serial port.