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, 2019 in AWS by Hannah
• 18,520 points
3,255 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 

 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, 2019 by Lisha

Related Questions In AWS

0 votes
0 answers
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
• 58,020 points
2,595 views
0 votes
2 answers

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

A curl or wget to http://169.254.169.254/latest/meta-data/instance-id will ...READ MORE

answered Mar 9, 2020 in AWS by anonymous
6,955 views
0 votes
1 answer
0 votes
1 answer

Install Jenkins on an ec2 instance

Hey @Yamini, follow these steps: 1. Install Java yum ...READ MORE

answered Aug 1, 2019 in AWS by Varsha
6,587 views
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,640 points
3,294 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP