8 Using GRUB via a serial line
8 通过串口线使用GRUB
******************************
This chapter describes how to use the serial terminal support in GRUB.
本章节描述如何使用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 information.
如果你有很多电脑或者很多没有显示器/键盘的电脑,那么通过串口通信 去控制它们是非常有用的。为了通过串口线连接两台电脑,你需要准备一个 零调制解调器电缆。如果你的电脑没有额外的串行端口,你需要准备一个多 串口卡。另外,还需要一个终端仿真器,例如minicom。详细信息请查看你的 操作系统手册。
As for GRUB, the instruction to set up a serial terminal is quite simple. Here is an example:
对于GRUB来说,设置串口终端的方法非常简单。例如下面这个例子:
grub> serial --unit=0 --speed=9600
grub> terminal_input serial; terminal_output 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 *note serial::, for more details.
命令“serial”初始化0号串口单元并设置波特率为9600。0号串口单元通常被 称作“COM1”,因此,如果你想利用COM2,需要用“--unit=2”指定。“serial” 命令有许多其他选项。详细信息查阅“serial”的手册页。
The commands 'terminal_input' (*note terminal_input::) and 'terminal_output' (*note terminal_output::) choose 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_input serial console'. In this case, a terminal in which you press any key will be selected as a GRUB terminal. In the example above, note that you need to put both commands on the same command line, as you will lose the ability to type commands on the console after the first command.
命令“terminal_input”和“terminal_out”设置你使用的是哪种类型的终端。 在上面的情况中,选择的是一个串口终端。而且,通过命令“terminal_inout serial console”, 你可以选择一个“console”终端。如果这样的话,你可以像使用GRUB终端一样使用你的“console” 终端。在上面的例子中,(这句话的意思有点不是很理解,故未翻译)。
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.
然而,GRUB假定你的终端仿真器默认兼容VT100终端。今天的大多数终端都兼容VT100终端。 如果你的终端仿真器不兼容VT100终端,或者不能支持少量的VT100转义字符,那么你需要 给命令传递“--dump”选项。指定该选项后,GRUB会提供给你一些额外的菜单接口,因为通常的 菜单需要一些你的终端独有的特性。
GRUB2官方文档翻译项目2-08
-
- 帖子: 56
- 注册时间: 2011-11-01 14:22
GRUB2官方文档翻译项目2-08
上次由 kin3z 在 2015-05-20 10:10,总共编辑 1 次。
-
- 帖子: 13
- 注册时间: 2014-03-20 8:58
- 系统: windowsxp
Re: GRUB2官方文档翻译项目2-08
As for GRUB, the instruction to set up a serial terminal is quite simple. Here is an example:
职业GRUB,设置串口终端的方法非常简单。例如下面这个例子:
职业grub??
职业GRUB,设置串口终端的方法非常简单。例如下面这个例子:
职业grub??
-
- 帖子: 56
- 注册时间: 2011-11-01 14:22
Re: GRUB2官方文档翻译项目2-08
呵呵小饼仙子 写了:As for GRUB, the instruction to set up a serial terminal is quite simple. Here is an example:
职业GRUB,设置串口终端的方法非常简单。例如下面这个例子:
职业grub??
