Tag/tag.png

Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...

Tag/tag.png

Style Cleanup Required
This article does not follow the style standards in the Wiki Guide. More info...

Tag/tag.png

Needs Updating
This article needs updating to include the latest versions of Ubuntu. More info...

Contents

How to make your own Ubuntu Repository DVDs

preamble

note

Let me describe it in details. If I want to install a program that needs more than one package, and those packages are located on different DVDs, APT used to fetch then install then ask for the next disc. But with Karmic, after fetching it doesn't install, it prompts for the next discs... etc and then starts installation, the packages currently in the last disc in the drive are installed, then giving an error about the other packages which are located in the previous discs because they are not there. Its not a problem in the discs, I think its APT behavior itself that should be changed. Unfortunately I don't know how to adjust this way of APT in Karmic. but a workaround for this is pointing APT to the local repos already downloaded on the harddrive and not using the created DVDs. I have tested it and worked fine.

http://ubuntuforums.org/images/smilies/confused.gif ! What's The Point Of This Tutorial?

http://ubuntuforums.org/images/smilies/eusa_eh.gif What level experience do you need?

http://ubuntuforums.org/images/smilies/icon_question.gif Hard Disk Requirements (Please Read This)

Index 01. Install the necessary tools covers what you'll need to get started. 02. Extract debcopy is not necessary to do first, but we get it out of the way at the beginning. 03. The Big Download has the command necessary to download the desired repositories. Make your changes according to the type you need. 04. Divide into DVD-sized portions prepares the files to make the DVDs. 05. Create ISOs finishes what began in step 4. 06. Burning the ISO files covers how to write the files to blank discs. 07. Getting It All To Work is the instructions on how to tell Ubuntu to use the DVDs as a source for installing new software. 08. Updating the local repositories shows how to keep what you've downloaded up-to-date. 09. Pointing Apt locally shows you how to use what you've downloaded to your own advantage (should you decide to keep it around). 10. You only want a setup DVD? is a link to Ubuntu setup DVDs for download. 11. FAQs answers some frequently asked questions. Q1: How would I do this through DOS/Windows?

12. Classic Ubuntu Repository Downloads. Warty? Hoary? Breezy? Feisty, anyone? Don't fret about older editions disappearing. Help is right here. 13. References gives credit where credit is due - and links 14. Mission, Vision & Values (very boring)

1. Install the necessary tools

Open a terminal (from the top-left side of the Ubuntu screen: Applications Accessories Terminal). Please do not close this application throughout the length of this tutorial.

Copy the following code and paste it into the terminal.

sudo apt-get install debmirror liblockfile-simple-perl liblog-agent-perl ruby mkisofs dpkg-dev libdigest-sha1-perl libruby libzlib-ruby

Hit the Enter key after pasting. (A quick way to "paste" text into the terminal is to hold down the following keys Ctrl+Shift+V, or right click in the terminal and click Paste in the context menu.)

2. Extract debcopy

cp /usr/share/doc/debpartial/examples/debcopy.gz ~

gunzip ~/debcopy.gz

3. The Big Download

debmirror --nosource -m --passive --host=archive.ubuntu.com --root=ubuntu/ --method=http --progress --dist=lucid,lucid-security,lucid-updates,lucid-backports, --section=main,restricted,universe,multiverse --arch=i386 ~/UbuntuRepos --ignore-release-gpg

To see the whole code with some brief explanations:

debmirror \
    --nosource -m --passive \
    --host=archive.ubuntu.com \ (select a faster repository if need be)
    --root=ubuntu/ --method=http --progress \
    --dist='''lucid''','''lucid'''-security,'''lucid'''-updates,'''lucid'''-backports, \
    --section=main,restricted,universe,multiverse \
    --arch='''i386''' ~/UbuntuRepos \ (this puts our files in /home/USER/UbuntuRepos)
    --ignore-release-gpg

Some variables in blue.

Did the download stop midway?

Regular network glitches?

--timeout=seconds -t 120

The "120" means 120 seconds or 2 minutes. Increase it to 4 minutes, for example, like this:

--timeout=seconds -t 240

4. Divide into DVD-sized portions

Part 1:

