12. Reinstall grub on the newly boot partition:
# grub-install --recheck /dev/xvdg
# sed -i 's/sdg/xvdg/g' /boot/grub/device.map
# grub-install /dev/xvdg
运行第一行得到:
Probing devices to guess BIOS drives. This may take a long time.
No suitable drive was found in the generated device map.
Reverting to backed up copy.
它似乎创建了 device.map,所以我继续,第二个命令有效,但第三个命令给我:
expr: non-numeric argument
Could not find device for /boot
lblsk 给我:
[root@ip-111-111-111-111 grub]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
└─xvda1 202:1 0 8G 0 part
xvdf 202:80 0 2T 0 disk
└─xvdf1 202:81 0 1.6T 0 part
xvdg 202:96 0 1G 0 disk
└─xvdg1 202:97 0 1019.7M 0 part /boot