一、概述

      要想实现字符启动,需要修改grub.cfg(启动配置文件),将“静态启动”改为“字符启动”。

      但是grub.cfg通常只作为只读文件,修改它时实际上修改的是其他的文件然后再通过update-grub命令更新到此文件上。

二、相关文件说明

1、/boot/grub/grub.cfg

    grub.cfg的开头注释内容如下:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

2、/etc/default/grub

    grub文件的原始内容

# 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_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

三、实现步骤

1、将grub修改成如下内容

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX=""

    也就是将静态启动行注释掉,换成字符启动的。

2、更新/boot/grub/grub.cfg

#update-grub

 四、如何切换到图形界面

方法一:

#/etc/init.d/lightdm start

方法二:

#startx

 

参考网页

1、 http://www.startos.com/ubuntu/tips/2011031423787.html

 2、http://zhidao.baidu.com/link?url=cZc1GYSJBRxiHT-8SeJW1TVOWFE6jeJLE3AD2NotwVBfGNk9hYKecuRlI_iQ0inKw_FM5cSm0wrH4zXIExZHta        

posted on 2014-03-17 19:14  amanlikethis  阅读(2109)  评论(0编辑  收藏  举报