Evanescent Thoughts

Evanescent Thoughts

Mirroring the Linux Repositories for Ubuntu

with 2 comments

I wanted to mirror the ubuntu repositories back in my coll  . So i needed to download the required packages for Intrepid Ibex . Ususally the download would take place in NIT Trichy itself but this time because of frequent power cuts , we were not able to run debmirror . Debmirror  is a perl script that helps us in downloading the packages for specifc distribution. Debmirror runs a script so a powerfailure would actually stop the download . But say u lost ur internet connection in between , it restore automatically if the script is still running .

Earlier I had planned to get the repos from Hari who said he would get it from his office . But recently i found that the repos he gave was missing the multiverse components in it . So it was missing quite a lot of packages ( about 3 GB) . I couldnt run a wget because this multiverse component had to be inserted into lots of places  and had to be gathered from a large pool selectively . So ftp falied me too since i couldnt select the packages for the 8.10 distro alone.

Suren suggested apt-mirror and i had some issues with it and again it failed miserably. And then i did some calculations and thought why not download the whole repository again . According to my calc , it should take me about 7 hours from the local site at IIT M. So Hari guided me on debmirror and after few intial glitches i managed to download the complete repository and i was amazed at the speed of download . It was close to 3Mbps ( Look at screen shot below) . The entire download took just 2 hours and i was all ready . I had to ignore verifying the gpg key of the packages while downloading since that was again causing some problems . I am giving the screen shots below ..and i am also including the script for debmirror .


export GNUPGHOME=/home/mirrorkeyring



# this was the local iitm mirror behind my proxy


# u can use an ftp too if u want

# this is the place where u need the repos to be stored whn downlaoded

# Start script
# i added –ignore-release-gpg to skip the key verification
debmirror       -a $arch \
–no-source \
-s $section \
-h $server \
-d $release \
-r $inPath \
–progress \
-e $proto \
–ignore-release-gpg \

#### End script to automate building of Ubuntu mirror ####

And here is the screen shot of my terminal after the download 🙂


if u dont have debmirror  run sudo apt-get install debmirror . I had to change my sources.list to point to to download the debmirror and then use it to download the repos from U can do it as per ur requirement. But downloading from internet is gonna take quite few days 😀


Written by Sathya Narayanan

January 1, 2009 at 4:50 pm

2 Responses

Subscribe to comments with RSS.

  1. Thank you for your suggestion to ignore gpg keys, with which I was fumbling for some time.
    My debmirror has started downloading the files in a machine with id
    My doubt is how to point from a system with id to the debmirror in this system?
    Give the line to be added in sources.list.
    Thank you in advance.
    M. Kalidoss

    M. Kalidoss

    April 12, 2009 at 8:01 pm

    • if u r asking me how to make the repository u downloaded to be used , add the following
      deb file://PATH/ubuntu intrepid main multiverse universe restircted
      where PATH is the location of ur repo folder like /media/Sathya

      Sathya Narayanan

      April 16, 2009 at 3:44 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: