Using an ISO as a local software repository.

Share your own howto's etc. Not for support questions!

Using an ISO as a local software repository.

Postby Deb-fan » 2021-01-22 19:30

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. *
Deb-fan
 
Posts: 1008
Joined: 2012-08-14 12:27

Re: Using an ISO as a local software repository.

Postby imwacc0 » 2021-01-22 20:25

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?
imwacc0
 
Posts: 4
Joined: 2021-01-22 14:42

Re: Using an ISO as a local software repository.

Postby Deb-fan » 2021-01-22 20:37

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. *
Deb-fan
 
Posts: 1008
Joined: 2012-08-14 12:27

Re: Using an ISO as a local software repository.

Postby Head_on_a_Stick » 2021-01-23 09:48

hier(7) wrote:/mnt
This directory is a mount point for a temporarily mounted filesystem.

So you should create a custom mount point elsewhere.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13241
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Using an ISO as a local software repository.

Postby CwF » 2021-01-23 15:07

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...
CwF
 
Posts: 925
Joined: 2018-06-20 15:16

Re: Using an ISO as a local software repository.

Postby Deb-fan » 2021-01-24 12:11

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. *
Deb-fan
 
Posts: 1008
Joined: 2012-08-14 12:27


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable