Creating your own mirror: Hardy and Gutsy

I have a development environment that needs to be somewhat stable - I am cross-compiling to a MIPS32 platform, and I compile *a lot* of code. 2 linux kernels, Firefox 1.5 and all the dependencies to run on a frame buffer device, busy box, build root, and much of the operating system utilities (e2fsck, etc.). Much to my chagrin, I found out recently that my Gutsy installs no longer work. I'm of the opinion if it ain't broke, don't fix it, so why upgrade if you don't have to? The trouble comes in when you decide you want to install a new system (with an old distro) or want a new application. Hence I discovered a very simple application that perhaps many of you know - apt-mirror. This application (hear after called AM) will mirror any repository. AM requires several things to run properly.
  1. it has to be installed (sudo apt-get install apt-mirror).
  2. It has to be configured.
  3. It has to have the correct mirrors.list (config and URL file)
  4. The initial directory structure needs to be in place.
You will need about 2-3G of free space, you will need to know the repositories you want to mirror, and of course you will need to know how to configure all this. The apt installation will place a mirror.list in the /etc/apt directory. First, save the original: sudo cp mirror.list mirror.list.orig You may need to change the base_path, mirror_path, skel_path, and var_path. Here's mine: set base_path /data/linux/distro/ubuntu/repos set mirror_path $base_path/mirror set skel_path $base_path/skel set var_path $base_path/var You then add your sources (see Adding Sources), then create/cd to the base directory (i.e. while in /data/linux/distro/ubuntu/repos) and do: mkdir -p mirror skel var Then run: sudo apt-mirror Then go on vacation. This will take a *long* time. You can stop apt-mirror at any time (ctrl-C) and when it resumes, it will continue where it left off. There is some overhead when it does its pre-processing, so interrupting it often is not a good idea. Adding Sources My default arch is amd68, so I have to add deb-i386 (and presumably the converse is true, adding deb-amd64 for i386 arch). There are other architectures, but you will have to figure those out. There is a cleanup (or skip clean if you want things like the installer left): Those lines are as follows: deb-i386 http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse deb-i386-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb-i386-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb-i386-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb-i386-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb-i386-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse For every deb-i386, there is a deb, to download both architectures: deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu hardy main/debian-installer deb-i386 http://archive.ubuntu.com/ubuntu hardy main/debian-installer Now the same thing for Gutsy: deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse deb-i386-src http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb-i386-src http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb-i386-src http://old-releases.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb-i386-src http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb-i386-src http://old-releases.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse Installer: deb http://old-releases.ubuntu.com/ubuntu gutsy main/debian-installer deb-i386 http://old-releases.ubuntu.com/ubuntu gutsy main/debian-installer Cleanup scripts: clean http://old-releases.ubuntu.com/ubuntu skip-clean http://old-releases.ubuntu.com/ubuntu/dists/gutsy/main/installer-amd64/ skip-clean http://old-releases.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/ skip-clean http://old-releases.ubuntu.com/ubuntu/dists/gutsy/main/source/ Cheers!

Powered by Drupal - Design by artinet