2009年5月24日日曜日

grub

HDが3台あるので、どのHDからでも起動できるように、
全部のドライブのMBRにbrubをインストールする。

GNU GRUB manual
より抜粋

(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.
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.

BIOSの設定でどのドライブがhd0になるか決まる!


If you decide to install GRUB in the native environment, which is definitely desirable, you'll need to create a GRUB boot disk, and reboot your computer with it. Otherwise, see Installing GRUB using grub-install.


Once started, GRUB will show the command-line interface (see Command-line interface). First, set the GRUB's root device4 to the partition containing the boot directory, like this:


grub> root (hd0,0)
(stage1のファイルがあるパーティションを指定)

Once you've set the root device correctly, run the command setup (see setup):

grub> setup (hd0)  
(hd0ブートしたドライブのMBRにgrubをインストール)
grubのインストール

0 件のコメント:

コメントを投稿