LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1125|回复: 11

【求助】急!!新手关于Lilo引导linux和xp的问题。和别人的不一样。在线等。

[复制链接]
发表于 2005-9-25 11:52:32 | 显示全部楼层 |阅读模式
昨日装了redhat 9.0版。
原来,我的电脑装的是XP,硬盘分了四个区。后又找到一块小硬盘,我就把小硬盘作从硬盘,原来的为主硬盘。在小硬盘上分两区装好linux后。重启,在lilo引导界面只有linux,没有windows。
然后我就拆了装Liunx的硬盘,windows不能启动。于是查看/ets/lilo.conf确实没有windows .

我查了论坛上一些解决方法。在lilo中加入
other=/dev/hda1
label="windowsxp"
table=/dev/hda
然后打入#lilo运行
结果lilo还是没有windows选项

这是什么原因,该怎么解决。我得命令写对了吗?我看到有人这样写

other=/dev/hda1
      label="windowsxp"
      table=/dev/hda

也有等号两边空格的,引号里写windows,或没有引号,也有运行#lilo -v,或#/sbin/lilo命令的。这些我都试了,但还是不能没有windows,不能引导。

我是个新手,命令的格式都还不是很懂。
望高手指教。做课题急于用linux.
 楼主| 发表于 2005-9-25 11:58:32 | 显示全部楼层
Lilo界面有linux,而且可以进入
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-25 12:12:55 | 显示全部楼层
这是我的lilo,linux可以启动,但windows不能

prompt
timeout=50
default=DOS
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=/



grub文件如下:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,7)
# kernel /boot/vmlinuz-version ro root=/dev/hda8
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,7)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
回复 支持 反对

使用道具 举报

发表于 2005-9-25 15:49:52 | 显示全部楼层
Post by weizi8848
这是我的lilo,linux可以启动,但windows不能

prompt
timeout=50
default=DOS
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=/
You have no label=DOS...You must define the path to your windows under label=DOS.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-25 16:03:33 | 显示全部楼层
噢,打错了,该死!!
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=/
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-25 16:06:25 | 显示全部楼层
高手快帮帮忙
回复 支持 反对

使用道具 举报

发表于 2005-9-25 16:14:09 | 显示全部楼层
Post by weizi8848
噢,打错了,该死!!
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=/
This is incomplete here. Also, you still have not defined any path to boot your windows!

There are some resources here:
http://bbs.linuxsir.cn/showpost.php?p=690572&postcount=7
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-25 16:44:59 | 显示全部楼层
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=/"
少打个引号.太急了.整了好久没搞好.

\高手就给点实质性的建议吧
回复 支持 反对

使用道具 举报

发表于 2005-9-25 17:06:10 | 显示全部楼层
Post by weizi8848
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=/"
The append= line is useless here.

I haven't used lilo for too long and I cannot remember the exact syntax.
我看到有人这样写

other=/dev/hda1
label="windowsxp"
table=/dev/hda
You need to add something like this but you have to match it with your partition layout.  Please describe your layout.  I mean the result of fdisk -l and state which partitions are for your Linux and windows respectively.
回复 支持 反对

使用道具 举报

发表于 2005-9-25 17:27:59 | 显示全部楼层
改过lilo.conf之后有没有再运行 lilo ?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表