How to use apt-p2p For Faster Upgrades From Ubuntu Intrepid (8.10) to Jaunty (9.04)
Sponsored Link
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/archive.canonical.com/ubuntu intrepid partner
deb-src http://localhost:9977/archive.canonical.com/ubuntu 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
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.
Ampers.
is it possible to use this method for regular updates – meaning not only for complete distribution upgrade
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
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?
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
How safe it this ? Is it possible to install software from a malicious peer ?
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.
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?
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 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481243 saving bandwidth.
On clients simply change localhost:9977 to servers IP e.g. 192.168.1.100:9977
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.