Skip to content
Advertisement

AWS Root Volume not booting

I went through some steps of adding a second partition on the Root volume. This is because the EBS is 50GB and the first partition only had 8GB allocated. So here are my steps I did:

1.) Detach Volume and attach it as a secondary to another instance.

2.) Use gdisk to create the second partition:

JavaScript

3.) Change FS to ext4 4.) Modify the 1st partitions /etc/fstab so the GUID matches. 5.) Reattach the root volume to the original instance as the root volume.

Now the EC2 does not boot up at all! It gets stuck in the booting screen when I view the image, and it eventually fails the Status checks. What am I doing wrong? Can someone tell me where else I need to change anything on the root partition or if there is anything else I should be doing? I’ve looked everywhere and been through this process at least 10x already! The EC2 instance is running Debian8

Advertisement

Answer

I would recommend resizing using a snapshot of the original volume. Below are the steps to resize a root volume (using AWS API Tools):

  1. Stop the EC2 instance
  2. Detach the root volume from the instance
  3. Create a snapshot of the root volume
  4. Create a new volume from the snapshot with new size (e.g. 50GB) within the same availability zone
  5. Attach the new volume to the instance
  6. Start the instance and access it via ssh
  7. Run resize2fs (e.g. sudo resize2fs /dev/xvda1) to resize new root filesystem
  8. Once confirmed everything works fine, remove the old root volume and the snapshot
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement