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: 1714
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.
User avatar
widz
 
Posts: 137
Joined: 2008-01-03 16:44
Location: Bulgaria

Re: tip - use downloaded ISOs as a repository

Postby canci » 2009-05-08 12:16

Splendid idea! TNX a bunch! :)
Image
User avatar
canci
 
Posts: 600
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.30fbcon
Those who find errors in my spelling can keep them.
Stian1979
 
Posts: 212
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: 1714
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.30fbcon
Those who find errors in my spelling can keep them.
Stian1979
 
Posts: 212
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


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests