Linux grub 启动


在grub引导下,系统启动后,出现grub的引导菜单,用上下健选中所要启动的linux系统,然后按字母“e”,进入编辑模式。之后再选中系统的启动内核项(如:kernel (hd0,0)/boot/vmlinuz or root=/dev/hda1 )再次按字母“e”,出现grub>提示,
如下:
grub>kernel (hd0,0)/boot/vmlinuz or root=/dev/hda1
在上面的hda1后空一格,输入init n(init 和n之间有空格,其中n为要求系统进入的运行级别,1 为单用户模式,在这个模式下默认root用户登陆,不要求密码,所以可以在忘记root密码的情况下在这里修改root用户的密码,2 为多用户文本模式(没有NFS),3 为完整的多用户模式(文本),5 为XWINDOWS模式)

完成后如下:

grub>kernel (hd0,0)/boot/vmlinuz or root=/dev/hda1 init 1

然后回车确认,自动返回前一页面,然后再按字母“b”启动系统就可以以修改后的运行级别进入系统,(在这里的修改只影响本次启动,不会修改系统的/etc/inittab文件)。

电脑装了win xp后,又装了linux。不想用linux了,就直接在windows下把linux的分区给格式化了。

    windows系统启动不起来了,一启动就进入grub引导的黑屏。相信有的朋友也这么做过,下面是从网上找的解决方法:
 
    其实,通过grub引导,是完全可以启动windows系统的,只是要输入一些命令而已。这些命令也不难:
grub>root (hd0,0)  //[也可以是:rootnoverify (见最后的英文解释)]
grub>chainloader +1
grub>boot
执行完这三步之后,就可以启动windows系统了。
 
以后每次开机可能都要输入这三步才可以,好是麻烦。
所以可以直接把grub删除掉:
方法1:使用系统启动盘,进入dos,执行fdisk /mbr,清楚MBR。
方法2:进入windows之后,下载还原精灵卸载程序clsmbr.exe,直接清除MBR[不推荐]。
 
rootnoverify
— Command: rootnoverify device

Similar to root (see root), but don't attempt to mount the partition. This is useful for when an OS is outside of the area of the disk that GRUB can read, but setting the correct root device is still desired. Note that the items mentioned in root above which derived from attempting the mount will not work correctly.

 

posted @ 2009-12-17 09:41  clara  阅读(3059)  评论(0编辑  收藏  举报