Grub2无法引导Windows

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
arvan
帖子: 190
注册时间: 2005-08-02 18:04
来自: Lanzhou
联系:

Grub2无法引导Windows

#1

帖子 arvan » 2009-08-28 11:57

我的系统9.04,grub2开机时无法引导Windows,出现Invalid Signature.不知道如何处理,下面贴上我的fdisk -l的输出和grub.cfg的内容,请大家帮忙分析一下。谢谢。

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1ba41ba3

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 30401 213479752+ f W95 Ext'd (LBA)
/dev/sda5 3825 14278 83971723+ 7 HPFS/NTFS
/dev/sda6 14279 30401 129507966 7 HPFS/NTFS

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6079 48829536 83 Linux
/dev/sdb2 6080 14593 68388705 5 Extended
/dev/sdb5 14220 14593 3004123+ 82 Linux swap / Solaris
/dev/sdb6 6080 14219 65384487 83 Linux

Partition table entries are not in disk order

grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
set root=(hd1,1)
search --fs-uuid --set 612fbd89-a184-4d04-9ab8-ddd3627e8bc4
if font /usr/share/grub/unicode.pff ; then
set gfxmode=1024x768
insmod gfxterm
insmod vbe
insmod png
insmod jpeg
insmod tga
terminal gfxterm
background_image /boot/grub/grub.png
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/black
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
set root=(hd1,1)
search --fs-uuid --set 612fbd89-a184-4d04-9ab8-ddd3627e8bc4
menuentry "Ubuntu, linux 2.6.28-15-generic" {
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=612fbd89-a184-4d04-9ab8-ddd3627e8bc4 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
}
menuentry "Ubuntu, linux 2.6.28-15-generic (single-user mode)" {
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=612fbd89-a184-4d04-9ab8-ddd3627e8bc4 ro single
initrd /boot/initrd.img-2.6.28-15-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
set root=(hd0,1)
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
Jonathan Swift - "May you live every day of your life."
头像
freesky3555
帖子: 138
注册时间: 2007-03-12 17:59
来自: 山西榆次

Re: Grub2无法引导Windows

#2

帖子 freesky3555 » 2009-08-29 9:06

问题是怎么出现的呢?是升级到grub2呢还是其它原因呢?Ubuntu启动没有问题吗?
说一遍很不容易
做一遍更难
做到车轻驾熟,信手拈来那一定是传说中的高手了……………………
强烈推介在这里混的网友使用vimperator!!!!!!!!!!
头像
arvan
帖子: 190
注册时间: 2005-08-02 18:04
来自: Lanzhou
联系:

Re: Grub2无法引导Windows

#3

帖子 arvan » 2009-08-29 13:58

Ubuntu启动没有问题,就是WIndows现在启动不了。

问题应该是GRUB2的安装导致的。 :em06
Jonathan Swift - "May you live every day of your life."
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Grub2无法引导Windows

#4

帖子 wangdu2002 » 2009-08-29 14:03

估计是引导设置的问题,楼主再研究研究,不可能出这种低级错误,要知道哥伦布2代本来就是要替代1代产品的,如果连双系统都搞不定,拿什么替代。 :em06
不过据说哥伦布2代和部分主板Bios不兼容,如果万一你的主板在这之列,就很不幸了,只有用1代或者哥伦布4dos了。 :em02
又看了一下,你是双硬盘的引导,好象前几天有人问过类似的问题,请教下smallapple,他好象比较擅长双硬盘引导。 :em03
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: Grub2无法引导Windows

#5

帖子 smallapple » 2009-08-29 16:39

看来不说话不行了..... :em03

在装grub2之前的grub启动正常吗?windwos是什么格式,ntfs?grub是不是装在sda?
如果正常试试这个

代码: 全选

menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
search -f /ntldr --set root
chainloader +1
}
tadpole128
帖子: 1
注册时间: 2009-08-29 21:27

Re: Grub2无法引导Windows

#6

帖子 tadpole128 » 2009-08-29 21:28

5楼的老兄,非常感激,完全正确
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: Grub2无法引导Windows

#7

帖子 smallapple » 2009-08-29 21:45

tadpole128 写了:5楼的老兄,非常感激,完全正确
ls这位搞定了,可lz好象还没解决。 :em05
cryyyy
帖子: 3
注册时间: 2009-09-01 8:50

Re: Grub2无法引导Windows

#8

帖子 cryyyy » 2009-09-02 10:28

下面这个帖子中6楼提供的grub2是我见到的功能最好的,支持drivemap,能够引导windows。
viewtopic.php?f=139&t=223150
tony988
帖子: 102
注册时间: 2006-04-16 15:48

Re: Grub2无法引导Windows

#9

帖子 tony988 » 2009-09-06 18:31

