Tuesday, 11 March 2025

Make file and nvme for Graviton2 instances

 I wan tto use below but ec2 has no make git clone https://github.com/linux-nvme/nvme-cli.git cd nvme-cli make sudo make install

ChatGPT said:

Since your EC2 instance has no internet and lacks make, you will need to manually download the required files on your Windows laptop, transfer them to EC2, and then build nvme-cli without internet access. Follow these steps:


Step 1: Download Required Files on Windows

Since your EC2 instance lacks git, make, and other build tools, you need to download everything first.

  1. Download the nvme-cli Source Code:

  2. Download Required Dependencies (Amazon Linux 2 / CentOS / RHEL) Since the EC2 instance has no internet, you need to manually download dependencies. These packages must be transferred to EC2:

    • gcc
    • make
    • autoconf
    • automake
    • libtool
    • pkg-config
    • libuuid-devel
    • util-linux
    • util-linux-devel

    How to Download Manually:

    • Go to https://rpmfind.net/ and search for the required RPMs.
    • Download the aarch64 versions (for AWS Graviton2 instances).

Step 2: Transfer Files to EC2

Since your EC2 instance has no internet, you need to manually transfer the source code and dependencies.

  1. Transfer via SCP:
    • If using Windows PowerShell or Git Bash, run:
      powershell
      scp -i your-key.pem -r nvme-cli ec2-user@<EC2-IP>:/home/ec2-user/ scp -i your-key.pem *.rpm ec2-user@<EC2-IP>:/home/ec2-user/
    • Replace your-key.pem with your AWS private key.
    • Replace <EC2-IP> with your EC2 instance's private or public IP.

Step 3: Install Dependencies on EC2

  1. Connect to your EC2 instance via SSH:

    bash
    ssh -i your-key.pem ec2-user@<EC2-IP>
  2. Install Required Dependencies:

    • Install the downloaded RPMs manually:
      bash
      sudo yum localinstall *.rpm -y

Step 4: Build nvme-cli on EC2

  1. Navigate to the source code directory:

    bash
    cd /home/ec2-user/nvme-cli
  2. Build the NVMe CLI tool manually:

    bash
    make sudo make install
  3. Verify Installation:

    bash
    nvme list

Final Notes

  • Since your EC2 has no internet, make sure you download the correct RPM dependencies for Amazon Linux 2 / RHEL (aarch64 architecture).
  • If make is still missing after installing dependencies, check by running:
    bash
    which make
    If it’s missing, install it manually:
    bash
    sudo yum localinstall make-*.aarch64.rpm

Let me know if you need help with any step! 🚀

No comments:

Post a Comment