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

Tools: 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)

🤔 Why This Matters

✅ Prerequisites

🔍 Before You Start: Check for an Existing Repository

🔧 Step 1: Mount the DVD

➕ Step 2: Add the Repository

🔄 Step 3: Refresh the Repository

📌 Step 4: Make the Mount Persistent (Optional)

📥 Step 5: Install Packages

🗑️ Removing the Repository

⚠️ What You Can and Can't Install

🚀 What's Next 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. SLES out of the box is subscription-gated. Try to install anything with zypper on a fresh system and you'll hit this immediately: 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. SLES 16 often creates a DVD repository automatically during installation — it's just disabled by default. Check if it's already there: If the file exists, you'll see something like this: 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. Confirm the drive device with lsblk if /dev/sr0 isn't right. The packages and repository metadata live inside the install/ subdirectory. You can confirm it's a valid zypper repository with: zypper discovers the repository metadata automatically — no need to point it at the install/ subdirectory, and no GPG trust prompt. The mount disappears after a reboot. For a permanent setup, add it to /etc/fstab. 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: You're ready. Install anything available on the DVD the same way you normally would: zypper reads directly from the mounted media — no internet, no subscription check. 💡 Not sure what's available? Search the repo before installing: When you no longer need it, clean up: 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. 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. 🙌 Found this useful? Share it with anyone setting up SLES in an air-gapped environment. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Code Block

Copy

Warning: There are no enabled repositories defined. Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories. Warning: There are no enabled repositories defined. Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories. Warning: There are no enabled repositories defined. Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories. cat /etc/zypper/repos.d/SLES.repo cat /etc/zypper/repos.d/SLES.repo cat /etc/zypper/repos.d/SLES.repo [SLES] name=SUSE Linux Enterprise Server 16.0 enabled=0 autorefresh=0 baseurl=dvd:/install type=rpm-md keeppackages=0 [SLES] name=SUSE Linux Enterprise Server 16.0 enabled=0 autorefresh=0 baseurl=dvd:/install type=rpm-md keeppackages=0 [SLES] name=SUSE Linux Enterprise Server 16.0 enabled=0 autorefresh=0 baseurl=dvd:/install type=rpm-md keeppackages=0 sudo zypper modifyrepo --enable SLES # or the short form: sudo zypper mr -e SLES sudo zypper modifyrepo --enable SLES # or the short form: sudo zypper mr -e SLES sudo zypper modifyrepo --enable SLES # or the short form: sudo zypper mr -e SLES sudo mkdir -p /mnt/dvd sudo mount /dev/sr0 /mnt/dvd sudo mkdir -p /mnt/dvd sudo mount /dev/sr0 /mnt/dvd sudo mkdir -p /mnt/dvd sudo mount /dev/sr0 /mnt/dvd sudo mkdir -p /mnt/dvd sudo mount -o loop /path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd sudo mkdir -p /mnt/dvd sudo mount -o loop /path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd sudo mkdir -p /mnt/dvd sudo mount -o loop /path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd ls /mnt/dvd ls /mnt/dvd ls /mnt/dvd .signature EFI LiveOS boot install .signature EFI LiveOS boot install .signature EFI LiveOS boot install ls /mnt/dvd/install/repodata ls /mnt/dvd/install/repodata ls /mnt/dvd/install/repodata sudo zypper ar /mnt/dvd SLES16-DVD sudo zypper ar /mnt/dvd SLES16-DVD sudo zypper ar /mnt/dvd SLES16-DVD sudo zypper ref SLES16-DVD sudo zypper ref SLES16-DVD sudo zypper ref SLES16-DVD Repository 'SLES16-DVD' is up to date. All repositories have been refreshed. Repository 'SLES16-DVD' is up to date. All repositories have been refreshed. Repository 'SLES16-DVD' is up to date. All repositories have been refreshed. echo "/dev/sr0 /mnt/dvd iso9660 ro,noauto 0 0" | sudo tee -a /etc/fstab echo "/dev/sr0 /mnt/dvd iso9660 ro,noauto 0 0" | sudo tee -a /etc/fstab echo "/dev/sr0 /mnt/dvd iso9660 ro,noauto 0 0" | sudo tee -a /etc/fstab echo "/path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd iso9660 ro,loop,noauto 0 0" | sudo tee -a /etc/fstab echo "/path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd iso9660 ro,loop,noauto 0 0" | sudo tee -a /etc/fstab echo "/path/to/SLES-16.0-Full-x86_64.iso /mnt/dvd iso9660 ro,loop,noauto 0 0" | sudo tee -a /etc/fstab sudo mount /mnt/dvd sudo mount /mnt/dvd sudo mount /mnt/dvd sudo zypper install -y <package-name> sudo zypper install -y <package-name> sudo zypper install -y <package-name> sudo zypper install -y vim sudo zypper install -y vim sudo zypper install -y vim 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 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 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 # If you enabled the default repository: zypper search --repo SLES <keyword> # If you added it manually: zypper search --repo SLES16-DVD <keyword> # If you enabled the default repository: zypper search --repo SLES <keyword> # If you added it manually: zypper search --repo SLES16-DVD <keyword> # If you enabled the default repository: zypper search --repo SLES <keyword> # If you added it manually: zypper search --repo SLES16-DVD <keyword> # 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 # 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 # 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 - OS: SLES 16 installed and running - Media: SLES 16 Full installation DVD (physical) or ISO file - Access: sudo privileges - Time: ~5 minutes - Need Docker on this SLES system? Check out How to Install Docker Rootless on SLES 15/16 - 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