文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux中LILO及GRUB配置实例

linux中LILO及GRUB配置实例

时间:2009-03-23  来源:sjhf

1.配置LILO是通过编辑/etc/lilo.conf(也可能是/etc/lilo.conf.anaconda文件) 使用cat命令打开如下: [root@localhost etc]# cat lilo.conf.anaconda
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
 
image=/boot/vmlinuz-2.4.20-8
        label=linux
        initrd=/boot/initrd-2.4.20-8.img
        read-only
        append="root=LABEL=/"
 
other=/dev/hda1
        optional
        label=DOS
解释如下: prompt
timeout=50
default=linux
        这三行表示系统启动时将会显示一个lilo提示信息,并等待5秒钟,注意timeout的单位是0.1秒。如果5秒钟之内没有输入系统名字那么将使用默认引导deafault=limux,引导标号为linux的系统。
boot=/dev/hda
        这表示启动盘是第一张ide硬盘(由于这个原因,通常不能从软盘来启动linux) install=/boot/boot.b 表示要将/boot/boot.b文件内容写到引导记录中。该文件在安装linux时已经创建。        接下来定义的是各个引导项目。image=/boot/vmlinuz-2.4.20-8这行定义了启动时使用的内核映像,label=linux定义了这个启动选择项名称是linux。首先是linux,然后是dos(windows),笔者机器上正是安装了linux和windows xp两个系统。 当完成了上述配置工作后,为了使它的设置生效,需要执行/sbin/lilo命令。 2.配置GRUB是通过编辑/boot/grub/grub.conf文件实现的,实例如下 [root@localhost grub]# cat 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/hda3
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
        root (hd0,1)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
[root@localhost grub]#
相关阅读 更多 +
排行榜 更多 +
拉力竞速2

拉力竞速2

体育竞技 下载
文字乱舞水浒

文字乱舞水浒

角色扮演 下载
蓝图公考

蓝图公考

学习教育 下载