Skip to content

Export Ubuntu Instance

0

Hi all,

I have a Ubuntu instance that I'm trying to export via aws cli and I'm getting the following error.

StatusMessage": "ClientError: Unsupported: No grub directories found" Thanks in advance for any help.

asked 2 years ago443 views
2 Answers
2

Hi Juraj,

Please try below steps once it will be helpful to you to resolve your issue.

Step 1: Verify GRUB Installation

Log into the instance:

ssh your-ubuntu-instance

Check if GRUB is installed:

grub-install --version

This command should return the version of GRUB installed. If it doesn't, you need to install GRUB.

Install GRUB (if not installed):

  • sudo apt-get update
  • sudo apt-get install grub-pc

Step 2: Reinstall and Update GRUB

Reinstall GRUB on the boot disk (usually /dev/sda):

sudo grub-install /dev/sda

Update GRUB configuration:

sudo update-grub

Step 3: Verify GRUB Configuration

Ensure that the GRUB configuration files are present in the /boot/grub directory.

List GRUB configuration files

ls /boot/grub

You should see files like grub.cfg and directories such as i386-pc.

Step 4: Snapshot and Export Again

Create a new snapshot of the instance:

Follow the AWS documentation to create a snapshot of your instance's root volume.

Export the snapshot using AWS CLi:

Ensure you follow the correct procedure to export the instance as an AMI and then as a VM image.

aws ec2 create-image --instance-id i-1234567890abcdef0 --name "My server" --no-reboot

Then, export the image:

aws ec2 export-image --image-id ami-1234567890abcdef0 --disk-image-format VMDK --s3-export-location S3Bucket=my-export-bucket,S3Prefix=exports/

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
0

Hello, Thanks for the tips , but did not worked, still same issue.

Thanks.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.