Conserver: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
No edit summary
(No, we actually do not use conserver.)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
We use Conserver, the "console server daemon", to manage serial consoles for most of our systems. Several systems can be powered on using the serial console, and the others are useful for the accessing the system when the network is misconfigured or down.
Several systems can be powered on using the serial console, and the others are useful for the accessing the system when the network is misconfigured or down.


=== The Basics ===
== The Basics ==


To get a list of consoles, type "console -x":
To get a list of consoles, type "console -x":
Line 26: Line 26:
caffeine login: [disconnect]
caffeine login: [disconnect]


For help on available escape sequences, type '^E?'.
For help on available escape sequences, type '^Ec?'.


=== Machine-Specific Hints ===
== Machine-Specific Hints ==


==== ascorbic-acid ====
=== ascorbic-acid ===


Our Netra T1, ascorbic-acid, has a lights-out management (LOM) system on the first serial port. To access LOM, type '#.' while connected to the console. The LOM prompt is "lom>".
Our Netra T1, ascorbic-acid, has a lights-out management (LOM) system on the first serial port.

==== LOM ====

To access LOM, type '#.' while connected to the console.


Debian GNU/Linux 4.0 ascorbic-acid ttyS0
Debian GNU/Linux 4.0 ascorbic-acid ttyS0
Line 56: Line 60:
ascorbic-acid login:
ascorbic-acid login:


To pause the system, type "break". This will give you the mystical "ok" prompt.
To pause the system, type "break". This will give you the mystical "ok" prompt. Another way to get this prompt is to send a break with '^Ecl0'.


lom>break
lom>break
Line 67: Line 71:
ok go
ok go
ascorbic-acid login:
ascorbic-acid login:

==== SILO ====

SILO is the boot loader for Linux on SPARC. Hit tab to see available presets, or type in your own kernel command line.


==== citric-acid ====
=== citric-acid ===


The first serial port on citric-acid is used to access the linux console, the SRM console, and remote console monitor (RCM). SRM is only available when the system is off, and is primarily used to boot the system. RCM can be used while the system is running, and can be used to check the system's status or halt the system.
The first serial port on citric-acid is used to access the linux console, the SRM console, and remote console monitor (RCM). SRM is only available when the system is off, and is primarily used to boot the system. RCM can be used while the system is running, and can be used to check the system's status or halt the system.


===== RCM =====
==== RCM ====


To access RCM from the console, type "^]^]rcm".
To access RCM from the console, type "^]^]rcm".
Line 103: Line 111:
The "halt" command will halt the system immediately and activate the SRM console. Do not use this while the system is running unless absolutely necessary, as it will not shutdown cleanly. Doing a clean "halt" from Linux will also activate the SRM console.
The "halt" command will halt the system immediately and activate the SRM console. Do not use this while the system is running unless absolutely necessary, as it will not shutdown cleanly. Doing a clean "halt" from Linux will also activate the SRM console.


===== SRM =====
==== SRM ====


To access SRM, you must halt the system. When you do, you will be presented with the P00 prompt.
To access SRM, you must halt the system. When you do, you will be presented with the P00 prompt.
Line 137: Line 145:
[...]
[...]


The most important command is "boot". This starts aboot, the boot loader. Typing boot with no arguments uses the default options in "boot_dev", "boot_file", and "boot_osflags" options. The boot_osflags option is the number of the aboot preset to use. You can also boot with specific options:
The most important command is "boot". This starts aboot, the boot loader. Typing boot with no arguments uses the defaults in "boot_dev", "boot_file", and "boot_osflags" options. You can also boot with specific options:


P00>>>boot dkb0 -fi /vmlinuz -fl "ro initrd=/initrd.img root=/dev/mapper/vg0-root console=ttyS0,9600"
P00>>>boot dkb0 -fi /vmlinuz -fl "ro initrd=/initrd.img root=/dev/mapper/vg0-root console=ttyS0,9600"
Line 149: Line 157:
P00>>>boot dkb0 -fl ?
P00>>>boot dkb0 -fl ?


=== See Also ===
=== Qemu and KVM ===

We have several Qemu and KVM VMs. For these, the system console doubles as the "Qemu Monitor" The qemu monitor can be used to change removable devices in the VM, among other things. To swap between the linux console and it, type '^Ac'.

FreeBSD/amd64 (freebsd.csclub.uwaterloo.ca) (ttyd0)
login: (press ^A c)
(qemu)

