---
title: "[Linux笔记]Debian 10 配置GRUB串口输出控制台"
id: "362"
type: "post"
slug: "linux%e7%ac%94%e8%ae%b0debian-10-%e9%85%8d%e7%bd%aegrub%e4%b8%b2%e5%8f%a3%e8%be%93%e5%87%ba%e6%8e%a7%e5%88%b6%e5%8f%b0"
published_at: "2021-02-10T02:33:29+00:00"
modified_at: "2021-02-10T02:35:03+00:00"
url: "https://www.hitsword.org/2021/362.html"
markdown_url: "https://www.hitsword.org/2021/362.md"
excerpt: "超微的IPMI里有个SOL(Serial-Over-LAN)功能，折腾了一下。 修改完后更新一下grub 然后 […]"
taxonomy_category:
  - "Debian"
taxonomy_post_tag:
  - "console"
  - "Debian"
  - "serial"
---

# [Linux笔记]Debian 10 配置GRUB串口输出控制台

超微的IPMI里有个SOL(Serial-Over-LAN)功能，折腾了一下。

```
nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
#修改成：
GRUB_CMDLINE_LINUX_DEFAULT="quiet console=ttyS2,115200n8 console=tty0"
#其中ttyS2通常代表COM3,ttyS0通常代表COM1.后面的console=tty0是把内容也输出到显示器.
#注意两个"console=ttyxxx"的顺序，init和syslog内容只会输出到最后一个"console=ttyxxx"配置
#增加或修改下面内容
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=2 --word=8 --parity=no --stop=1
#unit=2也是代表COM3.
```

修改完后更新一下grub

```
update-grub
```

  
 然后重启就能从串口输出内容了。
