📌 21 de Outubro, 2023
Debian: ISO Images as APT Repositories
Informática · Linux
The previous article was about downloading Debian images and packing the entire repository into those. Now, I’ll show you how to configure apt to use ISO images as repositories.
1. Create the folders (mountpoint) to mount the ISO files:
sudo mkdir -p /media/repo_1
sudo mkdir -p /media/repo_2
sudo mkdir -p /media/repo_3
2. Mount the ISO files:
sudo mount -o loop ~/Downloads/debian-12.2.0-amd64-DVD-1.iso /media/repo_1/
sudo mount -o loop ~/Downloads/debian-12.2.0-amd64-DVD-2.iso /media/repo_2/
sudo mount -o loop ~/Downloads/debian-12.2.0-amd64-DVD-3.iso /media/repo_3/
3. Edit the /etc/apt/sources.list
file and add the repository:
vim /etc/apt/sources.list
deb [trusted=yes] file:///media/repo_1/ bookworm main non-free-firmware
deb [trusted=yes] file:///media/repo_2/ bookworm main non-free-firmware
deb [trusted=yes] file:///media/repo_3/ bookworm main non-free-firmware
Done! Now you can update your package cache and install packages as usual:
sudo apt update
sudo apt install package-name