tip - use downloaded ISOs as a repository

Share your own howto's etc. Not for support questions!
Post Reply
Message
Author
gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

tip - use downloaded ISOs as a repository

#1 Post by gnudude »

Instead of inserting (or even burning) multiple CDs to install software in debian you can just use the downloaded ISOs.

GUI METHOD
My iso images are stored in /home/user/isos/ and are named debian1.iso debian2.iso debian3.iso Adjust the following commands for your storage location and filenames. Also, replace user with your username.

I create three folders in my /home/user/isos/ directory called iso1, iso2, and iso3.

I use my favorite text editor with root privileges to open /etc/fstab and add the following entries to the bottom of the file
/home/user/isos/debian1.iso /home/user/isos/iso1/ udf,iso9660 user,loop 0 0
/home/user/isos/debian2.iso /home/user/isos/iso2/ udf,iso9660 user,loop 0 0
/home/user/isos/debian3.iso /home/user/isos/iso3/ udf,iso9660 user,loop 0 0

Then I add the following repositories to synaptic
file:/home/user/isos/iso1 lenny main
file:/home/user/isos/iso2 lenny main
file:/home/user/isos/iso3 lenny main
(The first part is the URI, the second is the Distribution(lenny), the third is the Section(main))

Reboot and then after that the ISOs should be mounted and available in synaptic. Be sure to click reload in synaptic...

CLI METHOD
My iso images are stored in /home/user/isos/ and are named debian1.iso debian2.iso debian3.iso Adjust the following commands for your storage location and filenames. Also, replace user with your username.

I create three folders in my /home/user/isos/ directory called iso1, iso2, and iso3.
mkdir /home/user/isos/{iso1,iso2,iso3} -p

add the proper entries to /etc/fstab
su -c 'echo /home/user/isos/debian1.iso /home/user/isos/iso1/ udf,iso9660 user,loop 0 0 >> /etc/fstab'
su -c 'echo /home/user/isos/debian2.iso /home/user/isos/iso2/ udf,iso9660 user,loop 0 0 >> /etc/fstab'
su -c 'echo /home/user/isos/debian3.iso /home/user/isos/iso3/ udf,iso9660 user,loop 0 0 >> /etc/fstab'


add the proper entries to /etc/apt/sources.list
su -c 'echo deb file:/home/user/isos/iso1 lenny main >> /etc/apt/sources.list'
su -c 'echo deb file:/home/user/isos/iso2 lenny main >> /etc/apt/sources.list'
su -c 'echo deb file:/home/user/isos/iso3 lenny main >> /etc/apt/sources.list'


mount the isos
mount /home/user/isos/iso1/
mount /home/user/isos/iso2/
mount /home/user/isos/iso3/


then apt-get update and you should be good to go


++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++ OLDER VERSION +++++++++++++
++++++++++++++++++++++++++++++++++++++++++++

Instead of inserting (or even burning) multiple CDs to install software in debian you can just use the downloaded ISOs.

This method assumes you are going to keep the ISOs and folders available, the ISOs will be mounted at boot time automatically and you will be able to install software from them at any time.

Be sure to replace any instance of my-user-name with your username.

I create a folder in /home/my-user-name/ called isos

I store my downloaded isos in /home/my-user-name/isos/ and the isos are named debian1.iso debian2.iso debian3.iso

I create three folders in my /home/my-user-name/isos/ directory called iso1, iso2, and iso3.

I use my favorite text editor with root privileges to open /etc/fstab and add the following entries to the bottom of the file:
/home/my-user-name/isos/debian1.iso /home/my-user-name/isos/iso1/ udf,iso9660 user,loop 0 0
/home/my-user-name/isos/debian2.iso /home/my-user-name/isos/iso2/ udf,iso9660 user,loop 0 0
/home/my-user-name/isos/debian3.iso /home/my-user-name/isos/iso3/ udf,iso9660 user,loop 0 0

Then I add the following repositories to synaptic
file:/home/my-user-name/isos/iso1 lenny main
file:/home/my-user-name/isos/iso2 lenny main
file:/home/my-user-name/isos/iso3 lenny main
(The first part is the URI, the second is the Distribution(lenny), the third is the Section(main))

Reboot and then after that the ISOs should be mounted and available in synaptic. Be sure to click reload in synaptic...
Last edited by gnudude on 2009-09-14 19:22, edited 2 times in total.

User avatar
widz
Posts: 206
Joined: 2008-01-03 16:44
Location: Currently Scotland, Bulgaria

Re: tip - use downloaded ISOs as a repository

#2 Post by widz »

or you could only #mount -a && apt-get update :) I mean, instead of rebooting.
you have to laugh at the things that hurt you just to keep the world from running you plumb crazy

