Skip to content

Issue with connectivity

0

My Ubuntu server this morning suddenly lost connectivity. After I checked the status, "Instance reachability check failed"

And after this, I also tried to troubleshot by seeing the system log. However the system log always blank. (not sure why)

Then i choose to see "Get instance screenshot". It showed me "Error: boot/grub/i386-pc/normal.mod not found"

And now I cannot reboot or start the server successfully.

Can anyone guide me what should I do? Some people told me that i need to terminate and start a new server. However I do not really want to redo the server as I already have many configuration on it.

Thank you

Really appreciate.

  • please accept the answer if it was useful

asked 2 years ago454 views
2 Answers
1

Hello,

Please try this solution it will be helpful for you.

If your Ubuntu server has lost connectivity and is showing an "Error: boot/grub/i386-pc/normal.mod not found," you can attempt to recover it without terminating the instance.

First stop the affected instance via the AWS Management Console.

Then detach the root EBS volume from this instance and attach it to a new temporary recovery instance in the same availability zone. SSH into the recovery instance, mount the detached volume, and chroot into it.

Once inside the chroot environment, reinstall the GRUB bootloader by running grub-install /dev/xvdf (replace with the correct device name) and update-grub. Exit the chroot environment, unmount the volume, and detach it from the recovery instance. Reattach the volume back to the original instance as /dev/sda1.

Finally start the affected instance again. If the issue persists, you might need to check the filesystem integrity using fsck or perform a complete reinstall of GRUB. This process should help you recover your server without losing your existing configurations.

Please look at Document Link you will get more information.

https://stackoverflow.com/questions/71544436/how-to-fix-aws-ec2-status-check-showing-instance-reachability-check-failed

EXPERT
answered 2 years ago
0

Step 1: Stop the Instance

Stop the Instance:

  • Log in to the AWS Management Console.
  • Go to the EC2 dashboard.
  • Select your affected instance and stop it.

Step 2: Create a Snapshot of the Root Volume

Create a Snapshot:

  • Go to the Elastic Block Store (EBS) section in the AWS Console.
  • Find the root volume attached to your instance.
  • Create a snapshot of this volume to ensure you have a backup before making any changes.

Step 3: Attach the Root Volume to Another Instance

Launch a New Temporary Instance:

  • Launch a new temporary EC2 instance in the same availability zone as your affected instance. This instance will be used to repair the filesystem.
  • Choose an instance type and operating system similar to your affected instance (preferably Ubuntu).

Detach the Root Volume:

  • In the EC2 dashboard, select the stopped instance.
  • Go to the Description tab and find the root volume (typically /dev/xvda or /dev/sda1).
  • Detach the root volume from the affected instance.

Attach the Root Volume to the Temporary Instance:

  • Attach the detached volume to the temporary instance as a secondary volume (e.g., /dev/sdf).

Step 4: Repair the Filesystem

Connect to the Temporary Instance:

  • SSH into the temporary instance.

Mount the Attached Volume:

  • Create a mount point: sudo mkdir /mnt/recovery
  • Mount the volume: sudo mount /dev/sdf1 /mnt/recovery
  • Note: Use /dev/sdf1 if it is the first partition; otherwise, use /dev/sdf.

Chroot into the Mounted Volume:

sudo chroot /mnt/recovery

Reinstall GRUB:

  • Install GRUB: grub-install /dev/xvdf (or /dev/nvme1n1 if using NVMe)
  • Update GRUB configuration: update-grub

Exit the Chroot Environment and Unmount:

  • Exit chroot: exit
  • Unmount the volume: sudo umount /mnt/recovery

Step 5: Reattach the Volume and Restart the Instance

Detach the Volume from the Temporary Instance:

  • Go to the EBS section in the AWS Console.
  • Detach the volume from the temporary instance.

Reattach the Volume to the Original Instance:

  • Attach the volume back to the original instance as the root volume (e.g., /dev/xvda or /dev/sda1).

Start the Original Instance:

  • Start the original instance and check if it boots correctly.

Step 6: Verify and Monitor

Connect to the Original Instance:

  • SSH into your original instance once it is running.

Verify System Logs:

  • Check the system logs to ensure there are no other issues: dmesg, journalctl -xe, and /var/log/syslog.
EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 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.