If a Linux VM is running in Amazon Web Services (AWS), we recommend that you create a boot partition on the existing AWS root volume and then boot from the root volume. Because the root volume will be larger than a new volume created exclusively as a boot volume, AWS will assign more IOPS (Input/Output Operations per Second) to the root volume than to a new volume. This usually results in faster encryption speeds due to the higher number of IOPS available.
Alternatively, if you do not want to create a boot partition on your existing root volume, you can create a new volume that will become the boot partition. For details, see Creating a Boot Partition on a New AWS Volume.
Important: The following method cannot be used for VMs running Amazon Linux. For these VMs you must create a boot partition on a new AWS volume.
Before You Begin
Make sure the VM is powered on and is accessible. You cannot perform this procedure if the VM is powered off.
Procedure
Log into the EC2 console, make sure the VM is powered on, then increase the size of the root volume by 1 GB.
Important: Do not reboot the VM at this point. If you do, RedHat will auto-extend the root file system to fill the new disk space. You must create the boot partition before you reboot the VM.
If you do not know whether the VM uses MBR or GPT partitions, log into the VM as
rootand enter one of the following commands.fdisk -l /dev/xvda. For MBR partitions, the operating system will be shown in the Disklabel type field.# fdisk -l /dev/xvda Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/xvda: 9 GiB, 9663676416 bytes, 18874368 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xe5c7298cgdisk -l /dev/xvda. For GPT partitions, the GPT field in the Partition Label Scan section will display "present".# gdisk -l /dev/xvda GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT.
If the disk contains MBR partitions, use
fdiskto create the boot partition and reboot the VM.
Example:When the VM has finished rebooting, proceed to Step 5.
If the disk contains GPT partitions, use
gdiskto create the boot partition and reboot the VM. During this process you must relocate the backup data structures to the end of the disk in order to create the required free space, as highlighted in the following example.Important: If the disk contains MBR partitions, you must use
fdiskto create the boot partition. If you usegdisk, the VM will become unusable and all data will be lost. If you have MBR partitions, return to Step 3.
ExampleLog back into the VM as
rootand run the scriptaws-prepare-boot.shthat is installed as part of the Entrust Policy Agent package. For example, if you add a new device named/dev/xvda3, you would enter:# /opt/hcs/bin/aws-prepare-boot.sh /dev/xvda3
- Reboot the VM.
What to Do Next
Verify the configuration as described in Verifying the Current VM Configuration and then encrypt the boot device as described in Encrypting Linux System Devices.