canci
Posts: 2184
Joined: 2006-09-24 11:28
Has thanked: 49 times
Been thanked: 62 times

Re: tip - use downloaded ISOs as a repository

#3 Post by canci »

Splendid idea! TNX a bunch! :)
🍥

Asus VivoBook X421DA D413DA 1.0
Debian GNU/Linux 11 (bullseye) x86_64 Kernel 5.10
sway on Wayland
AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx (Picasso)
8 GB RAM, 512GB NVMe drive

Stian1979
Posts: 313
Joined: 2007-07-29 14:57

Re: tip - use downloaded ISOs as a repository

#4 Post by Stian1979 »

I just tryed this and did not work out.
I get this error

Code: Select all

E: type file:/home/stian/myrepo/iso1/ is not know on line 26 in source list /etc/apt/sources.list
I have manually browsed into the folder and I can see the content.
My sources.list

Code: Select all

file:/home/stian/myrepo/iso1 squeeze main
file:/home/stian/myrepo/iso2 squeeze main
file:/home/stian/myrepo/iso3 squeeze main
file:/home/stian/myrepo/iso4 squeeze main
file:/home/stian/myrepo/iso5 squeeze main
file:/home/stian/myrepo/iso6 squeeze main
I have tryed to remove squeeze and replaced it with both lenny and testing just in case and also tried without a distro at all.
I can not see what I have done wrong.

My fstab

Code: Select all

/home/stian/myrepo/debian-testing-amd64-DVD-1.iso /home/stian/myrepo/iso1/ udf,iso9660 user,loop 0 0
/home/stian/myrepo/debian-testing-amd64-DVD-2.iso /home/stian/myrepo/iso2/ udf,iso9660 user,loop 0 0
/home/stian/myrepo/debian-testing-amd64-DVD-3.iso /home/stian/myrepo/iso3/ udf,iso9660 user,loop 0 0
/home/stian/myrepo/debian-testing-amd64-DVD-4.iso /home/stian/myrepo/iso4/ udf,iso9660 user,loop 0 0
/home/stian/myrepo/debian-testing-amd64-DVD-5.iso /home/stian/myrepo/iso5/ udf,iso9660 user,loop 0 0
/home/stian/myrepo/debian-testing-amd64-DVD-6.iso /home/stian/myrepo/iso6/ udf,iso9660 user,loop 0 0
All the ISO's are placed in /home/stian/myrepo/
Image

gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: tip - use downloaded ISOs as a repository

#5 Post by gnudude »

if yu are using synaptic to add a repo then it would be
file:/home/user/isos/iso3 lenny main

if you are editing sources.list manually then you would add
deb file:/home/user/isos/iso3 lenny main

so
file:/home/stian/myrepo/iso1 squeeze main
needs to be
deb file:/home/stian/myrepo/iso1 squeeze main
in sources.list

Stian1979
Posts: 313
Joined: 2007-07-29 14:57

Re: tip - use downloaded ISOs as a repository

#6 Post by Stian1979 »

I knew it probatrly was something quite easy. Thanks.
Image

mongooseman1128
Posts: 107
Joined: 2007-06-03 05:18

Re: tip - use downloaded ISOs as a repository

#7 Post by mongooseman1128 »

This is a great tip. Thanks a lot for posting it. I just thought I would add my two cents worth. When I did it I had trouble until I remembered to unmark the CD as a repo.
HP DV6308NR
AMD Turion 64 X2 1.6 GHz
2 GB RAM
Broadcom 4311 wireless card
partition 1= Vista
partition 2= Swap
partition 3= Debian testing
partition 4= changes a lot

Zosimos
Posts: 275
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

#8 Post by Zosimos »

This almost works, in that it was possible to put the ISO images online and mount them directly, then tell apt to search those instead of ask for DVDs. But there is a problem that no one here has mentioned for some reason. Apt complains that all the packages "cannot be authenticated" and keeps asking if you want to risk installing these insecure packages. When you are trying to install something with many dependencies it gets very messy. Now why doesn't it complain that the DVDs are unauthenticated? It's the exact same data!

canci
Posts: 2184
Joined: 2006-09-24 11:28
Has thanked: 49 times
Been thanked: 62 times

Re: tip - use downloaded ISOs as a repository

#9 Post by canci »

Maybe it has a way of scanning file systems and thus differentiating iso9660 from ext* (where files can have
all sorts of permissions, so you see where this is going security-wise...)
🍥

Asus VivoBook X421DA D413DA 1.0
Debian GNU/Linux 11 (bullseye) x86_64 Kernel 5.10
sway on Wayland
AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx (Picasso)
8 GB RAM, 512GB NVMe drive

Zosimos
Posts: 275
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

#10 Post by Zosimos »

