关于debian的grub问题

19 views
Skip to first unread message

enzo fang

unread,
Oct 11, 2009, 12:16:38 AM10/11/09
to debian-c...@lists.debian.org
大家好
我的问题有点奇怪,在linux下用reboot ,init 6等命令重启系统的时候,
系统进入不到grub的菜单。非要按电源关机一下,再按电源开机才能正常进grub菜单。
还有,我记得没有把grub装在mbr,但是开机启动时会先进入grub菜单,然后
我选择windows选项,才进入NTloader。这点非常不明白,如果我没把grub
装到mbr,应该是开机进入NTloader,并且没有grub选项的?希望大家发表高见。


--
Best Regards

enzo fang

unread,
Oct 11, 2009, 2:39:46 AM10/11/09
to vmlinz unconscious, debian-c...@lists.debian.org
我没有装kexec-tools

enzo@debian:~/bin$ dpkg -s kexec-tools
系统没有安装软件包“kexec-tools”,因而没有相关的信息。
使用 dpkg --info (= dpkg-deb --info) 来检测打包好的文件,
还可以用过 dpkg --contents (= dpkg-deb --contents) 来列出它们的内容。

看来不是它的问题。
2009/10/11 vmlinz unconscious <vml...@gmail.com>
可能是用了kexec-tools了,重启的时候没有真正重启而是热启动内核了。http://packages.debian.org/sid/kexec-tools
删除kexec-tools工具,或者查看下启动脚本。

2009/10/11 enzo fang <feixian...@gmail.com>




--
Best Regards

enzo fang

unread,
Oct 11, 2009, 3:37:48 AM10/11/09
to 苏, debian-c...@lists.debian.org
系统正常关机,开机后能显示bios启动画面,然后进不到grub菜单

grub确实没有装在mbr上,我还特意用了fdisk /mbr重新
恢复了windows的mbr,但是没有效果

2009/10/11 苏 <sxps...@yahoo.com.cn>
你用 init 6 重启时系统退出后又直接启动内核还是退出后停在那里没有反应?

既然你开机是 grub 选项,可以肯定是你把 grub 安装到 mbr 了,
__________________________________________________
�Ͽ�ע���Ż����������������ä?
http://cn.mail.yahoo.com




--
Best Regards

Liang Guo

unread,
Oct 11, 2009, 8:42:10 AM10/11/09
to debian-c...@lists.debian.org, debian-c...@lists.debian.org
grub 版本是多少?  grub配置文件怎么写的?

2009/10/11 enzo fang <feixian...@gmail.com>



--
Liang Guo
http://bluestone.cublog.cn

flygu...@163.com

unread,
Oct 11, 2009, 9:54:38 PM10/11/09
to debian-c...@lists.debian.org
ls -l /sbin/{reboot,shutdown}
看看结果是什么?
另外电源管理方面有没有什么特殊的地方?

enzo fang

unread,
Oct 11, 2009, 10:15:18 PM10/11/09
to 苏, debian-c...@lists.debian.org
[boot loader]
timeout=5
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
c:\Arldr=DOSTool
这是我的boot.ini,默认不是从windows启动吗,没有像你说的加载grldr(我这里可能变成了arldr),不解?

另外,已经把grub装到mbr
那个不能重启问题依然存在,总觉得和debian
acpi电源管理设置有关,兄台有什么高见

2009/10/11 苏 <sxps...@yahoo.com.cn>
那没有什么好奇怪的了,开机时加载 win 的mbr, 之后加载的是 ntldr, ntldr
默认加载 grldr,grldr 加载 menu.lst,menu.lst 也可以集成到 grldr
中去,这时候你看到的菜单就是 grldr 的menu.lst.

解决问题很简单,只要在 boot.ini 中去把 win
改成默认就可以了,这样默认加载 windows 系统。

推荐把 GNU grub 写到 mbr 中去,也可以把 grub4dos(grldr
是其加载器)的mbr写到硬盘首扇区去,两者可以实现相似的功能。


On 日, 11 10月 09, enzo fang wrote:
> 就是很奇怪
> boot.ini 中还有一个矮人工具箱的dos选项
>
> 2009/10/11 苏 <sxps...@yahoo.com.cn>
>
>     这么诡异?
>
>     用了 grub4dos 没有,看看你的 c 盘根目录 c:\boot.ini 中有没有除 windows
>     的其它条目?



--
Best Regards

enzo fang

unread,
Oct 11, 2009, 10:18:57 PM10/11/09
to Liang Guo, debian-c...@lists.debian.org
版本是0.97

default 0
timeout 5
.......
 120    ## ## End Default Options ##
   121   
   122    title        Debian GNU/Linux, kernel 2.6.26-2-686
   123    root        (hd0,2)
   124    kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda3 ro quiet
   125    initrd        /boot/initrd.img-2.6.26-2-686
   126   
   127    title        Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
   128    root        (hd0,2)
   129    kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda3 ro single
   130    initrd        /boot/initrd.img-2.6.26-2-686
   131   
   132    ### END DEBIAN AUTOMAGIC KERNELS LIST
   133   
   134    # This is a divider, added to separate the menu items below from the Debian
   135    # ones.
   136    #title        Other operating systems:
   137    #root
   138   
   139   
   140    # This entry automatically added by the Debian installer for a non-linux OS
   141    # on /dev/sda1
   142    title        Microsoft Windows XP Professional
   143    root        (hd0,0)
   144    savedefault
   145    chainloader    +1


2009/10/11 Liang Guo <bluesto...@gmail.com>



--
Best Regards

enzo fang

unread,
Oct 11, 2009, 10:25:46 PM10/11/09
to flygu...@163.com, debian-c...@lists.debian.org
enzo@debian:/mnt$ ls -l /sbin/{reboot,shutdown}
lrwxrwxrwx 1 root root     4 10-11 01:16 /sbin/reboot -> halt
-rwxr-xr-x 1 root root 18256 09-15 08:34 /sbin/shutdown
兄台所说的电源管理方面的特殊的地方是指什么?

2009/10/12 <flygu...@163.com>



--
Best Regards

Liang Guo

unread,
Oct 11, 2009, 10:25:46 PM10/11/09
to debian-c...@lists.debian.org, debian-c...@lists.debian.org
我的机器上启动xp的部分配置如下:
=======================
title           Widows XP
root            (hd0,0)
makeactive
chainloader +1
============================

savedefault 用来将上一次的启动选择作为默认选项, 不知道和你的问题有没有关联,
FYI: http://www.gnu.org/software/grub/manual/html_node/savedefault.html#savedefault


2009/10/12 enzo fang <feixian...@gmail.com>
Reply all
Reply to author
Forward
0 new messages