Previous Entry Share Next Entry
using serial console in qemu+kvm with grub and grub2
I usually use "virsh console <virtual domain>" command to access 
domain's virtual serial console. There are only few steps 
needed to allow control grub or grub2 and see boot output via this console:

grub (RHEL and Fedora < 16)

 1. add 2 following lines to main part of /boot/grub/grub.conf
serial --unit=0 --speed=38400
terminal --timeout=10 serial console
 2. add "console=ttyS0" to the end of kernel command line
title Red Hat Enterprise Linux (2.6.32-131.0.15.el6.x86_64)
     root (hd0,0)
     kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro ... console=ttyS0

grub2 (Fedora > 15)

 1. add these lines to /etc/default/grub
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1"
 2. add "console=ttyS0" to BOOT_IMAGE variable in the same file

 3. regenerate /boot/grub2/grub.cfg
# grub2-mkconfig -o /boot/grub2/grub.cfg


Log in

No account? Create an account