debpartial --nosource --dirprefix=ubuntu --section=main,restricted,universe,multiverse --dist='''lucid''','''lucid'''-security,'''lucid'''-updates,'''lucid'''-backports '''--size=DVD''' ~/UbuntuRepos ~/UbuntuDVDs

1. Replace the red lucid in the code above with your repository choice (i.e., intrepid, jaunty or karmic).

  1. If you plan on burning CDs instead of DVDs, then replace --size=DVD with --size=CD74 (for 650 megabyte CD-Rs), or --size=CD80 (for 700 megabyte CD-Rs)

Part 2:

ls -l ~/UbuntuDVDs

If the last folder is ubuntu3 you need to create 4 DVDs. If the last folder is ubuntu4 then it will be 5 DVDs, and if the last folder is ubuntu31, you'll need to create 32 CDs, and so on. NOTE: Oneiric's repository size = 42.79 Gb. You're going to need a large stack of CDs.

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu0

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu1

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu2

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu3

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu4

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu5

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu6

ruby ~/debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu7

5. Create ISOs

mkisofs -f -J -r -V "Ubuntu '''10.04''' 1/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd1.iso''' ~/UbuntuDVDs/ubuntu0

mkisofs -f -J -r -V "Ubuntu '''10.04''' 2/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd2.iso''' ~/UbuntuDVDs/ubuntu1

mkisofs -f -J -r -V "Ubuntu '''10.04''' 3/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd3.iso''' ~/UbuntuDVDs/ubuntu2

mkisofs -f -J -r -V "Ubuntu '''10.04''' 4/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd4.iso''' ~/UbuntuDVDs/ubuntu3

mkisofs -f -J -r -V "Ubuntu '''10.04''' 5/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd5.iso''' ~/UbuntuDVDs/ubuntu4

mkisofs -f -J -r -V "Ubuntu '''10.04''' 6/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd6.iso''' ~/UbuntuDVDs/ubuntu5

mkisofs -f -J -r -V "Ubuntu '''10.04''' 7/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd7.iso''' ~/UbuntuDVDs/ubuntu6

mkisofs -f -J -r -V "Ubuntu '''10.04''' 8/8" -o ubuntu-'''10.04'''-$(date -I)-complete-'''i386-dvd8.iso''' ~/UbuntuDVDs/ubuntu7

Note: If you changed repositories in Step 3 then each command above will require editing. Replace the version number of 10.04 with:

6. Burning the ISO files

Using Kubuntu ('''Link''')

  1. Find the ISO image in the file browser (available at System Menu > Home Folder on bottom of the screen next to KMenu.)

  2. Right click on the ISO → Actions → Write CD Image with K3b...
  3. K3b will now automatically verify the md5sum, make sure these match.
  4. Place Blank CD in burner and click on start.

Using Xubuntu ('''Link''')

  1. Launch the burning tool, xfburn (available at Applications → Accessories → xfburn.)

  2. Choose from the main toolbar, or from the menu Actions the option "Burn CD Image",
  3. From the Burn CD Image dialog box, click over (None) from "image to burn", and find the ISO image in the file browser
  4. In the dialog, click 'Burn Image'.

7. Getting it all to work

Synaptic:

Terminal:

sudo apt-cdrom add

Insert the first disc and follow the instructions (it will ask you to name each disc). When apt-cdrom is finished with the disc, eject it with

eject

(yeah, just type it in and hit Enter) and insert the next and use the same command. Repeat the process per disc.

sudo apt-get update

followed by

sudo apt-get upgrade

which will update your system if any newer files are available. You can now open Synaptic Package Manager to use tens of thousands of packages.

8. Updating the local repositories (i.e., "Now what!?")

9. Pointing Apt locally

luvr has a tutorial entitled "Creating a Trusted Local Repository from which Software Updates can be installed" that is more detailed than my addition. '''CLICK HERE''' for this Ubuntu Forums HOWTO. It begins with:"If you manage multiple PCs running Ubuntu, you will likely want to keep them all updated. Thus, you will want to install the Ubuntu updates to each of them as they become available, and you will have each PC individually download all of the updates from the Ubuntu repositories on the internet. This may, however, be impractical to you—particularly if, e.g., you are on a rather slow internet connection, or if your monthly data transfer volume is severely limited, or if you simply prefer to save the bandwidth." Credit=Geochelone

