Next: , Up: General commands   [Contents][Index]


17.3.1 serial

Command: serial [--unit=unit] [--port=port] [--speed=speed] [--word=word] [--parity=parity] [--stop=stop]

Initialize a serial device. unit is a number in the range 0-3 specifying which serial port to use; default is 0, which corresponds to the port often called COM1.

port is the I/O port where the UART is to be found or, if prefixed with ‘mmio,’, the MMIO address of the UART. If specified it takes precedence over unit.

Additionally, an MMIO address can be suffixed with:

Also, port can be of the form ‘pci,XX:XX.X’ to indicate a serial device exposed on the PCI bus.

speed is the transmission speed; default is 9600. word and stop are the number of data bits and stop bits. Data bits must be in the range 5-8 and stop bits must be 1 or 2. Default is 8 data bits and one stop bit. parity is one of ‘no’, ‘odd’, ‘even’ and defaults to ‘no’.

If passed no unit nor port, or if port is set to ‘auto’ then GRUB will attempt to use ACPI to automatically detect the system default serial port and its configuration. If this information is not available, it will default to unit 0.

The serial port is not used as a communication channel unless the terminal_input or terminal_output command is used (see terminal_input, see terminal_output).

Note, valid port values, excluding IO port addresses, can be found by listing terminals with terminal_output, selecting all names prefixed by ‘serial_’ and removing that prefix.

Examples:

serial --port=0x3f8 --speed=9600
serial --port=mmio,fefb0000.l --speed=115200
serial --port=pci,00:16.3 --speed=115200

See also Serial terminal.


Next: , Up: General commands   [Contents][Index]