Updated: 28 September 2026 · Applies to: GRUB 2 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 (BIOS and UEFI)
A separate /boot partition holds the kernels and the boot loader's files. You may need a new or bigger one when /boot is too small for current kernels (updates fail with "not enough space on /boot"), or after moving the system to a new disk. This is a delicate change: a mistake leaves the server unable to boot. Do it only with console access (IPMI, KVM or your VPS panel's console) and a tested backup.
First check: is a bigger /boot really needed?
Often it is enough to remove old kernels. Current releases keep three by default:
df -h /boot dnf remove --oldinstallonly --setopt installonly_limit=2
AlmaLinux, Rocky Linux and RHEL 9 and 10 recommend at least 1 GiB for /boot.
Create and fill the new /boot partition
- Create a partition of at least 1 GiB on a disk the firmware can boot from, and a file system on it (see how to partition and mount a new disk):
mkfs.xfs -L boot /dev/sdb1
- Copy the current contents with all attributes, leaving out the contents of the EFI partition (on UEFI systems
/boot/efiis its own small partition and stays where it is; only the empty folder is copied):mkdir /mnt/newboot mount /dev/sdb1 /mnt/newboot rsync -aAX --exclude='/efi/*' /boot/ /mnt/newboot/
- Get the new partition's UUID with
blkid /dev/sdb1, and in/etc/fstabreplace the UUID on the/bootline with the new one (keep a copy of the old file). - Switch over and restore SELinux labels:
umount /mnt/newboot umount /boot/efi 2>/dev/null umount /boot mount /boot mount /boot/efi 2>/dev/null restorecon -Rv /boot
- Make the boot loader use the new partition. On BIOS servers, install GRUB to the boot disk and regenerate its menu:
grub2-install /dev/sdb grub2-mkconfig -o /boot/grub2/grub.cfg
On UEFI servers, do not rungrub2-install. The smallgrub.cfgin the EFI partition finds/bootby its file system UUID, so write a new one for the new partition, then regenerate the menu:gen_grub_cfgstub /boot/grub2 /boot/efi/EFI/almalinux grub2-mkconfig -o /boot/grub2/grub.cfg
Use your distribution's folder name under/boot/efi/EFI/(for examplerockyorredhat).gen_grub_cfgstubcomes with thegrub2-efipackage and reads the new UUID itself; check the result withcat /boot/efi/EFI/almalinux/grub.cfg. - Reboot and check with
findmnt /bootandcat /proc/cmdline. Keep the old/bootpartition untouched until the server has booted from the new one several times.
If the server does not boot, use the rescue steps in how to reinstall GRUB2 from rescue mode, and switch /etc/fstab back to the old UUID.
Official documentation: Reinstalling GRUB (Red Hat).
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
