公司有一臺服務器安裝的了rhel5系統,默認的內核是帶xen的內核,正好有個交換機要調試,鏈接後發現串口設備沒法工做。 諮詢服務器廠家客服後獲得一下答覆: 產生緣由: 這是由於Xen會缺省將串口1 ttyS0看做是虛擬控制檯,從而其餘串口設備沒法正常工做。 解決方法: 一、安裝不帶XEN支持的內核,串口使用恢復正常。 二、按如下方法更改grub.conf 文件: # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,1) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/sda default=0 timeout=5 splashp_w_picpath=(hd0,1)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.18-8.el5xen) root (hd0,1) kernel /xen.gz-2.6.18-8.el5 module /vmlinuz-2.6.18-8.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet module /initrd-2.6.18-8.el5xen.img #新增如下啓動項 title Red Hat Enterprise Linux Server (2.6.18-8.el5xen serial) root (hd0,1) kernel /xen.gz-2.6.18-8.el5 console=vga xencons=ttyS16 console=ttyS16 module /vmlinuz-2.6.18-8.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet xencons=tty module /initrd-2.6.18-8.el5xen.img 使用修改過參數的內核項啓動,使用minicom鏈接交換機,登錄調試一切正常。