This chapter describes how to use the serial terminal support in GRUB.
If you have many computers or computers with no display/keyboard, it
could be very useful to control the computers through serial
communications. To connect one computer with another via a serial line,
you need to prepare a null-modem (cross) serial cable, and you may need
to have multiport serial boards, if your computer doesn't have extra
serial ports. In addition, a terminal emulator is also required, such as
minicom. Refer to a manual of your operating system, for more
As for GRUB, the instruction to set up a serial terminal is quite
simple. First of all, make sure that you haven't specified the option
--disable-serial to the configure script when you built your
GRUB images. If you get them in binary form, probably they have serial
terminal support already.
Then, initialize your serial terminal after GRUB starts up. Here is an
grub> serial --unit=0 --speed=9600
grub> terminal serial
The command serial initializes the serial unit 0 with the
speed 9600bps. The serial unit 0 is usually called `COM1', so, if
you want to use COM2, you must specify `--unit=1' instead. This
command accepts many other options, so please refer to serial,
for more details.
The command terminal (see terminal) chooses which type of
terminal you want to use. In the case above, the terminal will be a
serial terminal, but you can also pass console to the command,
as `terminal serial console'. In this case, a terminal in which
you press any key will be selected as a GRUB terminal.
However, note that GRUB assumes that your terminal emulator is
compatible with VT100 by default. This is true for most terminal
emulators nowadays, but you should pass the option --dumb to
the command if your terminal emulator is not VT100-compatible or
implements few VT100 escape sequences. If you specify this option then
GRUB provides you with an alternative menu interface, because the normal
menu requires several fancy features of your terminal.
Published under the terms of the GNU General Public License