Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tetsuyainfra/e273f7780af7dd1c7936939a873ad328 to your computer and use it in GitHub Desktop.
Save tetsuyainfra/e273f7780af7dd1c7936939a873ad328 to your computer and use it in GitHub Desktop.
CentOS, Grubとかのメモ
/etc/default/grub, /etc/sysconfig/grub は同一ファイル(スタティックリンクされてる)
- VGA(物理コンソール)@ tty0
- 物理シリアル@ ttyS0 ← systemd@gettyで待ち受けるようにする
- 仮想シリアル@ ttyS1 ← grob,boot,systemd@getty
- GRUB_SERIAL_COMMAND
boot menuはこっちの設定が使われるので何もしないと9600で出力されることになりもっさりする?)
- GRUB_CMDLINE_LINUX
カーネルに渡す設定
[root@dev0 ~]# cat /etc/sysconfig/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=1"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap console=tty0 console=ttyS1,1152000"
GRUB_DISABLE_RECOVERY="true"
#※従来のBIOSなので
# grub2-mkconfig -o /boot/grub2/grub.cfg
# ログインプロンプト
systemctl enable [email protected]
systemctl enable [email protected]
systemctl start [email protected]
systemctl start [email protected]
systemctl status [email protected]
systemctl status [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment