All Products
Search
Document Center

Server Migration Center:Resolve the "Not enough space on /boot" error

Last Updated:Jun 03, 2026

Problem description

The "Not enough space on /boot" error occurs during operating system migration.

Cause

The /boot partition requires at least 100 MiB of free space to install the new initramfs and kernel. If the /boot directory has less than 100 MiB available, the migration fails.

Solution

Remove unused kernel versions from the /boot directory, including the corresponding initramfs, vmlinuz, and config files. Verify that the system boots correctly after removal.

  1. Connect to the ECS instance as the root user. Connect to a Linux instance by using a password or key.

  2. View the installed kernel versions:

    rpm -qa | grep kernel
  3. Check the currently running kernel version:

    uname -r

    Example output:

    [root@iZbp104w56ovfyfxy9o**** ~]# uname -r
    3.10.0-1160.el7.x86_64
  4. Remove unused kernel versions.

    In this example, kernel-3.10.0-514.26.2.el7.x86_64 is removed.

    • If the kernel was installed from an RPM package, run:

      yum remove kernel-3.10.0-514.26.2.el7.x86_64
    • If the kernel was installed by compiling the source code, run the following commands in sequence:

      REMOVE_KERNEL=3.10.0-514.26.2.el7.x86_64
      grubby --remove-kernel=/boot/vmlinuz-$REMOVE_KERNEL
      rm -rf /boot/initramfs-$REMOVE_KERNEL.img /boot/initramfs-${REMOVE_KERNEL}kdump.img /boot/symvers-$REMOVE_KERNEL.gz /boot/System.map-$REMOVE_KERNEL /boot/vmlinuz-$REMOVE_KERNEL /boot/config-$REMOVE_KERNEL
      grubby --remove-kernel=/boot/vmlinuz-$REMOVE_KERNEL
  5. Set the latest remaining kernel as the default boot kernel.

    1. View all installed kernels:

      grubby --info=ALL
    2. View the current default boot kernel:

      grubby --default-kernel

      Example output:

      [root@iZbp104w56ovfyfxy9o**** ~]# grubby --default-kernel
      /boot/vmlinuz-3.10.0-1160.90.1.el7.x86_64
    3. Set the latest kernel as the default.

      In this example, 3.10.0-1160.76.1.el7.x86_64 is set as the default boot kernel.

      grubby --set-default /boot/vmlinuz-3.10.0-1160.76.1.el7.x86_64
  6. After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.