我也有与楼主类似的问题,GRUB2启动的时候根本不显示选项,grub.cfg如下:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
load_env
set default=0
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set e320c46c-e8d5-4ec3-b563-c191f3ef4294
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-9-generic" {
set quiet=1
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-9-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro quiet
initrd /boot/initrd.img-2.6.31-9-generic
}
menuentry "Ubuntu, Linux 2.6.31-9-generic (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-9-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro single
initrd /boot/initrd.img-2.6.31-9-generic
}
menuentry "Ubuntu, Linux 2.6.31-8-generic" {
set quiet=1
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-8-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro quiet
initrd /boot/initrd.img-2.6.31-8-generic
}
menuentry "Ubuntu, Linux 2.6.31-8-generic (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-8-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro single
initrd /boot/initrd.img-2.6.31-8-generic
}
menuentry "Ubuntu, Linux 2.6.31-3-generic" {
set quiet=1
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-3-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro quiet
initrd /boot/initrd.img-2.6.31-3-generic
}
menuentry "Ubuntu, Linux 2.6.31-3-generic (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set eec5d1cd-5d27-466b-ad19-65e2168b6674
linux /boot/vmlinuz-2.6.31-3-generic root=UUID=eec5d1cd-5d27-466b-ad19-65e2168b6674 ro single
initrd /boot/initrd.img-2.6.31-3-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry "Windows NT/2000/XP (loader)" {
# set root=(hd0,1)
# search --no-floppy --fs-uuid --set 88bf-fbdf
# drivemap -s (hd0) $root
# chainloader +1
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
search -f /ntldr --set root
chainloader +1
}

}

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda5
menuentry "Windows NT/2000/XP (loader)" {
set root=(hd0,5)
search --no-floppy --fs-uuid --set b6e4ba75e4ba3787
drivemap -s (hd0) $root
chainloader +1
}
### END /etc/grub.d/30_otheros ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###

加粗的地方是根据5楼的提示改的,改过后启动依然没有选项,并提示:"no such driver",后面是一串数值,像是硬盘的ID。


硬盘的分区如下:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sda1 1 638 5124703+ b W95 FAT32
/dev/sda2 639 18038 139765500 f W95 Ext'd (LBA)
/dev/sda3 * 18039 18889 6835657+ 83 Linux
/dev/sda4 18890 19457 4562460 83 Linux
/dev/sda5 639 13387 102406311 7 HPFS/NTFS
/dev/sda6 13388 13790 3237066 7 HPFS/NTFS
/dev/sda7 13791 13973 1469916 82 Linux swap / Solaris
/dev/sda8 13974 18038 32652081 83 Linux
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: Grub2无法引导Windows

#10

帖子 smallapple » 2009-09-06 19:17

把这一段删除
### BEGIN /etc/grub.d/30_os-prober ###
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
### END /etc/grub.d/30_os-prober ###


### BEGIN /etc/grub.d/30_otheros ###

### END /etc/grub.d/30_otheros ###
改为:
### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry "Windows NT/2000/XP (loader)" {
insmod ntfs
set root=(hd0,1)
chainloader +1
}
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda5
menuentry "Windows NT/2000/XP (loader)" {
set root=(hd0,5)
search --no-floppy --fs-uuid --set b6e4ba75e4ba3787
drivemap -s (hd0) $root
chainloader +1
}
### END /etc/grub.d/30_otheros ###

你的D盘是不是还有一个windows系统?
头像
AutoXBC
帖子: 1744
注册时间: 2007-10-23 12:54

Re: Grub2无法引导Windows

#11

帖子 AutoXBC » 2009-09-06 20:08

grub2 好复杂啊,chainloader 之前还要 insmod ntfs,你架构倒是好看了,给用户多少麻烦,还真当自己是操作系统了。
tony988
帖子: 102
注册时间: 2006-04-16 15:48

Re: Grub2无法引导Windows

#12

帖子 tony988 » 2009-09-06 20:14

回复真快啊,D盘没有windows,但是有几个WIN的系统文件(BOOT.INI,NTDETECT.COM,NTLDR,以前备份的),估计是GRUB认为有WIN系统。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: Grub2无法引导Windows

#13

帖子 smallapple » 2009-09-06 20:17

那修改部分就改成这样

### BEGIN /etc/grub.d/30_otheros ###

### END /etc/grub.d/30_otheros ###
改为:


### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry "Windows NT/2000/XP (loader)" {
set root=(hd0,1)
chainloader +1
}
### END /etc/grub.d/30_otheros ###

C盘是FAT32的,不用加ntfs.mod
tony988
帖子: 102
注册时间: 2006-04-16 15:48

Re: Grub2无法引导Windows

#14

帖子 tony988 » 2009-09-06 20:28

惨了,现在不能引导了,operating system not found. :em06
tony988
帖子: 102
注册时间: 2006-04-16 15:48

Re: Grub2无法引导Windows

#15

帖子 tony988 » 2009-09-06 20:30

关键是那个启动时的选项为什么没有出来?
回复