windows 引导

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
14171216
帖子: 1
注册时间: 2009-09-08 12:30

windows 引导

#1

帖子 14171216 » 2009-09-08 12:35

c盘装xp d盘装windows7后又用一个主分区装了ubuntu9.04后来重装了9.10 没有windows启动项 menu.lst文件中一片空白 求助~
awl
帖子: 22
注册时间: 2008-01-25 16:57

Re: windows 引导

#2

帖子 awl » 2009-09-08 15:16

9.10多数是用grub2导引,最常见的错误是### BEGIN /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 " Microsoft Windows NT/XP/2003" {
set root=(hd0,1)
search --fs-uuid --set 0e48a65048a6367d
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_otheros ###

有时是菜单不显示
常见的问题是### BEGIN /etc/grub.d/30_os-prober ###有多余代码
解决方法是全部清空(删除)
有时是 ### BEGIN /etc/grub.d/00_header ###中设置set timeout=0
解决方案是set timeout=10
上次由 awl 在 2009-09-08 15:20,总共编辑 1 次。
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: windows 引导

#3

帖子 wangdu2002 » 2009-09-08 15:19

哥伦布2代越来越接近了,现在基本能看懂grub.cfg了。 :em02
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: windows 引导

#4

帖子 smallapple » 2009-09-08 15:58

search --fs-uuid --set 0e48a65048a6367d
搜索并设置UUID=0e48a65048a6367d为root,这只有在你电脑上可以,别人uuid就不一样了。而且和set root=(hd0,1)重复
drivemap -s (hd0) ${root}
这句和set root=(hd0,1)配合理解,实际就是 drivemap -s (hd0) (hd0,1),相当grub时的 map (hd0) (hd0,1)。
这名对单硬盘主分区有跟没有没差别,对第二硬盘启动xp才有用。

通用应该是

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry " Microsoft Windows NT/XP/2003" {
set root=(hd0,1)
chainloader +1
}
awl
帖子: 22
注册时间: 2008-01-25 16:57

Re: windows 引导

#5

帖子 awl » 2009-09-08 16:12

drivemap -s (hd0) ${root}
这句和set root=(hd0,1)配合理解,实际就是 drivemap -s (hd0) (hd0,1),相当grub时的 map (hd0) (hd0,1)。
这名对单硬盘主分区有跟没有没差别,对单硬盘逻辑分区或第二硬盘启动xp没效果。

通用应该是

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry " Microsoft Windows NT/XP/2003" {
set root=(hd0,1)
chainloader +1
}[/quote]


实际情况a4 版本drivemap -s (hd0) ${root}这一句连大扩号少了windows启动菜单都不会出现,没办法,只能如此,现在的方法你试过吗?
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: windows 引导

#6

帖子 smallapple » 2009-09-08 16:16

我现在用的grub.cfg就是这样
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "启动 Windows Seven" {
set root=(hd0,1)
chainloader +1
}
awl
帖子: 22
注册时间: 2008-01-25 16:57

Re: windows 引导

#7

帖子 awl » 2009-09-08 16:24

我俩用的菜单不一样,你用的是### BEGIN /etc/grub.d/30_os-prober ###
而我用的是### BEGIN /etc/grub.d/30_otheros ###
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: windows 引导

#8

帖子 smallapple » 2009-09-08 16:30

那只是说明,不影响的,加到
### BEGIN /etc/grub.d/40_custom ###
下面也可以。
原来
### BEGIN /etc/grub.d/30_os-prober ###
下面有几个set timeout=0全删了。

a4和a5的grub2这一句都删过了,没事,不过放着也没影响。 但如果说删掉会引起菜单出不来,应该有其他问题。
回复