ubuntuserialconsole
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | ubuntuserialconsole [2013/01/28 04:29] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Ubuntu Serial Console ====== | ||
+ | |||
+ | |||
+ | ===== Ubuntu 10.10 ===== | ||
+ | < | ||
+ | ls /dev/ | ||
+ | </ | ||
+ | Use the tty interface for your serial port. Mine was ttyUSB0 since I used a USB dongle.< | ||
+ | **NOTE:** Needs to be run as root or change permissions on the tty device. | ||
+ | < | ||
+ | Set the device and configure settings.< | ||
+ | Save as default | ||
+ | |||
+ | ===== Ubuntu 6.06 ===== | ||
+ | This document presents (almost) the minimum amount of work required to enable a serial console login on an Ubuntu 6.06 and later versions. (Minor changes have been added to improve performance.) Both server and client settings are included. | ||
+ | |||
+ | This procedure was developed using the Remote Serial Console HOWTO (see " | ||
+ | |||
+ | ==== Assumptions ==== | ||
+ | * < | ||
+ | * The serial connection is being made at 115200 baud 8n1, on first serial port, called /dev/ttyS0 in linux (9600 8n1 is the default fall back if your hardware does not support 115200 baud) | ||
+ | * You are comfortable editing critical system files such as / | ||
+ | * You are using a serial (null modem) cable. It is also possible to use a USB to Serial adaptor, but the tty** must be changed to reflect your hardware. | ||
+ | |||
+ | If you want to use a standard Ethernet/ | ||
+ | |||
+ | <h2 id''" | ||
+ | |||
+ | ==== Configuring the console login process ==== | ||
+ | |||
+ | This section details how to configure the ' | ||
+ | |||
+ | Configuring upstart**(Karmic and newer)** | ||
+ | |||
+ | 1) Paste the following into / | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # This service maintains a getty on ttyS0 from the point the system is | ||
+ | # started until it is shut down again. | ||
+ | |||
+ | start on stopped rc RUNLEVEL'' | ||
+ | stop on runlevel [!2345] | ||
+ | |||
+ | respawn | ||
+ | exec /sbin/getty -L 115200 ttyS0 vt102</ | ||
+ | |||
+ | 2) Ask upstart to start the getty | ||
+ | |||
+ | < | ||
+ | |||
+ | Configuring upstart**(Edgy/ | ||
+ | |||
+ | Paste the following into / | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # This service maintains a getty on ttyS0 from the point the system is | ||
+ | # started until it is shut down again. | ||
+ | |||
+ | start on runlevel 2 | ||
+ | start on runlevel 3 | ||
+ | start on runlevel 4 | ||
+ | start on runlevel 5 | ||
+ | |||
+ | stop on runlevel 0 | ||
+ | stop on runlevel 1 | ||
+ | stop on runlevel 6 | ||
+ | |||
+ | respawn | ||
+ | exec /sbin/getty 115200 ttyS0</ | ||
+ | |||
+ | Configuring inittab**(only Dapper and older !)** | ||
+ | |||
+ | 1) Edit / | ||
+ | |||
+ | < | ||
+ | |||
+ | 2) Change the following line: | ||
+ | |||
+ | < | ||
+ | |||
+ | to: | ||
+ | |||
+ | < | ||
+ | |||
+ | 3) Restart init: | ||
+ | |||
+ | < | ||
+ | |||
+ | At this point, a new login prompt should appear on the output of the serial console. | ||
+ | |||
+ | ==== Configuring grub ==== | ||
+ | |||
+ | This section details how to get grub talking via the serial port. | ||
+ | |||
+ | This section is optional if the user does not want grub interaction via the serial console port. | ||
+ | |||
+ | Configuring**(Karmic and newer)** | ||
+ | |||
+ | 1) Edit / | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | |||
+ | GRUB_DEFAULT'' | ||
+ | GRUB_TIMEOUT'' | ||
+ | GRUB_DISTRIBUTOR'' | ||
+ | GRUB_CMDLINE_LINUX_DEFAULT''" | ||
+ | |||
+ | # Uncomment to disable graphical terminal (grub-pc only) | ||
+ | GRUB_TERMINAL'' | ||
+ | GRUB_SERIAL_COMMAND''" | ||
+ | |||
+ | # The resolution used on graphical terminal | ||
+ | # note that you can use only modes which your graphic card supports via VBE | ||
+ | # you can see them in real GRUB with the command `vbeinfo' | ||
+ | # | ||
+ | |||
+ | # Uncomment if you don't want GRUB to pass " | ||
+ | # | ||
+ | |||
+ | 2) update grub | ||
+ | |||
+ | '' | ||
+ | |||
+ | Configuring grub**(Edgy/ | ||
+ | |||
+ | 1) Edit / | ||
+ | |||
+ | < | ||
+ | |||
+ | 2) Add the following lines to the top of the file: | ||
+ | |||
+ | < | ||
+ | serial --unit'' | ||
+ | terminal --timeout'' | ||
+ | |||
+ | 3) When you next reboot, the output from grub will go to the normal console**unless** input is received from the serial port. Whichever receives input first becomes the default console. This gives you the best of both worlds. | ||
+ | |||
+ | ==== Configuring the kernel boot parameters ==== | ||
+ | |||
+ | This section details how to configure the kernel boot parameters to get boot information through the console port. | ||
+ | |||
+ | This section is optional if the user does not want the kernel boot messages to appear on the serial console port. | ||
+ | |||
+ | The following procedure can be carried out by modifying the ' | ||
+ | |||
+ | 1) Edit / | ||
+ | |||
+ | < | ||
+ | |||
+ | 2) Modify the kernel line for the image you want to boot using the serial console on. In this case, I'm setting up the default 2.6.10-5.386 kernel to use the serial console line. Change: | ||
+ | |||
+ | < | ||
+ | root (hd0,0) | ||
+ | kernel | ||
+ | initrd | ||
+ | savedefault | ||
+ | boot</ | ||
+ | |||
+ | to: | ||
+ | |||
+ | < | ||
+ | root (hd0,0) | ||
+ | kernel | ||
+ | initrd | ||
+ | savedefault | ||
+ | boot</ | ||
+ | |||
+ | Note two " | ||
+ | |||
+ | 3) Reboot into this kernel. Output from the boot process should be sent via the serial console line. | ||
+ | |||
+ | <h2 id''" | ||
+ | |||
+ | 1) Ensure you have a read/write permissions on /dev/ttyS0. | ||
+ | < | ||
+ | crw-rw---- 1 root dialout 4, 64 2007-12-20 13:56 /dev/ttyS0 | ||
+ | $ id -Gn |grep dialout</ | ||
+ | |||
+ | if the last command didn't show an output add yourself to '' | ||
+ | < | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | 2) Install minicom | ||
+ | < | ||
+ | |||
+ | 3) Configure minicom. | ||
+ | |||
+ | < | ||
+ | |||
+ | 4) Configure client serial port settings: In Serial port setup, set the following options | ||
+ | < | ||
+ | E - Bps/ | ||
+ | |||
+ | 4b) Using 7.10 on the server, I needed to set the following on the client: | ||
+ | < | ||
+ | |||
+ | My 7.10 client and Windows' | ||
+ | |||
+ | 5) Configure Initialization string: In Modem and dialing clear the init | ||
+ | < | ||
+ | |||
+ | 6) Save setup as dfl | ||
+ | |||
+ | 7) You might need to press enter several times to get the connection running. | ||
+ | |||
+ | 8) To log on in the future, run | ||
+ | < | ||
+ | |||
+ | and press enter several times if it does not come up on start up. | ||
+ | |||
+ | <h2 id''" | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | - < | ||
+ | |||
+ | -- Main.FredPettis - 2010-10-13 | ||
ubuntuserialconsole.txt · Last modified: 2013/01/28 04:29 by 127.0.0.1