双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
wlcyhao
帖子: 7
注册时间: 2008-11-02 19:41
联系:

双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#1

帖子 wlcyhao » 2008-11-13 16:17

sudo fdisk -l后得到分区表如下:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x624aa2e0

Device Boot Start End Blocks Id System
/dev/sda1 2 1410 11317792+ f W95 Ext'd (LBA)
/dev/sda2 * 5101 18812 110141640 7 HPFS/NTFS
/dev/sda3 1411 5100 29639925 83 Linux
/dev/sda5 2 1276 10241406 b W95 FAT32
/dev/sda6 1277 1288 96358+ 83 Linux
/dev/sda7 1289 1410 979933+ 82 Linux swap / Solaris


windows xp 系统的boot.ini文件如下:

[boot loader]

timeout=1

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /DETECTHAL

c:\GRLDR="DOS"

C:\peldr.bi_="Install a third party SCSI , SATA or RAID driver"

现在ubuntu8.04启动正常,但是xp系统不能启动,每次启动都会提示:
<windows root>\system32\hdl.dll文件丢失
adamscao
帖子: 117
注册时间: 2005-10-04 19:38

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#2

帖子 adamscao » 2008-11-13 17:09

把boot.ini里面的partition(1)改成partition(2)试一下呢?
有两处的啊
wlcyhao
帖子: 7
注册时间: 2008-11-02 19:41
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#3

帖子 wlcyhao » 2008-11-13 17:39

adamscao 写了:把boot.ini里面的partition(1)改成partition(2)试一下呢?
有两处的啊
刚刚试过了,还是不行,提示:
Error 12 Invalid device requesed
wlcyhao
帖子: 7
注册时间: 2008-11-02 19:41
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#4

帖子 wlcyhao » 2008-11-13 17:50

sudo gedit menu.list,结果如下:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=f3bec2b4-a5c3-4a3f-a456-74f07e16bc3b ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash locale=zh_CN

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd0,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=f3bec2b4-a5c3-4a3f-a456-74f07e16bc3b ro quiet splash locale=zh_CN
initrd /initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root (hd0,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=f3bec2b4-a5c3-4a3f-a456-74f07e16bc3b ro single
initrd /initrd.img-2.6.24-21-generic

title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd0,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=f3bec2b4-a5c3-4a3f-a456-74f07e16bc3b ro quiet splash locale=zh_CN
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd0,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=f3bec2b4-a5c3-4a3f-a456-74f07e16bc3b ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04.1, memtest86+
root (hd0,5)
kernel /memtest86+.bin
quiet


### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
Cris
帖子: 154
注册时间: 2007-10-17 12:18
系统: Win8/Mac OS X 10.8.3
来自: GZ, China

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#5

帖子 Cris » 2008-11-13 18:37

但是xp系统不能启动,每次启动都会提示:
<windows root>\system32\hdl.dll文件丢失
那说明你的XP有问题嘛,都不关ubuntu或者Grub的事,重装XP吧
头像
drc1234
帖子: 632
注册时间: 2008-08-31 10:09

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#6

帖子 drc1234 » 2008-11-13 19:35

# on /dev/sda2
改SDA1看看,不行,只能重装XP了
头像
heshuaikun
帖子: 550
注册时间: 2008-09-07 23:44

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#7

帖子 heshuaikun » 2008-11-13 20:20

xp系统不能启动,每次启动都会提示:
<windows root>\system32\hdl.dll文件丢失

最近很多人都这样。估计是中毒了。
头像
yiding_he
帖子: 2677
注册时间: 2006-10-25 18:10
来自: 长沙
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#8

帖子 yiding_he » 2008-11-13 20:28

以下是转帖:

百度搜索后发现有许多朋友出现过类似问题,有说是硬盘坏了 有说是内存松了,后来发现最近答案是
提示hal.dll损坏或丢失,实际上该文件并不一定不存在,可以说,拷个文件回去system32里,根本是不可以解决的.出现这个错误的原因是 boot.ini文件出错,导致引导不了机器从指定的路径启动,那样系统搜索其他的路径,而其他路径上是没有hal.dll文件的,就会提示这个错误.一般的解决办法是进入故障恢复控制台,用fixboot命令,如果这样修复不了boot.ini,就用bootcfg/add来重建boot.ini。

这个是由于C盘根目录下的boot.ini文件非法,导致默认从C:\Windows启动,但是又由于你的Windows XP没有安装在C盘,所以系统提示找不到HAL.DLL文件。启动因而失败。解决方法是重新编辑Boot.ini文件。

1)、使用Win9X启动盘启动,使用EDIT.EXE命令编辑这个文件。启动EDIT.EXE以后只要按照正确的格式输入Boot.ini文件的内容,保存为Boot.ini文件即可。

