[root@dywH ~]# mount /dev/mapper/dywhd2-root /mnt/root/
[root@dywH ~]# grub-install --root-directory=/mnt/root/ /dev/sdg1 Probing devices to guess BIOS drives. This may take a long time. /dev/mapper/../dm-7 does not have any corresponding BIOS drive.
[root@dywH ~]# ll /dev/mapper/ total 0 crw-rw----. 1 root root 10, 58 Apr 13 06:40 control lrwxrwxrwx. 1 root root 7 Apr 13 06:56 dywhd2-home -> ../dm-5 lrwxrwxrwx. 1 root root 7 Apr 13 06:56 dywhd2-pub -> ../dm-6 lrwxrwxrwx. 1 root root 7 Apr 13 06:56 dywhd2-root -> ../dm-7 lrwxrwxrwx. 1 root root 7 Apr 13 06:56 dywhd2-swap -> ../dm-4 lrwxrwxrwx. 1 root root 7 Apr 13 06:40 vg_dywH-lv_home -> ../dm-2 lrwxrwxrwx. 1 root root 7 Apr 13 06:40 vg_dywH-lv_pub -> ../dm-3 lrwxrwxrwx. 1 root root 7 Apr 13 06:40 vg_dywH-lv_root -> ../dm-0 lrwxrwxrwx. 1 root root 7 Apr 13 06:40 vg_dywH-lv_swap -> ../dm-1 [root@dywH ~]# mount /dev/sdg1 /mnt/root/boot/ [root@dywH ~]# grub-install --root-directory=/mnt/root/ /dev/sdg1 /dev/sdg1 does not have any corresponding BIOS drive.
[root@dywH ~]# mount /dev/sdg1 /mnt/root/boot/
[root@dywH ~]# grub-install --recheck --root-directory=/mnt/root/ /dev/sdg1 Probing devices to guess BIOS drives. This may take a long time. Installation finished. No error reported. This is the contents of the device map /mnt/root//boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (fd0) /dev/fd0 (hd0) /dev/sda (hd1) /dev/sdg
[root@dywH ~]# grub-install --root-directory=/mnt/root/ /dev/sdg1 Installation finished. No error reported. This is the contents of the device map /mnt/root//boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (fd0) /dev/fd0 (hd0) /dev/sda (hd1) /dev/sdg
rd_LVM_LV=dywhd2/root
中的 dywhd2 為 vg 名稱,root 則為其 lv 的名稱;rd_LVM_LV=dywhd2/swap
一樣的意義, vg dywhd2 下有 lv 名為 swap。檢查這些 vg, lv 是否正確?
[root@dywH ~]# grep ^title -A4 /mnt/root/boot/grub/grub.conf title De-Yu Wang (2.6.32-358.18.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-358.18.1.el6.x86_64 ro \ root=/dev/mapper/dywhd2-root \ rd_LVM_LV=dywhd2/root rd_LVM_LV=dywhd2/swap \ rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 \ SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc \ KEYTABLE=us crashkernel=auto rhgb quiet initrd /initramfs-2.6.32-358.18.1.el6.x86_64.img
2015-04-13