First create a mount point ie:
- Code: Select all
sudo mkdir -p /mnt/extract/01
You could create additional directories to mount other iso's such as 02, 03 etc. I created a directory at /mnt/iso too to store the iso(s) done the same way as was shown in the last command. Move the iso into that directory (/mnt/iso). Open /etc/apt/sources.list with privileges (root/sudo.) Add the following entry, would go ahead and put it at the top of the file, as the 1st entry.
# Local repo. Note: Working repo from a mounted ISO.
deb [trusted=yes] file:/mnt/extract/01/ buster main contrib
If someone were wanting to add multiple iso's then yeah, add entries for them to sources too. The [trusted=yes] part just tells apt it's okay to install pkgs from it, it is a trusted source. Of course someone should refresh package lists as always when changing sources "sudo apt update". Next stop edit the /etc/fstab file, yep ... again with proper privs. Add a line to mount the ISO when system boots. As follows ..
# Iso as local repo
/mnt/iso/debian-10.7.0-i386-DVD-1.iso /mnt/extract/01/ udf,iso9660 loop 0 0
Clearly the above is for a 32bit Debian 10.7 iso, change that appropriately for what you're using.