Formatting the Boot Partition on RHEL or CentOS 7 in Azure

Format the new partition with ext4 or ext3. For example:

# mkfs.ext4 /dev/sda2

The files from the /boot directory should be copied to the new boot partition:

# mkdir -p /tmp/sda2
# mount /dev/sda2  /tmp/sda2
# cp -a /boot/* /tmp/sda2

Find the UUID of the new boot partition:

# blkid /dev/sda2
# umount /tmp/sda2

Add an entry to /etc/fstab to mount the new boot partition, like this:

UUID=<uuid> /boot ext4 rw 0 0

Important: Mount the /boot partition. For example:

# mount /boot

Re-install GRUB on the current boot device (GRUB files need to be copied to /boot, which was mounted in the previous step), like this:

# grub2-install /dev/sda

Note that GRUB is being installed on /dev/sda but the boot directory comes from /dev/sda2. Update your GRUB configuration to take this change into account:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot the system and make sure that it boots properly from the new boot partition.