Change in GRUB2
copy relevant entry from /boot/grub/grub.cfg into /etc/grub.d/40_custom
do grub-mkconfig -o /boot/grub/grub.cfg
check which one to make default (initial was 0)
change relevant entry in /etc/default/grub to point to the default
do grub-mkconfig -o /boot/grub/grub.cfg
reboot, hold 'shift' or hit some 'arrow' keys to see the boot menu in kvm... for some reason it goes off very fast.
Kernel Parameters for Serial Console
... $console kgdbwait kgdboc=ttyS0,115200n8 selinux=0
i also tried to redirect console using ... console=ttyS0,115200n8
so, guest inside KVM uses /dev/ttyS0 for regular serial port.
outside KVM, kvm pipes serial port into /dev/pts/X (see host config)
using gdb or gtkterm etc and using port /dev/pts/X, it is easy to capture/push data stream though virtual serial port in host... easy :)
Compiling Kernel outside KVM
do kernel compilation as usual
copy configXX, System-mapXX and vmliuzXX into guest /boot
also copy /lib/modules/XX directory from host into guest /lib/modules/
inside guest, do mkinitramfs -o initrd-img-XX XX
update grub as earlier
reboot, select new kernel
copy relevant entry from /boot/grub/grub.cfg into /etc/grub.d/40_custom
do grub-mkconfig -o /boot/grub/grub.cfg
check which one to make default (initial was 0)
change relevant entry in /etc/default/grub to point to the default
do grub-mkconfig -o /boot/grub/grub.cfg
reboot, hold 'shift' or hit some 'arrow' keys to see the boot menu in kvm... for some reason it goes off very fast.
Kernel Parameters for Serial Console
... $console kgdbwait kgdboc=ttyS0,115200n8 selinux=0
i also tried to redirect console using ... console=ttyS0,115200n8
so, guest inside KVM uses /dev/ttyS0 for regular serial port.
outside KVM, kvm pipes serial port into /dev/pts/X (see host config)
using gdb or gtkterm etc and using port /dev/pts/X, it is easy to capture/push data stream though virtual serial port in host... easy :)
Compiling Kernel outside KVM
do kernel compilation as usual
copy configXX, System-mapXX and vmliuzXX into guest /boot
also copy /lib/modules/XX directory from host into guest /lib/modules/
inside guest, do mkinitramfs -o initrd-img-XX XX
update grub as earlier
reboot, select new kernel
No comments:
Post a Comment