no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | linux_serial_console [22.08.2019 09:55] (current) – created Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Linux serial console ====== | ||
+ | here is how to set up your linux to also show a console via serial port. this is especially useful for remote-administration using a serial link to another computer or using IPMI's Serial over Lan (SOL) if you have a out of band management interface like an RMM or ILO or whatever your Hardware vendor calls it. | ||
+ | |||
+ | basically we need to add the '' | ||
+ | here is the description of the '' | ||
+ | < | ||
+ | console=device, | ||
+ | |||
+ | device: | ||
+ | ttyX for any other virtual console | ||
+ | ttySx for a serial port | ||
+ | lp0 for the first parallel port | ||
+ | ttyUSB0 for the first USB serial device | ||
+ | |||
+ | options: | ||
+ | defines the baudrate/ | ||
+ | the port, in the format BBBBPNF, where BBBB is the | ||
+ | speed, P is parity (n/o/e), N is number of bits, | ||
+ | and F is flow control (' | ||
+ | 9600n8. The maximum baudrate is 115200. | ||
+ | </ | ||
+ | If you also want to enable BIOS access, you need to enable the serial console forwarding in the BIOS menu as well. This is usually located under '' | ||
+ | |||
+ | based on that setting, your kernel should be set to the same baud rate. again, use the fastest you can, as having a low baud rate could slow things down during boot. | ||
+ | |||
+ | in CentOS and some other distributions we can now do the following to add the '' | ||
+ | |||
+ | edit the file ''/ | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | now re-create the grub config. in CentOS and other RedHat based distributions that's done like so: | ||
+ | grub2-mkconfig -o / | ||
+ | after your next reboot you should be able to access the console via serial port ttyS0 which is usually the one linked to the BMC / RMM / ILO whatever you call it. | ||
+ | |||
+ | ===== i want it now! ===== | ||
+ | if you want to enable the serial console right away without a reboot, you need to first set the speed of your serial console and then start the console: | ||
+ | stty -F /dev/ttyS0 speed 115200 | ||
+ | systemctl start getty@ttyS0 | ||
+ | |||
+ | ===== connect via IPMI to the SOL console ===== | ||
+ | using ipmitool you can now connect to the serial over lan console with a command like this: | ||
+ | ipmitool -H myserverRMM -U admin -P addminpassword -I lanplus sol activate | ||
+ | to leave the console session, you can type '' | ||
+ | |||
+ | |||