Serial Console di Ubuntu 20.04

Serial Console di Ubuntu 20.04

Tidak semua kejadian crash menghasilkan catatan pesan di console Putty. Untuk itu ditambahkan serial console supaya output dari console dapat direkam di komputer lain. Petunjuk menambahkan serial console didapat di artikel “Ubuntu 18.04: GRUB2 and Linux with serial console

Teknisnya dilakukan dengan mengedit file /etc/default/grub menjadi sebagai berikut:

# If you change this file, run ‘update-grub’ afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n ‘Simple configuration’

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=””
#GRUB_CMDLINE_LINUX=””

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)
#GRUB_BADRAM=”0x01234567,0xfefefefe,0x89abcdef,0xefefefef”

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo’
#GRUB_GFXMODE=640×480

# Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=”true”

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE=”480 440 1″
#
GRUB_CMDLINE_LINUX=”console=tty1 console=ttyS0,115200″
GRUB_TERMINAL=”console serial”
GRUB_SERIAL_COMMAND=”serial –speed=115200 –unit=0 –word=8 –parity=no –stop=1″

Kemudian dilakukan update konfigurai grub dengan aplikasi grub-mkconfig

grub-mkconfig -o /boot/grub/grub.cfg

Setelah itu dilakukan reboot
Output dari serial console diambil dari port COM1, kemudian disambungkan ke USB serial yang terhubung ke sebuah laptop. Di laptop dipakai software Putty sebagai terminal serial. Port COM1 sudah ada di motherboard, namun belum terhubung ke konektor DB9, jadi perlu disambungkan dulu dengan tambahan konektor port serial DB9.

Konektor port serial DB9 untuk COM1 dan COM2
Konektor port serial DB9
Kabel USB ke Serial DB9
Kabel USB ke Serial DB9

One thought on “Serial Console di Ubuntu 20.04

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *