Grub version1系

設定ファイル:/boot/grub/menu.lst
grub手動インストール
CentOSのDVD boot時にオプションコマンドを指定する
boot: linux rescue
linuxが起動したら以下のコマンドを実行
grub-install --root-directory=/mnt/sysimage --grub-shell=/usr/sbin/grub /dev/sda2 ←パーティション2にインストール、sysimageは既存のLinuxを自動マウントした場合
grub起動コマンドの流れ
1. root (hd0,1) ←パーティション2の場合
2. kernel /boot/vmlinuz-2.6.18-194.32.1.el5 root=/dev/sda2 ro
3. initrd /boot/initrd-2.6.18-194.32.1.el5.img
4. boot
CentOS起動後にgrubコンフィグファイル作成
vi /boot/grub/menu.lst
 timeout 10
 root (hd0,1)
 kernel /boot/vmlinuz-2.6.18-194.32.1.el5 root=/dev/sda2 ro
 initrd /boot/initrd-2.6.18-194.32.1.el5.img
 boot
[ESC] :wq(viを保存して閉じる)
grub-install /dev/sda2
以降起動時に自動でメニューが表示される。
最終更新:2011年03月06日 01:08