![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Location: Montreal, Canada
Beans: 477
Ubuntu 9.10 Karmic Koala
|
How to make your own Ubuntu Repository DVDs
Please note: all improvements are already incorporated in this tutorial. All supplementary posts for your interest only. note Sensiva reports that 9.10 Karmic Koala has an issue with this, stemming from a bug in apt: Quote:
Index 01. Install the necessary tools covers what you'll need to get started.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 (Applications → Accessories → Terminal, in case you closed it). Code:
sudo apt-get install debmirror liblockfile-simple-perl liblog-agent-perl ruby mkisofs dpkg-dev libdigest-sha1-perl libruby libzlib-ruby While debpartial is still in the repositories, starting with Hardy Heron, it is not considered part of Hardy Heron or newer -- it is 100% compatible. Provided below is the link to the necessary software: Once saved on the desktop, double-click the file and follow through the prompts, including using your password, to complete its installation. 2. Extract debcopy The debcopy file is included in debpartial (downloaded and installed in Step 1). Let's extract it now for later use. Please paste the following code into the Terminal: Code:
cp /usr/share/doc/debpartial/examples/debcopy.gz ~ Code:
gunzip ~/debcopy.gz 3. The Big Download Use this code to start downloading Hardy Heron's repository files: Code:
debmirror --nosource -m --passive --host=archive.ubuntu.com --root=ubuntu/ --method=ftp --progress --dist=hardy,hardy-security,hardy-updates,hardy-backports, --section=main,restricted,universe,multiverse --arch=i386 ~/UbuntuRepos --ignore-release-gpg Code:
debmirror \
--nosource -m --passive \
--host=archive.ubuntu.com \
--root=ubuntu/ --method=ftp --progress \
--dist=hardy,hardy-security,hardy-updates,hardy-backports, \
--section=main,restricted,universe,multiverse \
--arch=i386 ~/UbuntuRepos \
--ignore-release-gpg
Did the download stop midway?4. Divide into DVD-sized portions Part 1:
Code:
debpartial --nosource --dirprefix=ubuntu --section=main,restricted,universe,multiverse --dist=hardy,hardy-security,hardy-updates,hardy-backports --size=DVD ~/UbuntuRepos ~/UbuntuDVDs 2. 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: How many CDs will we need to create? How do we find out? Paste this code in the Terminal and hit Enter: Code:
ls -l ~/UbuntuDVDs Having determined the number of physical discs you'll need, use the following as your pattern until all discs are complete (the only change from one to the next is the final number). These represent Hardy Heron's requirements: Code:
ruby debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu0 Code:
ruby debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu1 Code:
ruby debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu2 Code:
ruby debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu3 Code:
ruby debcopy -l ~/UbuntuRepos ~/UbuntuDVDs/ubuntu4 5. Create ISOs These instructions assume you've got enough data to make 5 DVDs. If you've downloaded repositories that do not need a 5th DVD, none will be created. Code:
mkisofs -f -J -r -V "Ubuntu 8.04 1/5" -o ubuntu-8.04-$(date -I)-complete-i386-dvd1.iso ~/UbuntuDVDs/ubuntu0 Code:
mkisofs -f -J -r -V "Ubuntu 8.04 2/5" -o ubuntu-8.04-$(date -I)-complete-i386-dvd2.iso ~/UbuntuDVDs/ubuntu1 Code:
mkisofs -f -J -r -V "Ubuntu 8.04 3/5" -o ubuntu-8.04-$(date -I)-complete-i386-dvd3.iso ~/UbuntuDVDs/ubuntu2 Code:
mkisofs -f -J -r -V "Ubuntu 8.04 4/5" -o ubuntu-8.04-$(date -I)-complete-i386-dvd4.iso ~/UbuntuDVDs/ubuntu3 Code:
mkisofs -f -J -r -V "Ubuntu 8.04 5/5" -o ubuntu-8.04-$(date -I)-complete-i386-dvd5.iso ~/UbuntuDVDs/ubuntu4
6. Burning the ISO files Using Ubuntu (Link)
Using Xubuntu (Link)
7. Getting it all to work There are two ways to add a DVD/CD to your repository list: 8. Updating the local repositories (i.e., "Now what!?") Now that you have gigabytes of .deb files all tucked neatly into the ~/UbuntuRepos folder... what on earth do you do to keep it updated? Start again? Sort of. Read on... Open the Terminal (Applications → Accessories → Terminal) and go to the folder where you initially ran debmirror (by default: your home folder) and run the command in Step 3 again. This only makes an incremental update consuming roughly 10 minutes instead of 25 hours. Run this daily (as I do) and ISO creation won't have the added bore of a long download. If new DVDs are required or desired, delete your original .iso files (in your home folder) and run steps 5 through 7 to recreate them. 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. With that out of the way let's proceed. Enter the following code in the terminal: Code:
cd ~/UbuntuRepos && dpkg-scanpackages . /dev/null > Packages && gzip Packages && cd ~ Once completed insert the following into your sources.list file: Code:
deb file:/home/[USER NAME HERE]/UbuntuRepos/ hardy main multiverse restricted universe Code:
deb file:/home/[USER NAME HERE]/UbuntuRepos/ hardy-security main multiverse restricted universe NOTE: Don't forget these two things:
10. You only want a setup DVD? Head over to this link and select the corresponding Ubuntu suite you desire. The difference between the Ubuntu setup CD and the Ubuntu setup DVD is how much of the repositories are on the setup disc. The DVD contains quite a bit more, most of "Main" if I'm not mistaken. However, if you have the repository DVDs handy, a setup DVD is redundant and not recommended. Save your bandwidth and don't bother. However, if you want a snazzy setup DVD, try this on for size: 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/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! OK. Now that I've got your attention... let me say that jocose says you can. But you must follow his instructions here. Please note: these instructions have not been tested in our labs at Muppet Central. Advance at your own risk. For those of you who want to mess around and don't mind burning an extra CD or two, continue reading: debmirror will only erase your original files. You must change the name of the download folder(s). Let me explain and illustrate.This is what debmirror appears to do when run:
The quick way to add files from different servers (such as MediBuntu and Canonical) is to put the additional files in unique folders. Examples: ~/MediBuntuRepos and/or ~/CanonicalRepos (your folder names may vary). Then replace ~/UbuntuRepos in each command. If you're feeling confused by the above description and you just want to start downloading, the following steps show how to create Canonical and Medibuntu CD sets: Canonical Repos Code:
debmirror --nosource -m --passive --host=archive.canonical.com --root=/ --method=http --progress --dist=hardy,hardy-backports,hardy-proposed,hardy-security,hardy-updates --section=partner --arch=i386 ~/CanonicalRepos --ignore-release-gpg Code:
debpartial --nosource --dirprefix=ubuntu --section=partner --dist=hardy,hardy-backports,hardy-proposed,hardy-security,hardy-updates --size=CD80 ~/CanonicalRepos ~/CanonicalRepos/CD Code:
ruby debcopy -l ~/CanonicalRepos ~/CanonicalRepos/CD/ubuntu0 Code:
mkisofs -f -J -r -V "Canonical" -o ubuntu-7.10-$(date -I)-Canonical.iso ~/CanonicalRepos/CD/ubuntu0 Architecture options = amd64, powerpc or sparc MediBuntu Repos Code:
debmirror --nosource -m --passive --host=packages.medibuntu.org --root=/ --method=http --progress --dist=hardy --section=free,non-free --arch=i386 ~/MediBuntuRepos --ignore-release-gpg Code:
ruby debcopy -l ~/MediBuntuRepos ~/MediBuntuRepos/CD/ubuntu0 Code:
mkisofs -f -J -r -V "MediBuntu" -o ubuntu-7.10-$(date -I)-MediBuntu.iso ~/MediBuntuRepos/CD/ubuntu0 Architecture options = i386, amd64, powerpc (To add MediBuntu to your personal repositories: https://help.ubuntu.com/community/Me...07a38a00d70e9f) Google Repos Code:
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 __________________________________ 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 For anyone who is interested for whatever reason... be it nostalgia, business, just plain techno geek, or reasons you would probably not want everyone to know, here are example codes for the classic repositories. Warty Warthog on the i386 architecture: Code:
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 Code:
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 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:
13. References This tutorial was pieced together from:
Other related links:
14. Mission, Vision & Values
Last edited by BobSongs; December 15th, 2009 at 02:06 PM.. Reason: touch ups on the formatting. |
|
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() Join Date: Apr 2006
Location: Philippines
Beans: 73
Ubuntu 7.10 Gutsy Gibbon
|
Re: How To: Make Your Own Ubuntu Repository DVDs
Hello Bobsong. Thanks for the how to. I was trying to build an amd64 DVD. I performed your scripts and all went well until i reached the part where i have to divide the download into dvd size chunks. it kept looking for i386 package.gz. Luckily i've figured out that i have to modify a bit your command line for debpartial by adding --arch=amd64. and it went well.
Thanks again. Im going onto the next step. |
|
|
|
|
|
#3 |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Location: Montreal, Canada
Beans: 477
Ubuntu 9.10 Karmic Koala
|
You caught me. Okie dokie. I'll fix the tutorial.
__________________
> Video tutorials for: GIMP, InkScape, and Asaph. Buy a Linux PC, learn about Linux and get more Ubuntu software Last edited by BobSongs; February 4th, 2008 at 01:16 AM.. Reason: removed unnecessary words. |
|
|
|
|
|
#4 |
|
Just Give Me the Beans!
![]() Join Date: Apr 2006
Location: Philippines
Beans: 73
Ubuntu 7.10 Gutsy Gibbon
|
Re: How To: Make Your Own Ubuntu Repository DVDs
Bobsong.
Everything's all right. I now have a repository on my extternal hard disk and can take it home where i dont have internet access and update and install softwares on my ubutu. In fact i need not burn the isos i've created i just mounted them using the mount command. Thanks again. Nice How To.! |
|
|
|
|
|
#5 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Location: Adelaide, South Australia
Beans: 643
Ubuntu 9.10 Karmic Koala
|
Re: How To: Make Your Own Ubuntu Repository DVDs
any idea how to then make incremental updates to the resulting final debmirror archive?
hence to prevent another 12hour 27gb download session. for only three or four new packages.
__________________
Fear is the mindkiller.... The little death that obliterates... |
|
|
|
|
|
#6 | |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Location: Montreal, Canada
Beans: 477
Ubuntu 9.10 Karmic Koala
|
Quote:
Good question, airtonix. Your answer has been integrated into the tutorial (Step 8 ).
__________________
> Video tutorials for: GIMP, InkScape, and Asaph. Buy a Linux PC, learn about Linux and get more Ubuntu software Last edited by BobSongs; February 4th, 2008 at 01:17 AM.. Reason: removed unnecessary words. |
|
|
|
|
|
|
#7 | |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Location: Montreal, Canada
Beans: 477
Ubuntu 9.10 Karmic Koala
|
Quote:
I like your idea of putting them on an external drive. I imagine that would be more than sufficient and very efficient. Mounting them makes much sense. Especially if you've got the external drive available and the PC in question only has a CD ROM reader.
__________________
> Video tutorials for: GIMP, InkScape, and Asaph. Buy a Linux PC, learn about Linux and get more Ubuntu software Last edited by BobSongs; March 14th, 2007 at 07:59 PM.. |
|
|
|
|
|
|
#8 |
|
Just Give Me the Beans!
![]() Join Date: Apr 2006
Location: Philippines
Beans: 73
Ubuntu 7.10 Gutsy Gibbon
|
Re: How To: Make Your Own Ubuntu Repository DVDs
Bobsong, the GeekSpeak part is a good addition.
![]() |
|
|
|
|
|
#9 | |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Location: Montreal, Canada
Beans: 477
Ubuntu 9.10 Karmic Koala
|
Re: How To: Make Your Own Ubuntu Repository DVDs
Quote:
Now I'm working on a way to get Synaptic to recognize the downloaded repositories as valid instead of using the online repositories. I've almost got it... but not quite. I'll post it as soon as I figure out how it's done. [Edit]: Done. See Step 9 above. Also: all the commands have been coloured red where to show what should be changed if the need arises.[/edit]
__________________
> Video tutorials for: GIMP, InkScape, and Asaph. Buy a Linux PC, learn about Linux and get more Ubuntu software Last edited by BobSongs; February 4th, 2008 at 01:19 AM.. Reason: made corrections to the text to reflect the modified tutorial. Makes more sense now. |
|
|
|
|
|
|
#10 |
|
Just Give Me the Beans!
![]() Join Date: Apr 2006
Location: Philippines
Beans: 73
Ubuntu 7.10 Gutsy Gibbon
|
Re: How To: Make Your Own Ubuntu Repository DVDs
Bobsong.
What if I would like to add another repository that is not on the official list? Say I would like to add a repository where Beryl is available? Should I just modify my repository list? Anyway , Im going to test it tomorrow and see what what happens. |
|
|
|
| Bookmarks |
| Tags |
| dvd, repository |
| Thread Tools | |
| Display Modes | |
|
|