It probably has something to do with the way the DVDs are listed in sources.list -- cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/ -- while the mounted ISOs just use the name of the ISO which is not identical with the complicated label used in the removable DVD line. I'm wondering if I could do something like: File:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/path instead of just F:/path and that would be enough to make the security keys match...

Zosimos
Posts: 275
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

#11 Post by Zosimos »

So far I haven't found anything but the --allow-unauthenticated switch for apt-get and --allow-untrusted for aptitude. Is everyone using ISOs for a local repository using these switches? Or is there some other way to stop the security whining about files that are perfectly valid when loaded from an mountable DVD drive?

johnathan
Posts: 9
Joined: 2009-10-09 14:33

Re: tip - use downloaded ISOs as a repository

#12 Post by johnathan »

Hi

NOTE ALTHOUGH THIS WORKS AND LOADS THE SOFTWARE AND RUNS FROM THE MENU THE PROGRAMS DO NOT FUNCTION CORRECTLY (TRIED WITH ABIWORD WHICH WOULD NOT WORK FROM OFFICIAL DISK ) BUT IT WORKED WITH AUDACIOUS

My grateful thanks to you and all those that have added information to this thread, as I do not have Broadband my DVD's were purchased.
Being a novice with Debian and Linux I could not get my disk repository to work exactly as the replies.
But I have used the information in a way that allows me to use my hard disk rather than the DVD's to install and remove software so I can try applications before downloading the latest version.

If this is any use to anyone I used the following method it worked for me
Brackets () enclose my settings yours may be different DO NOT type the brackets
When in a terminal remember to hit enter key after each command
1 .Boot using Gparted create an ext3 partition (sdd3) of 30GB
2 Boot Debian
3 In a root terminal
type cd /mnt
then type mkdir (repos)
then type cd (repos)
then type mkdir (repo1)
repeat to mkdir (repo5) if you have 5 disks
4 In a root terminal
type cd /mnt
then type chown -hR (your user name) (repos)

5 In a root terminal type gedit /etc/fstab
add the following line to fstab and then save the file
(/dev/(sdd3) /mnt/(repos)/ ext3 user,rw,exec,auto 0 0

6 Reboot Debian Copy the files on each DVD into its directory that is Disk 1 to repo1 .......... Disk 5 to repo5

7 Start Synaptic Package manager
In the “Settings/Repositories/Third-Party Software” TAB click +Add
Enter the URI ( file:/mnt/repos/repo1 lenny contrib main )
repeat to repo5

8 Reload and add software

NOTE If you have the Debian Software Officially Supported (main) enabled in the “Settings/Repositories/Debian Software” TAB and there is an update available then this will be downloaded rather than installed from disk.
As others have found a message of NOT AUTHENTICATED is displayed but the software installs.

NOTE ALTHOUGH THIS WORKS AND LOADS THE SOFTWARE AND RUNS FROM THE MENU THE PROGRAMS DO NOT FUNCTION CORRECTLY (TRIED WITH ABIWORD WHICH WOULD NOT WORK FROM OFFICIAL DISK ) BUT IT WORKED WITH AUDACIOUS

I will try other links from this thred

Regards John
Last edited by johnathan on 2010-03-25 20:26, edited 3 times in total.

refracta
Posts: 1235
Joined: 2008-10-26 01:46

Re: tip - use downloaded ISOs as a repository

#13 Post by refracta »

why a separte partition?
why mount via fstab and reboot just to copy stuff?

johnathan
Posts: 9
Joined: 2009-10-09 14:33

Re: tip - use downloaded ISOs as a repository

#14 Post by johnathan »

[quote="refracta"]why a separte partition?

Just the way I do things as I am just learning
I keep all data and repositories on separate primary partitions including a fat32 data partition and win98 for one particular Nikon scanner.
My system has 6 hard drives which are "small" by todays norm and I find it easier to be able to change distro's and use any data from any distro partition
This only applies to repositories if I am running two partitions with the same distro or I have to re install a distro then my data and repository are still intact.
As they say in Linux there are at least 10 ways to do something.

why mount via fstab and reboot just to copy stuff?
It just gives me confidence that what I have done works as the partition comes up on my desktop

Regards John


johnathan
Posts: 9
Joined: 2009-10-09 14:33

Re: tip - use downloaded ISOs as a repository

#16 Post by johnathan »

refracta wrote:you may want to consider this tip
http://forums.debian.net/viewtopic.php? ... 72&start=0
Thanks for the link and I will try that method as it seems easier than I used.

miteshbsjat
Posts: 1
Joined: 2013-11-09 16:05

Re: tip - use downloaded ISOs as a repository

#17 Post by miteshbsjat »

Hi,

You could try the perl script given at following blog (Mounting Debian ISO files as Offline Software Repository):
http://miteshjlinuxtips.wordpress.com/2 ... epository/

Regards,
Mitesh

Post Reply