2)、使用COPY CON命令创建一个Boot.ini文件。在DOS下输入Copy Con C:\boot.ini以后回车。然后按照Boot.ini文件的格式输入,每输入一行敲一次回车键,当全部内容输入完毕以后,按CTRL+Z,屏幕上会看到^Z的提示。这个时候再敲一次回车,系统会提示1 file(s) copied.这就表示创建成功了。

3)、使用故障恢复控制台里面的bootcfg命令。

4)、在别的电脑上创建好以后,拷贝到受损电脑的C盘根目录上覆盖源文件即可。


还有个办法,你用个u盘从别个那里拷一个 hal.dll文件,然后插在你的电脑上,再用一张系统安装盘放进光驱。在第一选择里,选择修复,就可以进入doc里了。然后从a: b: 一直试下去,看到了u盘就要吧用
copy hal.dll c:\windows\system32\hal.dll 就可以了,
原理是在安装系统的时候,u盘也会被检测到,就可以用了。软盘也可以。但你应该不会有软驱


经过这样的修复后 如果问题仍在 那么可能是内存的故
你是自由的。别人也是。
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#9

帖子 billbear » 2008-11-13 23:19

你的 boot.ini 是在 fat 分区 sda5 里,还是在 ntfs 分区 sda2 里?
wlcyhao
帖子: 7
注册时间: 2008-11-02 19:41
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#10

帖子 wlcyhao » 2008-11-14 8:02

billbear 写了:你的 boot.ini 是在 fat 分区 sda5 里,还是在 ntfs 分区 sda2 里?
是在fat分区sda5里
wlcyhao
帖子: 7
注册时间: 2008-11-02 19:41
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#11

帖子 wlcyhao » 2008-11-14 8:20

在ntfs 分区 sda2 里也有个boot.ini,内容如下:

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
wqhua
帖子: 2
注册时间: 2008-11-15 2:58

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#12

帖子 wqhua » 2008-11-15 3:13

刚装了UBUNTU8。10,结果WIN也启动不了。
我的WINXP装在C盘(20G),D盘是数据文件(先前是60G),用PQMAGIC把原来的D盘中的割了5G出来,再把这5G分成4G(格式化成EXT3)和1G(SWAP),然后用光盘装UBUNTU8。1。安装的过程中在分区设置时,选择手动,然后直接将先前划出来的EXT3和SWAP分区作为配置,并未选择格式化,安装完成后重启看见有启动选择项(第四项为winxp),没有细看,以为可以进WINXP的,就没有测试。直接进UBUNTU了,后来发现其实进不了WINXP。
选择第四项WINXP后,界面跳转,出现
STARTING UP。。。
GRUB_
再就停止不前。
大家帮看看。
fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2628 21109378+ c W95 FAT32 (LBA)
/dev/sda2 2629 9084 51857820 f W95 Ext'd (LBA)
/dev/sda3 9085 9596 4112640 83 Linux
/dev/sda4 9597 9729 1068322+ 82 Linux swap / Solaris
/dev/sda5 2629 9084 51857788+ b W95 FAT32

奇怪的是为什么有五个区了。
adamscao
帖子: 117
注册时间: 2005-10-04 19:38

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#13

帖子 adamscao » 2008-11-21 11:24

5个分区是因为sda2是扩展分区,又把扩展分区全部划给了sda5。
头像
ranfow
帖子: 176
注册时间: 2006-07-10 16:38
联系:

Re: 双系统,先装的XP,后装的UBUNTU8.04,XP现在不能启动

#14

帖子 ranfow » 2008-11-21 13:56

wqhua
你的启动界面是怎么样的呢?是windows的boot.ini引导还是Ubuntu的grub引导?既然可以进Ubuntu那就是可以看到grub的引导项咯,你可以试一下从grub的启动项中选择Microsoft Windows XP Home Edition(根据你的menu.lst信息应该有这一项)进入,看看可不可以进入windows。
回复