LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1692|回复: 6

如何从grub提示符下进入操作系统引导界面!~~新手!

[复制链接]
发表于 2005-2-23 09:13:24 | 显示全部楼层 |阅读模式
我先用root (hd0,0)  ,然后setup(hd0)
它提示cann't find file
发表于 2005-2-23 09:19:11 | 显示全部楼层
要栽入内核和启动景象~~
你可以看一下grub.conf~~最后引导的linux启动的3条~把他手动打上去
回复 支持 反对

使用道具 举报

发表于 2005-2-23 09:30:39 | 显示全部楼层
楼主要进入什么操作系统?
windows: >root (hdx,y)~~~~~~~~~~~C 盘所在分区
                >chainloader +1
                >boot
linux:        >root (hdx,y)~~~~~~~~~~/boot所在分区
                >kernel /..../kernel****
                >initrd /.../initrd****
                >boot
因为楼主说的不够清楚,只能写到这里了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-24 15:19:44 | 显示全部楼层
以前是red hat 9.0的引导界面。第一个是热点哈特9。0;第二个是dos。现在这个引导界面没有了,一开机提示符就是grub>           
试过:grub>root (hd0,0)  
                       grub>setup(hd0)提示找不到stage1文件
                        用find stage1 也提示找不到文件
我现在想回到一开始的引导界面
楼上说的太理论话了,我想知道具体的操作方法,越详细越好。谢谢!
回复 支持 反对

使用道具 举报

发表于 2005-2-24 16:10:13 | 显示全部楼层
那好的
你的windows安装在第几个分区?如果是第一个主分区的话(通常是这样),then
>root (hd0,0)
>chainloader +1
>boot
然后进入了windows
你的lGNU/Linux安装在第几个分区?如果是第一个逻辑分区的话(可能是这样),then
>root            (hd0,4)
kernel          /boot/vmlinuz-2.6.8-2-686 root=/dev/hda3 ro single~~~~~~~~~~~这是我的,你的分区是怎么样的,我不知道。你就以此类推
initrd          /boot/initrd.img-2.6.8-2-686~~~~~~~~~~~这是我的,你的分区是怎么样的,我不知道。你就以此类推
savedefault
boot
你就可以回到linux的怀抱了,然后记住编辑/boot/grub/menu.lst
怎么编辑呢?
下面是我的
# 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'.           
default                0

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

# 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 optons 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 specifiv 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=root=/dev/hda3 ro

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

## 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

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) 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

## ## End Default Options ##

title                Debian GNU/Linux, kernel 2.6.10-1-686
root                (hd0,2)
kernel                /boot/vmlinuz-2.6.10-1-686 root=/dev/hda3 ro
initrd                /boot/initrd.img-2.6.10-1-686
savedefault
boot

title                Debian GNU/Linux, kernel 2.6.10-1-686 (recovery mode)
root                (hd0,2)
kernel                /boot/vmlinuz-2.6.10-1-686 root=/dev/hda3 ro single
initrd                /boot/initrd.img-2.6.10-1-686
savedefault
boot

title                Debian GNU/Linux, kernel 2.6.8-2-686
root                (hd0,2)
kernel                /boot/vmlinuz-2.6.8-2-686 root=/dev/hda3 ro
initrd                /boot/initrd.img-2.6.8-2-686
savedefault
boot

title                Debian GNU/Linux, kernel 2.6.8-2-686 (recovery mode)
root                (hd0,2)
kernel                /boot/vmlinuz-2.6.8-2-686 root=/dev/hda3 ro single
initrd                /boot/initrd.img-2.6.8-2-686
savedefault
boot

### 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/hda1
title                Microsoft Windows XP Professional
root                (hd0,0)
savedefault
makeactive
chainloader        +1
你当然需要修改了~~~~~~~~~~~~~~~~~~~


%%%%%%%%%强烈建议把你的分区情况说一说!!!!!!!!!!!!!!!!
回复 支持 反对

使用道具 举报

发表于 2005-2-26 00:50:12 | 显示全部楼层
你不过是要修复Grub吧?说个简单的方法
找到linux光盘,从光盘启动
到boot那
输入:linux rescue(进入救援模式)
按照提示,大概只用两下回车就可以了
到了#下后

#chroot /mnt/sysimage(回车)
#grub-install /dev/hda(第一块硬盘,如果你是第2块的话就是hdb)
完了就OK了,如果是iso,提取出来进入相应的目录就可以了
回复 支持 反对

使用道具 举报

发表于 2005-2-26 10:51:35 | 显示全部楼层
还有个方法就是从Dos引导,然后在加载grub,楼主可以看看相关的文章
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表