Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Using an ISO as a local software repository.

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Using an ISO as a local software repository.

#1 Post by Deb-fan »

This is what was working for me on Buster, to use a downloaded Debian ISO as an (offline)local repository.

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.
Most powerful FREE tech-support tool on the planet * HERE. *

imwacc0
Posts: 7
Joined: 2021-01-22 14:42

Re: Using an ISO as a local software repository.

#2 Post by imwacc0 »

deb [trusted=yes] file:/mnt/extract/01/ buster main contrib
Ok, I get "deb [trusted=yes] file:" but "/mnt/extract/01/" the trailing "/" tells me there's something in that directory. But what dose "buster main contrib" mean? I ass-u-me that buster is for 10.7? Dose "extract" mean that you un-ziped the ISO?
/mnt/iso/debian-10.7.0-i386-DVD-1.iso /mnt/extract/01/ udf,iso9660 loop 0 0
I think I get this, but what is "udf,iso9660 loop 0 0"? If I change the name of the ISO (stop having to type long file names) is it going to read some tag inside and use the original name, or the new name? Or will that mess something else down the line?

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Using an ISO as a local software repository.

#3 Post by Deb-fan »

Debian 10 codename = Buster. Google ( or whichever other search engine that tickles your fancy)is your friend. :)

Ps, changing the name of the ISO to being something shorter + easier to work with shouldn't cause any issues, at least seeing no reason why it would, though also hadn't tried it in this case, for this usecase. So I went with using the full iso name as it was. Try it and see, any way it goes no harm and no biggie to resolve. Put it back as it was ... DAMMIT: No ... no extraction necessary, can see how that'd be a tad confusing. Just leave it as is, as a normal ISO. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Using an ISO as a local software repository.

#4 Post by Head_on_a_Stick »

hier(7) wrote:/mnt
This directory is a mount point for a temporarily mounted filesystem.
So you should create a custom mount point elsewhere.
deadbang

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Using an ISO as a local software repository.

#5 Post by CwF »

I think I detailed my offline repository a few tears back, maybe I posted.

I used the mount point /pool/distro/$arch with subs a-z. I either mount a usb there, or copy to the disk. Had the corresponding 'trusted' entries in sources.list. When you pull the packages from wherever, CD's, scarfed from apt cache, individually downloaded, wherever... then run scanpackages at the directory root, from packages dpkg-dev, to produce the packages.gz file which is the index file read by apt. I went a few years using this at my 10000' no access 'hut'.

Synaptic also has the facility to 'generate download script' and 'add downloaded packages' which teams up with w-get on another computer, even a windows machine!

With low bandwidth, a vm got the upgrades, scarf the packages to the 'pool', run scanpackages, then use in all other machines!

A little less productive was me trying to create a squid-like cache of gigs of internet I could accumulate, and browse at the hut. Anyway, the off-line repository is easier than most know, needing just dpkg-dev and a terminal.

For one CD sure, keep it an iso, but realize you can break it up and combine ALL of the DVD's into a working single repository...

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Using an ISO as a local software repository.

#6 Post by Deb-fan »

Yep, seen that same thing stated very early on when started dorking with gnu/Linux. That being /mnt isn't intended for permanent mounting. However after 10yrs of extensively using mnt for permanent uses and never causing me the slightest problem, gonna conclude it's okay. :D Of course anyone is free to adapt the info in the how-to and create mount points elsewhere if they wish.
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply