How Do I Fix a GRUB Error Because an XFS Volume Is Mounted to the /boot Partition?
Symptom
On a source server running CentOS 7.1, an XFS volume is mounted to the /boot partition. After the source server is migrated to HUAWEI CLOUD, the corresponding target server failed to be launched.

Possible Causes
The XFS file system volume is mounted to the /boot partition, causing a GRUB error.
Solutions
- Solution 1
Detach the system disk from the target server, and attach it to another ECS running for example CentOS7.6. After the system disk is successfully attached, mount the XFS file system and unmount the file system. Then detach the disk and attach it back to the original server.
- Solution 2
Edit the GRUB installation script file SMS-Agent/agent/linux/resources/shell/install_grub.sh on the source server, locate the install_grub2 function, and add the two lines of code in the red box in the following figure. Then restart the Agent for migration.
Figure 1 Editing the GRUB installation script file
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.