User Tools

Site Tools


tech:server_update

Ubuntu Server Update Procedure

This is the normal update procedure for the Ubuntu server.

The goal is to keep the system updated while avoiding problems caused by kernel or NVIDIA driver updates that require a reboot.

1. Refresh Package Information

Run:

sudo apt -o Acquire::ForceIPv4=true update

Using Acquire::ForceIPv4=true avoids the Ubuntu mirror connectivity problem that can occur when the server attempts IPv6 connections that are not available.

2. Review Available Updates

Run:

apt list --upgradable

Review the list before installing anything.

Pay particular attention to updates involving:

linux-image
linux-headers
nvidia-driver
nvidia-utils
libnvidia
nvidia-kernel

Kernel or NVIDIA updates may require a reboot.

3. Install Updates

Run:

sudo apt -o Acquire::ForceIPv4=true upgrade

When prompted:

Continue? [Y/n]

Enter:

y

Ubuntu may leave some packages uninstalled because of “phasing.” This is normal.

Do not force phased updates unless there is a specific reason to do so.

4. Check Whether a Reboot Is Required

After the update finishes, run:

if [ -f /var/run/reboot-required ]; then
  echo "REBOOT REQUIRED"
  cat /var/run/reboot-required.pkgs 2>/dev/null
else
  echo "No reboot required"
fi

If a reboot is required, the output may also list the package or packages responsible.

5. Reboot If Required

If Ubuntu reports that a reboot is required:

sudo reboot

After the server comes back online, reconnect with SSH.

NVIDIA / Plex Warning

If NVIDIA libraries are updated without rebooting, the loaded NVIDIA kernel module may no longer match the installed NVIDIA libraries.

This can cause Plex Media Server to crash immediately at startup.

A symptom of this condition is:

Failed to initialize NVML: Driver/library version mismatch

If this appears after an NVIDIA update, reboot the server before troubleshooting Plex.

After rebooting, verify the NVIDIA driver with:

nvidia-smi

A normal nvidia-smi display indicates that the NVIDIA driver and libraries are communicating correctly.

6. Check Drive Mounts

After updates or a reboot, run mount check for the drives:

for m in /mnt/media{1..8} /mnt/internal; do
  if mountpoint -q "$m"; then
    echo "OK      $m"
  else
    echo "MISSING $m"
  fi
done 

7. Check Server Services

After updates or a reboot, run the server health check:

echo "=== Native Services ==="
for s in plexmediaserver transmission-daemon jdownloader; do
    printf "%-22s %s\n" "$s" "$(systemctl is-active "$s" 2>/dev/null)"
done
 
echo
echo "=== Docker Services ==="
for c in nginx-proxy-manager newsblur_web newsblur_celery newsblur_nginx newsblur_haproxy; do
    printf "%-22s " "$c"
    docker inspect -f '{{.State.Status}}' "$c" 2>/dev/null || echo "not found"
done 

Expected results:

=== Native Services ===
plexmediaserver        active
transmission-daemon    active
jdownloader            active

=== Docker Services ===
nginx-proxy-manager    running
newsblur_web           running
newsblur_celery        running
newsblur_nginx         running
newsblur_haproxy       running 

For normal updates, use:

sudo apt -o Acquire::ForceIPv4=true update
apt list --upgradable
sudo apt -o Acquire::ForceIPv4=true upgrade

For this server, normally avoid using:

apt full-upgrade
apt dist-upgrade

unless there is a specific reason to do so.

Also do not force phased updates unless necessary.

Quick Summary

The normal routine is:

* Refresh package information. * Review available updates. * Install normal eligible updates. * Check whether Ubuntu requires a reboot. * Reboot when required, especially after kernel or NVIDIA updates. * Run nvidia-smi after NVIDIA-related updates. * Run the server health check after rebooting.

tech/server_update.txt · Last modified: by katsimbris