To show removable drives, type "info block".

(qemu) info block
ide0-hd0: type=hd removable=0 file=/vm/freebsd/hda.img ro=0 drv=vmdk
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

To change media, type "change <device> <filename>".

(qemu) change floppy0 /vm/freebsd/kern1.flp

To terminate the VM, type "quit".

(qemu) quit

=== HP iLO hosts (taurine) ===

The console is on the virtual serial port of the HP Integrated Lights Out system. You can telnet into iLO it if you don't want to use conserver. It will give you a prompt like so:

</>hpiLO->

To access the console, type "vsp". To hard-reset, type "power reset".

=== IPMI hosts (mirror, corn-syrup) ===

Hosts with IPMI have a virtual serial port for IPMI SOL ("Serial-Over-LAN"). The IPMI client asks for a password a couple of times. If you make too many bad guesses, it will die. Hit ^E c o to rerun the client.

=== corn-syrup ===

BIOS console redirection is enabled. If the OS is completely hosed you can PXE boot to rescue or reinstall.

KEY MAPPING FOR CONSOLE REDIRECTION:
Use the <ESC><0> key sequence for <F10>
Use the <ESC><!> key sequence for <F11>
Use the <ESC><@> key sequence for <F12>
Use the <ESC><Ctrl><M> key sequence for <Ctrl><M>
Use the <ESC><Ctrl><H> key sequence for <Ctrl><H>
Use the <ESC><Ctrl><I> key sequence for <Ctrl><I>
Use the <ESC><Ctrl><J> key sequence for <Ctrl><J>
Use the <ESC><X><X> key sequence for <Alt><x>, where x is any letter key, and X is the upper case of that key
Use the <ESC><R><ESC><r><ESC><R> key sequence for <Ctrl><Alt><Del>

== See Also ==


* [[Serial Connections]]
* [[Serial Connections]]
* [[Serial Pin-outs]]
* [[Serial Pin-outs]]
* [[Console Configuration]]
* [[Console Configuration]]

[[Category:Software]]

Latest revision as of 22:31, 15 July 2015

Several systems can be powered on using the serial console, and the others are useful for the accessing the system when the network is misconfigured or down.

The Basics

To get a list of consoles, type "console -x":

% console -x
Enter hobo@caffeine's password: 
 ascorbic-acid            on /dev/ttyS0                       at   9600n
 potassium-citrate        on /dev/ttyS1                       at 115200n
 citric-acid              on /dev/ttyS1                       at   9600n
 [...]

To connect to a console, type "console <name>", replacing name by the name of the console.

% console caffeine
Enter hobo@caffeine's password: 
[Enter `^Ec?' for help]

Debian GNU/Linux 4.0 caffeine ttyS0

caffeine login:

To disconnect, type '^Ec.' That's Control+E followed by 'c' followed by '.'.

caffeine login: [disconnect]

For help on available escape sequences, type '^Ec?'.

Machine-Specific Hints

ascorbic-acid

Our Netra T1, ascorbic-acid, has a lights-out management (LOM) system on the first serial port.

LOM

To access LOM, type '#.' while connected to the console.

Debian GNU/Linux 4.0 ascorbic-acid ttyS0

ascorbic-acid login: (press #.)
lom>

For a list of commands, type "help".

lom>help
alarmon
alarmoff
check
console
environment
faulton
faultoff

To get back to the system console, type "console".

lom>console

ascorbic-acid login: 

To pause the system, type "break". This will give you the mystical "ok" prompt. Another way to get this prompt is to send a break with '^Ecl0'.

lom>break

Type  'go' to resume
ok

This prompt has a debugger among other things. To resume normal execution, type "go".

ok go

ascorbic-acid login:

SILO

SILO is the boot loader for Linux on SPARC. Hit tab to see available presets, or type in your own kernel command line.

citric-acid

The first serial port on citric-acid is used to access the linux console, the SRM console, and remote console monitor (RCM). SRM is only available when the system is off, and is primarily used to boot the system. RCM can be used while the system is running, and can be used to check the system's status or halt the system.

RCM

To access RCM from the console, type "^]^]rcm".

citric-acid login: (press ^]^]rcm)
RCM>

As usual, type "help" for a list of commands.

RCM>help
halt
haltin
haltout
poweroff
poweron
quit
reset
status

Type "quit" to get back to the linux console:

RCM>quit

Focus returned to COM port

citric-acid login: 

The "halt" command will halt the system immediately and activate the SRM console. Do not use this while the system is running unless absolutely necessary, as it will not shutdown cleanly. Doing a clean "halt" from Linux will also activate the SRM console.

SRM

To access SRM, you must halt the system. When you do, you will be presented with the P00 prompt.

P00>>>

To list the hardware (such as disks) attached to the system, type "show dev".

P00>>>show dev
polling ncr0 (NCR 53C810) slot 1, bus 0 PCI, hose 1 �  SCSI Bus ID 7
dka400.4.0.1.1     DKA400                   RRD43  1084
mka600.6.0.1.1     MKA600                   TLZ10  04a8
polling isp0 (QLogic ISP10X0) slot 2, bus 0 PCI, hose 1   SCSI Bus ID 7
dkb0.0.0.2.1       DKB0                     RZ2EA-LA  N1H1
polling isp1 (QLogic ISP10X0) slot 3, bus 0 PCI, hose 1   SCSI Bus ID 7
dkc0.0.0.3.1       DKC0                     RZ1EF-CB  0372
dkc100.1.0.3.1     DKC100                   RZ2EA-LA  N1H1
polling floppy0 (FLOPPY) PCEB - XBUS hose 0   
dva0.0.0.1000.0    DVA0                      RX23

To show variables, type "show".

P00>>>show
auto_action         	BOOT            
boot_dev            	dkb0.0.0.2.1    
boot_file           	vmunix          
boot_osflags        	0               
boot_reset          	OFF             
bootdef_dev         	dkb0.0.0.2.1    
booted_dev          	dkb0.0.0.2.1    
booted_file         	vmunix          
booted_osflags      	?             
[...]

The most important command is "boot". This starts aboot, the boot loader. Typing boot with no arguments uses the defaults in "boot_dev", "boot_file", and "boot_osflags" options. You can also boot with specific options:

P00>>>boot dkb0 -fi /vmlinuz -fl "ro initrd=/initrd.img root=/dev/mapper/vg0-root console=ttyS0,9600"

Alternatively, you can boot a specific aboot preset. Currently the only presets are 0 (default) and 1 (single user).

P00>>>boot dkb0 -fl N

Finally, you can confuse aboot by giving it an invalid preset number. This will give you the aboot prompt.

P00>>>boot dkb0 -fl ?

Qemu and KVM

We have several Qemu and KVM VMs. For these, the system console doubles as the "Qemu Monitor" The qemu monitor can be used to change removable devices in the VM, among other things. To swap between the linux console and it, type '^Ac'.

FreeBSD/amd64 (freebsd.csclub.uwaterloo.ca) (ttyd0)

login: (press ^A c)
(qemu) 

To show removable drives, type "info block".

(qemu) info block
ide0-hd0: type=hd removable=0 file=/vm/freebsd/hda.img ro=0 drv=vmdk
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

To change media, type "change <device> <filename>".

(qemu) change floppy0 /vm/freebsd/kern1.flp

To terminate the VM, type "quit".

(qemu) quit

HP iLO hosts (taurine)

The console is on the virtual serial port of the HP Integrated Lights Out system. You can telnet into iLO it if you don't want to use conserver. It will give you a prompt like so:

</>hpiLO->

To access the console, type "vsp". To hard-reset, type "power reset".

IPMI hosts (mirror, corn-syrup)

Hosts with IPMI have a virtual serial port for IPMI SOL ("Serial-Over-LAN"). The IPMI client asks for a password a couple of times. If you make too many bad guesses, it will die. Hit ^E c o to rerun the client.

corn-syrup

BIOS console redirection is enabled. If the OS is completely hosed you can PXE boot to rescue or reinstall.

KEY MAPPING FOR CONSOLE REDIRECTION:

Use the <ESC><0> key sequence for <F10>
Use the <ESC><!> key sequence for <F11>
Use the <ESC><@> key sequence for <F12>

Use the <ESC><Ctrl><M> key sequence for <Ctrl><M>
Use the <ESC><Ctrl><H> key sequence for <Ctrl><H>
Use the <ESC><Ctrl> key sequence for <Ctrl>
Use the <ESC><Ctrl><J> key sequence for <Ctrl><J>

Use the <ESC><X><X> key sequence for <Alt><x>, where x is any letter key, and X is the upper case of that key

Use the <ESC><R><ESC><r><ESC><R> key sequence for <Ctrl><Alt>

See Also