It is possible to use the files you've downloaded as your own local repository. It can be used for updates and installing new packages. But this will only work well if you keep these files up-to-date. If not, you will fall behind in security updates.

cd ~/UbuntuRepos && dpkg-scanpackages . /dev/null > Packages && gzip Packages && cd ~

This creates the necessary files for apt to know what is in your local repositories.

deb file:/home/[USER NAME HERE]/UbuntuRepos/ '''lucid''' main multiverse restricted universe

deb file:/home/[USER NAME HERE]/UbuntuRepos/ '''lucid'''-security main multiverse restricted universe

(CREDIT: '''xfile087''')

NOTE: Don't forget these two things:

  1. modify these lines for jaunty or karmic

  2. put hash marks (#) before each Internet repository line you no longer require. Example:

  '''#''' deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse

10. You only want a setup DVD?

]11. F.A.Qs

Question 1: How would I do this through DOS/Windows?

Answer 1. I... honestly... don't... know. I can't imagine how tedious it would be to try to assemble all this file by file. If you're a dual-booter or you've got faster bandwidth on a Windows machine elsewhere then I understand your dilemma. debmirror is the binary that does all the work. I cannot imagine that anyone has made a port for Windows. Until someone shows me a blog that tells Windows users how to accomplish this I suggest looking at the solutions in Q2.

Answer 2. This is a "round about" way of using a Windows PC where the bandwidth is fast. Try using the Ubuntu setup CD in "Live User Mode". Follow the instructions in this tutorial and use the Windows Hard Drive as your destination. Well, look. I didn't think it would be easy, just... sorta... possible.

Question 2: Why don't I skip this mess and download pre-made DVD ISOs?

Answer 1. Pre-made DVD ISOs are fine for a single, never-to-be-repeated download (if time is an issue). Here's the difficulty: to get updates means downloading the ISOs again (sorta time consuming). If a single ISO download is right for you -- use this link: [ftp://ftp.leg.uct.ac.za/pub/linux/ubuntu-unofficial-packages-dvd/ ftp://ftp.leg.uct.ac.za/pub/linux/ub...-packages-dvd/]

Answer 2. Modem connections make this tutorial impossible regardless the O/S. Consider purchasing inexpensive DVD ISOs from an online vendor. Examples are:

They will provide exactly what you need: Ubuntu Repository DVDs with setup disks - perfect for that off-line PC. These companies will ship these discs right to your door for a small fee (no affiliation with the author).

Question 3: What if I wanted to combine or add in more repositories? Something like Canonical Commercial? Or MediBuntu?

Answer. Don't do it!

This is what debmirror appears to do when run:

  1. debmirror receives the file list from the server within the command line (archive.ubuntu.com, for example).

  2. debmirror then looks for the "destination" folder. If it doesn't exist, it creates it.

  3. if debmirror finds that the destination folder already exists it compares the files it finds with the remote server's file listing.

  4. debmirror then carefully erases everything in the destination folder that is not an exact match with that list.

  5. debmirror downloads files it deems are missing in the destination folder.

Canonical Repos

debmirror --nosource -m --passive --host=archive.canonical.com --root=/ --method=http --progress --dist='''lucid''','''lucid'''-backports,'''lucid'''-proposed,'''lucid'''-security,'''lucid'''-updates --section=partner --arch=i386 ~/CanonicalRepos --ignore-release-gpg

debpartial --nosource --dirprefix=ubuntu --section=partner --dist='''lucid''','''lucid'''-backports,'''lucid'''-proposed,'''lucid'''-security,'''lucid'''-updates --size=CD80 ~/CanonicalRepos ~/CanonicalRepos/CD

ruby debcopy -l ~/CanonicalRepos ~/CanonicalRepos/CD/ubuntu0

mkisofs -f -J -r -V "Canonical" -o ubuntu-7.10-$(date -I)-Canonical.iso ~/CanonicalRepos/CD/ubuntu0

