====== GRUBで起動しない ====== ===== だいたいはこれで起動する。 ===== CDロムから起動して boot: linux rescue # chroot /mnt/sysimage \\ # grub-install /dev/sda ==== chrootができない場合 ==== # mkdir /mnt/sysimage \\ # mount /dev/sda1 /mnt/sysimage \\ # ln -s /usr/sbin/grub /usr/bin/ \\ # grub-istall rootdirectory=/mnt/sysimage /dev/sda ===== たまにgrub-installできない場合がある ===== たまにですが、どうやってもgrub-installできない場合がある\\ その時は、grubコマンドで直接grubをセットアップすると治った事があります。 # chroot /mnt/sysimage/ \\ # grub-install /dev/sda \\ /dev/md0 does not have any corresponding BIOS drive \\ # grub-install --recheck /dev/sda \\ /dev/md0 does not have any corresponding BIOS drive \\ # # grub \\ grub> root (hd0,0) \\ root (hd0,0) \\ Filesystem type is ext2fs, partition type 0xfd \\ grub> setup (hd0) \\ setup (hd0) \\ Checking if "/boot/grub/stage1" exists... no \\ Checking if "/grub/stage1" exists... yes \\ Checking if "/grub/stage2" exists... yes \\ Checking if "/grub/e2fs_stage1_5" exists... yes \\ Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. \\ succeeded \\ Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded \\ Done. \\ grub> quit \\ # reboot \\ ===== エラー ===== たまにgrub-installしても下記のエラーで失敗することがある。 does not have any corresponding BIOS drive ==== 対応方法 ==== 下記でデバイスが違っている場合があるので修正するとgrub-installできます。 # cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/xvda {{tag>Grub}}