Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10410905
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:14:32

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]#

阅读(1134) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~