install and enable the latest Elastic Network Adapter driver on an EC2 instance

0 votes
I need to install and enable the latest Elastic Network Adapter driver on an EC2 instance. How do I do it?

BTW my EC2 instance is Red Hat Linux 6.
Oct 11 in AWS by Hannah
• 16,210 points
61 views

1 answer to this question.

0 votes

Hi @Hannah, execute the following commands:

Download and install the ENA driver:

sudo -i    # Become root. The rest of the steps assume that they are being run by root user.
yum install kernel-devel-$(uname -r) gcc git patch rpm-build wget
wget https://github.com/amzn/amzn-drivers/archive/master.zip
unzip master.zip
cd amzn-drivers-master/kernel/linux/ena
make
cp ena.ko /lib/modules/$(uname -r)/                          # Copy the module to the modules directory    
insmod ena.ko                                                # Insert the module to validate it loads successfully
depmod                                                       # Regenerate kernel module dependency map files
echo 'add_drivers+=" ena "' >> /etc/dracut.conf.d/ena.conf   # Append once                         
dracut -f -v                                                 # Generate the new initrd image
lsinitrd /boot/initramfs-xxx.el6.x86_64.img | grep ena.ko    # Validate that the initramfs image contains the ena driver
yum upgrade kernel && reboot

RHEL 6

yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

 Install the DKMS:

yum install dkms

VER=$( grep ^VERSION /root/amzn-drivers-master/kernel/linux/rpm/Makefile | cut -d' ' -f2 )   # Detect current version

sudo cp -a /root/amzn-drivers-master /usr/src/amzn-drivers-${VER}   # Copy source into the source directory.

cat > /usr/src/amzn-drivers-${VER}/dkms.conf <<EOM                  # Generate the dkms config file.
PACKAGE_NAME="ena"
PACKAGE_VERSION="$VER"
CLEAN="make -C kernel/linux/ena clean"
MAKE="make -C kernel/linux/ena/ BUILD_KERNEL=\${kernelver}"
BUILT_MODULE_NAME[0]="ena"
BUILT_MODULE_LOCATION="kernel/linux/ena"
DEST_MODULE_LOCATION[0]="/updates"
DEST_MODULE_NAME[0]="ena"
AUTOINSTALL="yes"
EOM

dkms add -m amzn-drivers -v $VER
dkms build -m amzn-drivers -v $VER
dkms install -m amzn-drivers -v $VER

Then, regenerate the configuration files for grub2:

grub2-mkconfig -o /boot/grub2/grub.cfg 

Retstart instnace

answered Oct 11 by Lisha

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

Install RStudio on AWS EC2 instance

Amazon Linux AMI 2017.09.1 is based on ...READ MORE

answered Jul 27, 2018 in AWS by Priyaj
• 56,900 points
520 views
0 votes
1 answer

How can I find out the instance id of an ec2 instance from within the ec2 instance?

On Amazon Linux AMIs you can do: $ ...READ MORE

answered Sep 10, 2018 in AWS by Archana
• 4,090 points
44 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How can I just increase the size of my root disk on AWS EC2 for use with Elastic Beanstalk?

This can be done using the following ...READ MORE

answered Nov 12, 2018 in AWS by Archana
• 5,560 points
230 views