Skip to content

Instantly share code, notes, and snippets.

@tonybruess
Last active March 12, 2022 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tonybruess/8249889519abd93dfba9 to your computer and use it in GitHub Desktop.
Save tonybruess/8249889519abd93dfba9 to your computer and use it in GitHub Desktop.
Upgrade e1000e drivers

Upgrade e1000e drivers on Ubuntu

Simply run ./upgrade.sh.

Information

Make sure to run shutdown -r now after completing installation.

Also, use lshw -C network to verify the driver installation.

If the driver is still outdated after reboot, make sure /etc/modules contains e1000e.

#! /bin/bash
DRV_PKG_NAME="e1000e-3.1.0.2"
DRV_PKG_URL="https://cdn.oc.tc/${DRV_PKG_NAME}.tar.gz"
# Function declaration
error_action () {
echo "Failed!"
exit 1
}
echo "Downloading and extracting driver package..."
wget ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME}.tar.gz || error_action
echo "Installing build dependencies..."
apt-get install -y build-essential linux-headers-$(uname -r) || error_action
# Going into the driver source directory
cd ${DRV_PKG_NAME}/src/
echo "Building module and updating initramfs..."
{ make install && update-initramfs -u; } || error_action
if grep --quiet e1000e /etc/modules; then
echo "e1000e is already defined"
else
echo "Adding e1000e to modules file"
echo e1000e >> /etc/modules
fi
echo "Restarting iface..."
{ ifdown eth0 && ifup eth0; } || error_action
{ ifdown eth1 && ifup eth1; } || error_action
# Checking installed driver version
if [[ $(modinfo -F version e1000e) == "3.1.0.2-NAPI" ]]; then
echo "Driver successfully installed!"
else
echo "Something went wrong..."
exit 1
fi
exit 0
@JanStorm
Copy link

FYI: Seems like that this DRV_PKG_URL is not available anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment