The volume created of Amazon Linux 2 AMI(HVM), SSD Volume Type - ami-0f511ead81ccde020(64-bit x86) contains two partitions in the GPT partition table. The first partition is the Bios Boot Partition that stores the second stage of the boot loader such as GNU grub. The second partition is the actual root partition.
```
parted /dev/xvda
GNU Parted 3.1
Using /dev/xvda
Welcome to GNU Parted! Type 'help' to view a list of commands.
# sed 's|04b92f2f-4366-4687-868b-7c403cc59901|e47315e4-ff01-49b0-81f7-bac53f08a88b|g' /mnt/vz/boot/grub2/grub.cfg.org > /mnt/vz/boot/grub2/grub.cfg
```
While ```grub2-mkconfig -o /mnt/vz/boot/grub2/grub.cfg``` is a proper command, it inserts the menu entries using the current boot partition(VX). The sample above substituted the UUID of xvdg2 for the auto-produced UUIDs. If you want to skip updating fstab and grub.cfg, you may consider setting the UUID of xvdg2 to match that of xvdf1.
- Install the grub boot loader on /dev/xvdg and unmount /dev/xvdg2
Do the followings in the AWS console or with the AWS cli command.
- Stop the instance IX.
- Detach the volume VZ from IX.
- Attach VZ to IY as /dev/xvda.
- Start IY.
IY has the boot device volume with 2 normal partitions, 1 swap partition, and 1 BIOS Boot partition. The second normal partition labeled 'data' is left free for your own disposal.
```
# parted /dev/xvda
GNU Parted 3.1
Using /dev/xvda
Welcome to GNU Parted! Type 'help' to view a list of commands.
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 492676 0 492676 0% /dev
tmpfs 503444 0 503444 0% /dev/shm
tmpfs 503444 500 502944 1% /run
tmpfs 503444 0 503444 0% /sys/fs/cgroup
/dev/xvda2 5230592 1565416 3665176 30% /
tmpfs 100692 0 100692 0% /run/user/1000
tmpfs 100692 0 100692 0% /run/user/0
# mount /dev/xvda3 /mnt
# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 492676 0 492676 0% /dev
tmpfs 503444 0 503444 0% /dev/shm
tmpfs 503444 500 502944 1% /run
tmpfs 503444 0 503444 0% /sys/fs/cgroup
/dev/xvda2 5230592 1565416 3665176 30% /
tmpfs 100692 0 100692 0% /run/user/1000
tmpfs 100692 0 100692 0% /run/user/0
/dev/xvda3 4183040 37200 4145840 1% /mnt
```
You may enable the swap in the swap partition. If you don't need it, you can change the partition type and format it to a normal file system. You are free to use /dev/xvda3 the way you like.