How to use apt-p2p For Faster Upgrades From Ubuntu Intrepid (8.10) to Jaunty (9.04)

Sponsored Link
If you want to upgrade From Ubuntu Intrepid (8.10) to Jaunty (9.04) use this tutorial for faster upgrades.We are going to use apt-p2p for this tutorial.apt-p2p is a p2p proxy for apt dowloads, it will act as a proxy between apt requests and a repository server, downloading any request files from peers (if possible), else will fallback to direct HTTP download. In general, apt-p2p save bandwidth, use limited cpu and memory resources and reduce congestion on the ubuntu mirrors.apt-p2p will get the request files from peers, therefore, it will avoid the congestion on the ubuntu mirrors.

Note:- This is only for advanced users this might break your system

Note: This is still a beta release. Do not install it on production machines. The final stable version will be released in 23rd April 2009.

apt-p2p features

  • Downloads from peers, increasing the available bandwidth to the user
  • Reduces the bandwidth requirements needed to setup a repository of packages
  • Seamlessly integrates with the current APT tool
  • Automatically falls back to downloading from an HTTP mirror when peers are not available
  • Builds on other already existing tools where possible
  • Fast and requires limited CPU and memory
  • Will try to download any file it can find a hash for from peers (including Packages.bz2, Sources.gz, ...)

Install apt-p2p in ubuntu

sudo aptitude install apt-p2p

This will complete the installation.

Configuring apt-p2p

First you need to take a backup of your source list

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

Edit sources.list file

gedit /etc/apt/sources.list

Add “localhost:9977? after the “http://” save and exit the file

deb http://localhost:9977/ intrepid partner
deb-src http://localhost:9977/ intrepid partner
deb http://localhost:9977/*mirror-address*/ubuntu/ intrepid main universe restricted multiverse
deb-src http://localhost:9977/*mirror-address*/ubuntu/ intrepid main universe restricted multiverse

So basically just insert "localhost:9977" after the "http://" and where **mirror-address** is the address of the mirror

Now remove the cache files using the following command

sudo rm -rf /var/cache/apt-p2p/cache/*

Update the source list file using the following command

sudo apt-get update

Start upgrade from Interpid to Jaunty

sudo update-manager -d

If you want to Check peers, downloads and uploads speed and DHT statistics Open Internet browser,

go to http://localhost:9977

Sponsored Link

You may also like...

9 Responses

  1. I tend to go for the new version when it becomes beta as I can’t want to see what’s new for myself. However there is no way I will continue with any code left over in the beta when the final version is out. I always wonder just how good the program is at replenishing itself.

    Unlike windows, it is a doddle to zap your drive and reload Linux afresh. I quickly save my data and that’s what I do.

    So twice a year I have a virgin newly loaded computer.


  2. Gil says:

    is it possible to use this method for regular updates – meaning not only for complete distribution upgrade

  3. Kimme Utsi says:

    Yes, apt-p2p is just an p2p protocol for Debian archives, and those are not used for upgrades.

    apt-p2p — apt helper for peer-to-peer downloads of Debian packages

  4. blink4blog says:

    the only problem i foresee is if you want to upgrade using ext4 filesystem. i wish to keep my /home partition but if that is the case, i would need to remain ext3 as /home partition while others in ext4. sounds good?

  5. Matt says:

    You can mount an ext3 partition using the ext4 driver and it will make any future use use extents rather than using standard indirect allocations. It will also turn on deferred allocation as well. So you will get some of the benefits of ext4 without having to repartition and/or make a new filesystem

  6. Vikram says:

    How safe it this ? Is it possible to install software from a malicious peer ?

  7. Hans says:

    Vikram, Debian/Ubuntu will warn when packages can not be verified and will ask you what todo. This is as safe as downloading from a Debian/Ubuntu-mirror.

  8. quequotion says:

    Hans: Is that assuming it does not punch any new holes in the current PGP-key system implemented by apt, or has this actually been tested?

  9. Knysliux001 says:

    apt-p2p is potentially a very fast way to get updates to your Debian based systems. The more people use this, the faster and more reliable it will get.
    If you have multiple computers in a local network setting up apt-p2p in every one of them would be insane. This simple hack allows to use one apt-p2p server for the whole network saving bandwidth.
    On clients simply change localhost:9977 to servers IP e.g.
    Setting this address as a global apt proxy does not work because apt-p2p has to communicate with apt directly, so every deb line in sources.list has to be replaced.

Leave a Reply

Your email address will not be published. Required fields are marked *