linux亦步亦趋(21)linux引导流程二

自举程序grub:

我们知道grub是用来加载内核的,那如何加载及其配置是什么样子的呢。

grub.conf文件:

该文件位于这个目录:即/boot/grub/grub.conf

[root@localhost /]# ls -l /etc/grub.conf
lrwxrwxrwx 1 root root 22 07-31 07:02 /etc/grub.conf -> ../boot/grub/grub.conf
[root@localhost /]# 

查看一下这个文件:

[root@localhost /]# cat /boot/grub/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
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.el5.img
[root@localhost /]# 

 我们之前对该文件进行了解析,今天再进一步解析:

  • default 定义缺省启动的操作系统,多系统下才有用
  • timeout 菜单的等待时间
  • splashimage 背景图片,其中hd0,0 表示的是第一块硬盘的第一个分区,如果是第二个硬盘的第二个分区则是hd1,1.
  • hiddenmenu 隐藏按钮
  • title 操作系统的标题
  • root 内核所在分区
  • kernel 内核文件
  • initrd 所需镜像
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值