Recently I installed Debian 8.4.0 on my system. I installed it from DVD ISO downloaded from Debian’s site. After installation of basic system, I needed a faster way to install new packages and for that I setup local repo from the downloaded ISOs.
To do so, I followed the following steps:
1. Create mount points at your required locations e.g. /media/username/CD1, /media/username/CD2 etc.
2. Update /etc/fstab with entries for mounting ISO image every time on reboot:
/home/username/Debian/debian-8.4.0-amd64-DVD-1.iso /media/username/CD1/ iso9660 loop,ro,user,noauto 0
3. After saving changes, run mount -a as root to make sure your changes are done correctly in /etc/fstab. Once this is confirmed, you can now mount this point by running mount /media/username/CD1Â as root.
4. Now Update /etc/apt/sources.list with the following:
deb file:///media/username/CD1/ jessie main contrib
Make sure you comment out any other line pointing to CD ROM mounting of same ISO image present in sources.list. Once this is done run apt-get update
This should now first contact your local repo and then go ahead to other repos you have listed in sources.list.