RED HAT ENTERSPRISE LINUX 5 grub启动文件

GRUB配置详解
本文详细介绍GRUB启动配置文件grub.conf的各项参数含义及配置方法,包括默认启动项、等待时间、启动背景等,并演示了如何手动输入启动命令及配置文件的重建过程。
[root@localhost ~]#more /boot/grub/grub.conf
//显示 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,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
#开始是注释说明信息
default=0
#default=0表示默认启动第一个系统
timeout=5
#timeout就是默认在启动选择界面停留的时间单位是秒。等待5秒自动进入默认操作系统
splashimage=(hd0,0)/grub/splash.xpm.gz
#显示第一块硬盘的,第一个分区/grub目录下的启动背景界面(splash.xpm.gz
Hiddenmenu
#隐藏的菜单
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
#标题红帽子企业版内核版本,启动后显示的信息
        root (hd0,0)
#root启动文件所在位置
        kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
#kernel内核版本和内核所在位置
        initrd /initrd-2.6.18-128.el5.img
#initrd内核镜像
[root@localhost ~]#cd /boot/grub
//切换到grub目录
[root@localhost grub]#rm –rf menu.lst
//删除grub.conf软件接名menu.lst
[root@localhost grub]#rm –rf grub.conf
//删除grub.conf系统启动文件
[root@localhost grub]#reboot
//重启系统
grub>splashimage=(hd0,0)/grub/splash.xpm.gz
//显示grub启动背景画面
grub>root (hd0,0)
//root启动文件所在位置
grub>kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
//kernel内核版本和内核所在位置
grub>initrb /initrb-2.6.18-128.el5.img
//initrd内核镜像的名字
grub>boot
//执行boot启动红帽子
[root@localhost ~]#cd /boot/grub
//切换到grub目录
[root@localhost grub]#vim grub.conf
//打开编辑grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-128.el5.img
[root@localhost grub]#ln –s ./grub.conf menu.lst
//建立一个./grub.conf软连接名为menu.lst”./”表示当前grub目录
[root@localhost grub]#ll
//显示文件详细信息
[root@localhost grub]#reboot
//重新启动系统
这样系统就没有阻碍的运行起来
 









本文转自 chen138 51CTO博客,原文链接:http://blog.51cto.com/chenboqiang/281651,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值