Ubuntu Server 控制台转串口

Ubuntu服务器下配置串口的方法

第一步:

修改grub.conf文件。其中红色粗体倾斜字体为需要添加的部分

Vi /boot/grub/grub.cfg

 

### BEGIN /etc/grub.d/10_linux ###

menuentry 'Ubuntu, with Linux 2.6.32-28-server' --class ubuntu --class gnu-linux --class gnu --class os {

        recordfail

        insmod ext2

        set root='(hd0,1)'

        search --no-floppy --fs-uuid --set 0645bcf6-d33c-446c-b702-fedbf073556c

        linux   /boot/vmlinuz-2.6.32-28-server root=UUID=0645bcf6-d33c-446c-b702-fedbf073556c ro console=ttyS0,19200 console=tty0 

quiet

        initrd  /boot/initrd.img-2.6.32-28-server

}

menuentry 'Ubuntu, with Linux 2.6.32-28-server (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {

        recordfail

        insmod ext2

        set root='(hd0,1)'

        search --no-floppy --fs-uuid --set 0645bcf6-d33c-446c-b702-fedbf073556c

        echo    'Loading Linux 2.6.32-28-server ...'

        linux   /boot/vmlinuz-2.6.32-28-server root=UUID=0645bcf6-d33c-446c-b702-fedbf073556c ro single

        echo    'Loading initial ramdisk ...'

        initrd  /boot/initrd.img-2.6.32-28-server

}

### END /etc/grub.d/10_linux ###

 

第二步:

编写ttyS0.conf文件

Vi  /etc/init/ttyS0.conf

 

start on stopped rc RUNLEVEL=[2345]

stop on runlevel [!2345]

respawn

exec /sbin/getty -L 115200 ttyS0 vt100

 

 

 

注意:如果使用windows 自带的终端 无法输入 的话 请使用 putty 软件 试试

http://blog.chinaunix.net/space.php?uid=781209&do=blog&id=2557129

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值