Replace lucid with intrepid, jaunty or karmic.

MediBuntu Repos

debmirror --nosource -m --passive --host=packages.medibuntu.org --root=/ --method=http --progress --dist='''lucid''' --section=free,non-free --arch=i386 ~/MediBuntuRepos --ignore-release-gpg

ruby debcopy -l ~/MediBuntuRepos ~/MediBuntuRepos/CD/ubuntu0

mkisofs -f -J -r -V "MediBuntu" -o ubuntu-7.10-$(date -I)-MediBuntu.iso ~/MediBuntuRepos/CD/ubuntu0

Replace lucid with intrepid, jaunty or karmic.

(To add MediBuntu to your personal repositories: https://help.ubuntu.com/community/Me...07a38a00d70e9f)

Google Repos

debmirror --nosource -m --passive --host=dl.google.com --root=/linux/deb/ --method=http --progress --dist=stable --section=non-free --arch=i386 ~/GoogleRepos --ignore-release-gpg

The Google directories appear... then disappear. This is the last directory address I have.

Question 4: How to get "debmirror" to download and validate the "Release.gpg" file.

Answer. I don't know!!! But '''luvr''' does. Thanks for the addition.

luvr tackles this question with this patient and well laid out post: '''Click Here.'''

Q5: How do I setup a local Ubuntu mirror from a set of Repository DVDs?

Answer. I just don't know!!! But '''luvr''' does. Thanks for the addition.

luvr tackles this question with this patient and well laid out post: '''Click Here.'''

12. Classic Ubuntu Repository Downloads

Warty Warthog on the i386 architecture:

debmirror --nosource -m --passive --host=old-releases.ubuntu.com --root=ubuntu/ --method=http --progress --dist='''warty''','''warty'''-security,'''warty'''-updates,'''warty'''-backports, --section=main,restricted,universe,multiverse --arch='''i386''' ~/WartyRepos_'''i386''' --ignore-release-gpg

Warty Warthog on the 64-bit AMD architecture:

debmirror --nosource -m --passive --host=old-releases.ubuntu.com --root=ubuntu/ --method=http --progress --dist='''warty''','''warty'''-security,'''warty'''-updates,'''warty'''-backports, --section=main,restricted,universe,multiverse --arch='''amd64''' ~/WartyRepos_'''amd64''' --ignore-release-gpg

Doing it this way clearly defines a different folder for each repository set. Note the coloured text can be changed to suit the version, architecture, and output folder as per your original tutorial method.

Please note a few points:

  1. Don't mix repositories. If you have enough free hard drive space to keep these repositories around then put each version's files in a different folder (fear not: they're not being updated any more: what you download never needs to be updated). Here we've used "~/UbuntuReposWartyi386" and "~/UbuntuReposWartyAMD64" and not "~/UbuntuRepos". All contents of ~/UbuntuRepos will be wiped to accommodate the new download. We encourage a folder for each version, e.g. Wartyi386, WartyAMD64, Hoaryi386, HoaryAMD64, etc.

  2. the architectures currently available in each (old.release) version are:
    • 4.10 (Warty Warthog); i386, amd64, ppc.
    • 5.04 (Hoary Hedgehog); i386, amd64, ppc, ia64, sparc.
    • 5.10 (Breezy Badger); i386, amd64, ppc, ia64, sparc.
    • 6.10 (Edgy Eft); i386, amd64, ppc, ia64, sparc.
    • 7.04 (Feisty Fawn); i386, amd64, ppc, sparc.
    • 7.10 (Gutsy Gibbon); amd64, armel, hppa, i386, ia64, lpia, powerpc, sparc.
    • 8.04 (Hardy Heron)

CREDIT: k3lt01

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ warty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ warty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ warty-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ warty-backports main restricted universe multiverse
#deb http://old-releases.ubuntu.com/ubuntu/ warty-proposed main restricted universe multiverse

Source: https://help.ubuntu.com/community/EOLUpgrades

13. References

14. Mission, Vision & Values

Originally posted The Ubuntu Forums (ubuntuforums.org)

MakeUbuntuRepositoryDVDs (last edited 2017-09-04 01:27:49 by ckimes)