How to resolve “Instance does not have a volume attached at root (/dev/sda1)” AWS error.

5
(2)

Error details: Instance does not have a volume attached at root (/dev/sda1)

This error comes when Device name given while attaching the root volume differs from Root device attached to EC2 instance during launch.

How to Resolve This Error

In order to resolve this error follow below steps:

Step1: Note down the device name in error while starting the EC2 instance.

Instance does not have a volume attached at root (/dev/sda1)

In the above screen shot error is related to device name /dev/sda1. We need to use same device name while attaching the volume to EC2 instance.

Step2:Detach the currently connected Volume with EC2

  1. Go to ELASTIC BLOCK STORE –> Volumes and select respective attached volume . This volume will be having status as “in-use”.
  2. Then click on Detach volume option from Action drop down menu.

Step3:Attach volume to EC2

Try to attached same volume to EC2 instance. However make sure that you are not using default “Device” such as “/dev/sdf” as below while attaching volume to EC2 instance.

Do not Use below by-default Device name.

Instance does not have a volume attached at root (/dev/sda1)

Instead Use Device name as /dev/sda1  which we have noted down in the step1 as below and click AttachButton:

Instance does not have a volume attached at root (/dev/sda1)

Step4:Start  EC2 instance

This time when you try to start the instance, the error “Instance does not have a volume attached at root (/dev/sda1)” will not occur and your EC2 instance will be start successfully.

Original article sourced from:
https://linuxroutes.com/how-to-resolve-instance-does-not-have-a-volume-attached-at-root-dev-sda1-error/

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *