LinuxSir.cn,穿越时空的Linuxsir!

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

问:关于GRUB

[复制链接]
发表于 2004-7-28 23:08:31 | 显示全部楼层 |阅读模式
从论坛上看到了
1.把安装盘的第一张放到光驱,然后重新启动机器,在BOIS中把系统用光驱来引导。
2.等安装界面出来后,按[F4]键,也就是linux rescue模式。如果是Redhat 8.0可能是F5吧。

然后在boot下输入

linux rescue

然后就是回车一下。

3.一系列键盘以及几项简单的配制,过后就[继续]了。。。这个过程,我不说了,比较简单。
4.然后会出现这样的字符
sh#
5.我们就可以操作GRUB了。。。哈。。。只要能出现这样的,以后都是小KISS了,我就是不说 ,谁也能明白,地球人都知道了。。。。
sh#grub
会出现这样的字符
grub>
我们就可以在这样的字符后面,输入
grub>root (hdX,Y)
grub>setup (hd0)





问一:
其中的grub>root (hdX,Y)   
   hd 我知道是硬盘的意思 那么后面的 x,y 就是硬盘编号吗?
我只记得硬盘都是 hda or hdb 再加上数字啊
这里为什么会有一个”豆号“?
请大家讲一讲吧
发表于 2004-7-28 23:22:15 | 显示全部楼层

答地球人

hdX,Y 是grub表示硬盘分区的方式,
hd0 -> hda
hd1 -> hdb
hd2 -> hdc
....
Y 表示分区,从0开始。
hd0,0 -> hda1
hd0,1 -> hda2
发表于 2004-7-28 23:26:18 | 显示全部楼层
google关键词grub
http://www.gnu.org/software/grub/manual/grub.html
Naming convention


The device syntax used in GRUB is a wee bit different from what you may have seen before in your operating system(s), and you need to know it so that you can specify a drive/partition.


Look at the following examples and explanations:

    (fd0)
     

First of all, GRUB requires that the device name be enclosed with ( and ). The fd part means that it is a floppy disk. The number 0 is the drive number, which is counted from zero. This expression means that GRUB will use the whole floppy disk.

    (hd0,1)
     

Here, hd means it is a hard disk drive. The first integer 0 indicates the drive number, that is, the first hard disk, while the second integer, 1, indicates the partition number (or the PC slice number in the BSD terminology). Once again, please note that the partition numbers are counted from zero, not from one. This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.

    (hd0,4)
     

This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from 4, regardless of the actual number of primary partitions on your hard disk.

    (hd1,a)
     

This means the BSD a partition of the second hard disk. If you need to specify which PC slice number should be used, use something like this: (hd1,0,a). If the PC slice number is omitted, GRUB searches for the first PC slice which has a BSD a partition.


Of course, to actually access the disks or partitions with GRUB, you need to use the device specification in a command, like root (fd0) or unhide (hd0,2). To help you find out which number specifies a partition you want, the GRUB command-line (see Command-line interface) options have argument completion. This means that, for example, you only need to type

    root (
     

followed by a <TAB>, and GRUB will display the list of drives, partitions, or file names. So it should be quite easy to determine the name of your target partition, even with minimal knowledge of the syntax.


Note that GRUB does not distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.


Now the question is, how to specify a file? Again, consider an example:

    (hd0,0)/vmlinuz
     

This specifies the file named vmlinuz, found on the first partition of the first hard disk drive. Note that the argument completion works with file names, too.


That was easy, admit it. Now read the next chapter, to find out how to actually install GRUB on your drive.
 楼主| 发表于 2004-7-28 23:39:22 | 显示全部楼层
谢了
努力学习中
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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