Help Center/ Server Migration Service/ FAQs/ Target Server Configuration and Launch/ How Do I Fix a GRUB Error Because an XFS Volume Is Mounted to the /boot Partition?
Updated on 2024-10-15 GMT+08:00

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 file system is mounted to the /boot partition. After the source server was migrated to Huawei Cloud, the corresponding target server failed to be launched.

Possible Causes

The XFS file system 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 CentOS, for example, CentOS 7.6 or higher. After the system disk is 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 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.

    Figure 1 Editing the GRUB installation script file