DEV Community

David Tio
David Tio

Posted on • Originally published at blog.dtio.app

SLES 16: Add a DVD as a Local Zypper Repository (No Subscription Needed)

💿 SLES 16: Add a DVD as a Local Zypper Repository (No Subscription Needed)

Quick one-liner: Mount the SLES 16 installation DVD (or ISO) as a local zypper repository so you can install packages without a subscription — perfect for air-gapped environments, home lab testing, or grabbing packages you skipped during installation.


🤔 Why This Matters

SLES out of the box is subscription-gated. Try to install anything with zypper on a fresh system and you'll hit this immediately:

Warning: There are no enabled repositories defined.
Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories.
Enter fullscreen mode Exit fullscreen mode

This affects you in three common situations:

🔒 Air-gapped environments — Your network has no path to the SUSE Customer Center. There's no RMT server. zypper simply can't reach anything.

💸 No subscription — You're evaluating SLES in a home lab, or setting up a test box without a paid licence. The online repos are locked behind a registered system.

📦 Missed packages from installation — You kept the installer lean and now realise you need gcc, vim, rsync, or something else that was on the DVD all along. Why re-run the installer when the media is right there?

The DVD you used to install SLES 16 already contains hundreds of packages. Adding it as a local zypper repository unlocks all of them instantly — no internet, no subscription, no reinstall.


✅ Prerequisites

  • OS: SLES 16 installed and running
  • Media: SLES 16 Full installation DVD (physical) or ISO file
  • Access: sudo privileges
  • Time: ~5 minutes

🔍 Before You Start: Check for an Existing Repository

SLES 16 often creates a DVD repository automatically during installation — it's just disabled by default. Check if it's already there:

cat /etc/zypper/repos.d/SLES.repo
Enter fullscreen mode Exit fullscreen mode

If the file exists, you'll see something like this:

[SLES]
name=SUSE Linux Enterprise Server 16.0
enabled=0
autorefresh=0
baseurl=dvd:/install
type=rpm-md
keeppackages=0
Enter fullscreen mode Exit fullscreen mode

Enable it:

sudo zypper modifyrepo --enable SLES
# or the short form:
sudo zypper mr -e SLES
Enter fullscreen mode Exit fullscreen mode

Then skip straight to Step 5: Install Packages below — you don't need to mount anything manually.

If the file doesn't exist, follow Steps 1–4 below to mount the DVD and add the repository manually.


🔧 Step 1: Mount the DVD

Physical DVD drive:

sudo mkdir -p /mnt/dvd
sudo mount /dev/sr0 /mnt/dvd
Enter fullscreen mode Exit fullscreen mode

Confirm the drive device with lsblk if /dev/sr0 isn't right.

ISO file:

sudo mkdir -p /mnt/dvd
sudo mount -o loop /path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd
Enter fullscreen mode Exit fullscreen mode

Verify the mount:

ls /mnt/dvd
Enter fullscreen mode Exit fullscreen mode

Expected output:

.signature  EFI  LiveOS  boot  install
Enter fullscreen mode Exit fullscreen mode

The packages and repository metadata live inside the install/ subdirectory. You can confirm it's a valid zypper repository with:

ls /mnt/dvd/install/repodata
Enter fullscreen mode Exit fullscreen mode

➕ Step 2: Add the Repository

sudo zypper ar /mnt/dvd SLES16-DVD
Enter fullscreen mode Exit fullscreen mode

zypper discovers the repository metadata automatically — no need to point it at the install/ subdirectory, and no GPG trust prompt.


🔄 Step 3: Refresh the Repository

sudo zypper ref SLES16-DVD
Enter fullscreen mode Exit fullscreen mode

Expected output:

Repository 'SLES16-DVD' is up to date.
All repositories have been refreshed.
Enter fullscreen mode Exit fullscreen mode

📌 Step 4: Make the Mount Persistent (Optional)

The mount disappears after a reboot. For a permanent setup, add it to /etc/fstab.

For a physical DVD:

echo "/dev/sr0  /mnt/dvd  iso9660  ro,noauto  0 0" | sudo tee -a /etc/fstab
Enter fullscreen mode Exit fullscreen mode

For an ISO file:

echo "/path/to/SLES-16.0-Full-x86_64.iso  /mnt/dvd  iso9660  ro,loop,noauto  0 0" | sudo tee -a /etc/fstab
Enter fullscreen mode Exit fullscreen mode

The noauto flag means it won't try to mount at boot (which would fail if the DVD isn't in the drive). Mount it manually when you need it:

sudo mount /mnt/dvd
Enter fullscreen mode Exit fullscreen mode

📥 Step 5: Install Packages

You're ready. Install anything available on the DVD the same way you normally would:

sudo zypper install -y <package-name>
Enter fullscreen mode Exit fullscreen mode

For example:

sudo zypper install -y vim
Enter fullscreen mode Exit fullscreen mode
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  vim

1 new package to install.
Overall download size: 1.7 MiB. Already cached: 0 B. After the operation, additional 5.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Enter fullscreen mode Exit fullscreen mode

zypper reads directly from the mounted media — no internet, no subscription check.

💡 Not sure what's available? Search the repo before installing:

# If you enabled the default repository:
zypper search --repo SLES <keyword>

# If you added it manually:
zypper search --repo SLES16-DVD <keyword>
Enter fullscreen mode Exit fullscreen mode

🗑️ Removing the Repository

When you no longer need it, clean up:

# If you added it manually:
sudo zypper rr SLES16-DVD
sudo umount /mnt/dvd

# If you enabled the default repository:
sudo zypper mr -d SLES
Enter fullscreen mode Exit fullscreen mode

⚠️ What You Can and Can't Install

The DVD contains everything that shipped with SLES 16 at release — base packages, development tools, and common server software. That covers the vast majority of day-to-day needs.

What it won't have:

Limitation Details
🔒 Security updates DVD packages are release-day versions only. Updates require a subscription or a local mirror.
📦 Third-party packages Anything outside the SLES base (e.g. Docker CE, custom RPMs) needs a separate repo.
🧩 PackageHub / Modules These are subscription-only channels and aren't on the Full DVD.

For a fully up-to-date air-gapped environment, pair this with a local RMT (Repository Mirroring Tool) server that you sync once and distribute internally.


🚀 What's Next


🙌 Found this useful? Share it with anyone setting up SLES in an air-gapped environment.


SEO Metadata:

  • Title: SLES 16: Add a DVD as a Local Zypper Repository (No Subscription Needed)
  • Meta Description: Mount the SLES 16 DVD or ISO as a local zypper repository to install packages without a subscription. Works in air-gapped environments. Step-by-step guide.
  • Target Keywords: sles 16 local repository, zypper add dvd repo, sles no subscription install packages, sles 16 airgap repository, zypper ar iso sles, sles offline package install
  • Word Count: ~750

Top comments (0)