Remote Serial Console HOWTO
glen.turner+howto@aarnet.edu.au
mkomarinskiATwayga.org
v2.1 2002-05-16
Revision HistoryRevision 2.12002-05-16Revised by: gdtCorrections to kernel console syntax. Addition of USB and devfs.Revision 2.02002-02-02Revised by: gdtSecond edition.Revision #88041.02001-03-20Revised by: mfkFirst edition.
An RS-232 serial console allows Linux to be controlled from a terminal or modem attached to an asynchronous serial port. The monitor, mouse and keyboard are no longer required for system administration. Serial consoles are useful where Linux systems are deployed in remote sites or are deployed in high-density racks.
This HOWTO describes how to configure Linux to attach a serial console.
Glen Turner would like to thank his family for allowing him to work on this project for the surprisingly large number of evenings which it took to write this HOWTO. Thanks Karen, Kayla and Ella.
loader; 4.2. Configure the GRUB boot loader; 4.3. Configure the SYSLINUX boot loader; 5. Configure Linux kernel: ; 5.1. Configure Linux kernel using LILO; 5.2. Configure Linux kernel using GRUB; 5.3. Configure Linux kernel using SYSLINUX; 6. Configure getty: ; 6.1. init system; 6.2. Traditional getty; 6.3. agetty; 6.4. mgetty; 6.5. mingetty; 6.6. No getty; 7. Configure incidentals: ; 7.1. Allow root to login from serial console; 7.2. Change init level to textual; 7.3. Remove saved console settings; 7.4. Serial console is not /dev/modem; 7.5. Alter target of /dev/systty; 7.6. Configure Pluggable Authentication Modules; 7.7. Configure Red Hat Linux; 8. Reboot and test: ; 8.1. Verify console operation; 8.2. Re-create saved console settings; 8.3. Test the console; 8.4. Where to next from here?; 9. Security: ; 9.1. Use good passwords; 9.2. Obey Data Terminal Ready and Data Carrier Detect; 9.3. Use or configure a dumb modem; 9.4. Restrict console messages; 9.5. Modem features to restrict usage; 9.6. BIOS features; 9.7. Use a boot loader password; 9.8. Non-interactive boot sequence; 9.9. Magic !SysRq? key; 9.10. Adjust behaviour of Ctrl-Alt-Delete; 9.11. Log attempted access; 9.12. Interception of telephony links; 10. Configuring a kernel to support serial console: ; 10.1. Linux kernel version 2.5; 10.2. Linux kernel version 2.4; 10.3. Linux kernel version 2.2; 11. Serial cabling: ; 11.1. Jargon; 11.2. Cable from console port to modem; 11.3. Cable from console port to terminal (or another PC); 11.4. Making serial cables; 12. Modem configuration: ; 12.1. Using Minicom to give commands to a modem; 12.2. Configure dumb modem; 12.3. Configure modem with AT commands; 12.4. Internal modems; 12.5. !WinModems?; A. Bugs and annoyances: ; A.1. Red Hat Linux 7.1 and !SysVinit?; A.2. BIOSs, keyboards and video cards; A.3. Modem hangs up upon reboot; A.4. init and syslog output does not display on secondary consoles; A.5. The console is unresponsive after connecting; A.6. Modem hangs up during initialization; A.7. Boot loader has no flow control; A.8. Boot loaders are vulnerable to line noise; A.9. Advanced Power Management; A.10. Modems and overseas telecommunications requirements; B. Uploading files from a serial console: ; B.1. Disable logging to console; B.2. ASCII upload and cat; B.3. Xmodem, Ymodem and Zmodem; B.4. Kermit; C. Upgrading Red Hat Linux from a serial console: ; C.1. Select boot disk; C.2. Configure the BIOS to use the serial port; C.3. Configure modem to ignore DTR and assert DCD; C.4. Prepare a network install floppy diskette; C.5. Prepare HTTP server; C.6. Record network configuration; C.7. Record LILO configuration; C.8. Upgrade Red Hat distribution; C.9. Create boot disk for serial console; C.10. Further references; D. Terminal server configuration: ; D.1. Considerations when buying second-hand terminal servers; D.2. Cisco 2511; D.3. Xyplex/iTouch MAXserver 1600; D.4. Xylogics/Bay/Nortel Annex; E. Gratuitous advice for developers: ; E.1. Advice for boot loader authors; E.2. Advice for BIOS authors; F. About this HOWTO: ; F.1. Copyright; F.2. Disclaimer; F.3. Acknowledgments; F.4. Comments and corrections; Colophon; List of Tables; 1-1. Different ways of referring to the #8216console#8217; 2-1. Many names for the same serial port; 2-2. Interrupts used for IBM PC/AT RS-232 ports; 4-1. SYSLINUX flow control bitmap; 10-1. IBM-PC/AT serial port bit rates and their bit-clock divisors; List of Figures; 2-1. Using the setserial command in /etc/rc.serialto disable the serial port /dev/ttyS2; 2-2. Syntax for serial bits per second rate, in extended Backus-Naur form; 2-3. Syntax for serial parity, in extended Backus-Naur form; 2-4. Syntax for serial data bits, in extended Backus-Naur form; 2-5. Syntax for serial stop bits, in extended Backus-Naur form; 2-6. Syntax for serial flow control, in extended Backus-Naur form; 2-7. Syntax for kernel serial parameters, in extended Backus-Naur form; 4-1. Syntax of LILO serial command, in EBNF; 4-2. LILO serial EBNF variables; 4-3. LILO boot loader sample configuration; 4-4. Using md5crypt to create a hashed password for GRUB; 4-5. GRUB configuration to require a password; 4-6. GRUB configuration for serial console; 4-7. GRUB configuration for serial console and attached monitor and keybaord console; 4-8. GRUB configuration for command line interface for terminals other than VT100; 4-9. Adding a single user mode option to the GRUB menu; 4-10. Syntax of SYSLINUX serial command, in EBNF; 4-11. SYSLINUX serial EBNF variables; 5-1. Kernel console syntax, in EBNF; 5-2. Recommended kernel parameters, PCs with video card; 5-3. Recommended kernel parameters, PCs without video card; 5-4. Recommended kernel parameters, LILO configuration; 5-5. Recommened kernel parameters, GRUB configuration; 5-6. Recommended kernel parameters, SYSLINUX configuration; 6-1. Interactively altering the connecting terminal's make and model; 6-2. getty is started by init, based upon an entry in /etc/inittab; 6-3. Define CON9600 in gettydefs; 6-4. Syntax of entries in /etc/gettydefs, in EBNF; 6-5. /etc/inittab entry for agetty; 6-6. /etc/inittab entry for mgetty; 6-7. mgetty configuration file mgetty.config; 6-8. Fewer virtual terminals. Removing mingetty entries from /etc/inittab; 6-9. Fewer virtual terminals. Deallocating unused virtual terminals and removing their device files.; 6-10. Contents of /etc/rc.serial to lock console serial port when no getty used; 7-1. Alter securetty to allow root to log in from the serial console; 7-2. Removal of ioctl.save containing the saved console parameters; 7-3. Remove /dev/modem if it points to the serial console's port; 7-4. Default value of /dev/systty in /etc/makedev.d/linux-2.4.x; 7-5. Alter value of /dev/systty in MAKEDEV configuration file; 7-6. Installing new value of /dev/systty; 7-7. Default `consoleb in console.perms refers to attached keyboard and screen; 7-8. Default device listing in console.perms; 7-9. Devices in console.perms required for attached keyboard and screen; 7-10. Add `sconsoleb in console.perms to refer to serial console; 7-11. Remaining devices in console.perms altered to refer to serial console; 7-12. Alterations to /etc/sysconfig/init for Red Hat Linux; 7-13. Alterations to /etc/sysconfig/kudzu for Red Hat Linux; 9-1. Extract from Crackers favour war dialling and weak passwords; 9-2. /etc/syslog.conf modified to copy log messages to a log server; 9-3. Allowing remote log messages by setting options in /etc/sysconfig/syslog; 9-4. Restrict syslog messages to remote.example.edu.au; 9-5. Using nscd to cache reverse DNS lookups; 9-6. Restrict sending of messages to console user; 9-7. Restrict sending of messages to console user, /etc/profile.d/mesg.sh; 9-8. Restrict sending of messages to console user, /etc/profile.d/mesg.csh; 9-9. Install files into /etc/profile.d; 9-10. Using sysctl to defeat the magic !SysRq? key; 9-11. Configuring /etc/sysctl.conf to defeat the magic !SysRq? key; 9-12. Kernel make menuconfig showing disabled !SysRq? key; 9-13. Kernel .config showing disabled !SysRq? key; 9-14. Default handling of Ctrl-Alt-Delete in /etc/inittab; 9-15. Ignoring Ctrl-Alt-Delete in /etc/inittab; 9-16. Shut down cleanly upon Ctrl-Alt-Delete in /etc/inittab; 10-1. Kernel configuration for serial console using make menuconfig; 10-2. Kernel configuration for serial console using .config; 10-3. Kernel configuration for USB dongle serial console using make menuconfig; 10-4. Kernel configuration for USB dongle serial console using .config; 10-5. Kernel configuration for serial console using make menuconfig; 10-6. Kernel configuration for serial console using .config; 11-1. Null modem cable with full status and handshaking; 11-2. Null modem cable with falsified status and handshaking; 11-3. Null modem cable with no status or handshaking; 12-1. Front panel of a dumb modem; 12-2. Testing the modem's port speed; 12-3. Configure modem using AT commands; 12-4. Resetting a Hayes AT-style modem; A-1. setserial causes a modem to hang up as the machine initializes; B-1. Supressing kernel messages to the console in Red Hat Linux; C-1. Configuring BIOS to use serial link; C-2. Configuring BIOS to boot from hard disk; C-3. Extract from Red Hat Linux 7.2 mkbootdisk which creates SYSLINUX.CFG; C-4. Altered extract from mkbootdisk, which creates a SYSLINUX.CFG that uses a serial console; D-1. Basic configuration for Cisco 2511 terminal server to Linux PC; E-1. Configuring /dev/nvram to access the CMOS configuration; E-2. Getting the CMOS configuration; E-3. Setting the CMOS configuration; List of Examples; 4-1. Using kernel parameters to avoid access permissions; 5-1. Complete LILO configuration, as installed by vendor; 5-2. Complete LILO configuration, modified for serial console; 5-3. Complete GRUB configuration, as installed by vendor; 5-4. Complete GRUB configuration, modified for serial console; 8-1. Dialing into a serial console; C-1. Displaying the Internet Protocol configuration; C-2. Displaying the LILO configuration----
''
console n. lib/CachedMarkup.php (In template 'browse' < 'body' < 'html'):257: Error: Pure virtual lib/main.php:944: Notice: PageInfo: Cannot find action page lib/main.php:839: Notice: PageInfo: Unknown action lib/InlineParser.php:336: Warning: Invalid [] syntax ignored: [[From lib/CachedMarkup.php (In template 'browse' < 'body' < 'html'):257: Error: Pure virtual
Fatal PhpWiki Error