如何查看linux是grub还lilo,linux中LILO及GRUB配置实例

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值