tip - use downloaded ISOs as a repository

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

tip - use downloaded ISOs as a repository

Postby gnudude » 2009-05-06 13:47

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.
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: tip - use downloaded ISOs as a repository

Postby widz » 2009-05-06 14:46

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
User avatar
widz
 
Posts: 206
Joined: 2008-01-03 16:44
Location: Currently Scotland, Bulgaria

Re: tip - use downloaded ISOs as a repository

Postby canci » 2009-05-08 12:16

Splendid idea! TNX a bunch! :)
I ken hez kinvulf beck? I ken hez riesnible modereyshn? Kthnxbai!

No need to discuss this topic? Offended by this signature? Remove it:

Mez wrote:You can easily just disable viewing signatures

Click here - and set "Display Signatures" to No
User avatar
canci
 
Posts: 1705
Joined: 2006-09-24 11:28
Location: Bosnia & Herzegovina

Re: tip - use downloaded ISOs as a repository

Postby Stian1979 » 2009-09-15 11:18

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
Squeeze/sid, liquorix-2.6.33-1.dmz.3
Those who find errors in my spelling can keep them.
Stian1979
 
Posts: 276
Joined: 2007-07-29 14:57

Re: tip - use downloaded ISOs as a repository

Postby gnudude » 2009-09-15 16:26

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
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: tip - use downloaded ISOs as a repository

Postby Stian1979 » 2009-09-20 13:50

I knew it probatrly was something quite easy. Thanks.
Image
Squeeze/sid, liquorix-2.6.33-1.dmz.3
Those who find errors in my spelling can keep them.
Stian1979
 
Posts: 276
Joined: 2007-07-29 14:57

Re: tip - use downloaded ISOs as a repository

Postby mongooseman1128 » 2009-12-25 06:48

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
mongooseman1128
 
Posts: 107
Joined: 2007-06-03 05:18

Re: tip - use downloaded ISOs as a repository

Postby Zosimos » 2010-03-10 20:54

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!
Zosimos
 
Posts: 258
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

Postby canci » 2010-03-11 01:27

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...)
I ken hez kinvulf beck? I ken hez riesnible modereyshn? Kthnxbai!

No need to discuss this topic? Offended by this signature? Remove it:

Mez wrote:You can easily just disable viewing signatures

Click here - and set "Display Signatures" to No
User avatar
canci
 
Posts: 1705
Joined: 2006-09-24 11:28
Location: Bosnia & Herzegovina

Re: tip - use downloaded ISOs as a repository

Postby Zosimos » 2010-03-11 23:26

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: 258
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

Postby Zosimos » 2010-03-20 16:27

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?
Zosimos
 
Posts: 258
Joined: 2009-07-16 02:00

Re: tip - use downloaded ISOs as a repository

Postby johnathan » 2010-03-21 20:06

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.
johnathan
 
Posts: 9
Joined: 2009-10-09 14:33

Re: tip - use downloaded ISOs as a repository

Postby refracta » 2010-03-21 23:01

why a separte partition?
why mount via fstab and reboot just to copy stuff?
refracta
 
Posts: 1235
Joined: 2008-10-26 01:46

Re: tip - use downloaded ISOs as a repository

Postby johnathan » 2010-03-22 18:09

[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

Postby refracta » 2010-03-22 21:16

you may want to consider this tip
viewtopic.php?f=16&t=38872&start=0
refracta
 
Posts: 1235
Joined: 2008-10-26 01:46

Next

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: Deluge and 9 guests

fashionable