jump to navigation

How to Upgrade or Install Packages on Boxes without a Fast Internet Connection September 22, 2005

Posted by Carthik in administration, applications, guides, ubuntu.
trackback

This will be of interest to those of you who want to upgrade, or install new packages on systems which are not connected to a fast enough internet connection, using another machine, which is connected to the internet through a better connection.

In other words – imagine you have:

  1. a computer running Ubuntu, but which is not connected to the internet, or is connected to the internet using a dial-up connection.
  2. access to a Ubuntu system that is connected to the internet using a high speed connection, say a machine on a lan at work
  3. a removable storage medium, like a zip drive, or a high-capacity usb drive

You can then upgrade the computer with the slow internet connection using apt-zip :

Update a non-networked computer using apt and removable media

These scripts simplify the process of using dselect and apt on a non-networked Debian box, using removable media like ZIP floppies. One generates a `fetch’ script (supporting backends such as wget and lftp, in a modular, extensible way) to be run on a host with better connectivity, check space constraints of your removable media, and then install the package on your Debian box.

Note on current version: space-checking is not done and spanning multiple disks is not yet supported.

More detailed instructions are available at this apt-zip howto.

Comments»

1. Amit - February 6, 2006

hi,
If the computer connected to the Internet is a Windows XP machine, will this work? Is there a program in XP (like FileZilla) that can download the required packages?

Can the thumb drive be FAT filesystem?

2. Nick - June 20, 2006

Yes, as long as the drive is mountable you can use VFAT (so obviously compile it in).

It would be possible to run wget in cygwin (sort of) but it may be easier to just download the files manually and dump them in a tarball, or to run the script from a livecd (eg Knoppix).

3. Ubuntu Blog » Installing Packages on Computers with Slow Connections Redux - July 8, 2006

[…] Earlier, I had written about using apt-zip to upgrade computers on slow internet connections by using a faster machine to do the downloads. However, since that involves understanding how apt-zip works, and a small learning curve, here is a hack that should work pretty well, in spite of it’s hackish nature. […]

4. kalyank.net » Installing Packages on Computers with Slow Connections Redux - July 9, 2006

[…] Earlier, I had written about using apt-zip to upgrade computers on slow internet connections by using a faster machine to do the downloads. However, since that involves understanding how apt-zip works, and a small learning curve, here is a hack that should work pretty well, in spite of it’s hackish nature. […]

5. Sanat - August 8, 2006

Or a different approach would be to copy the /apt/var/cache from the net enabled computer to the computer which requires the programs, considering that the programs have been installed in the net enabled one.

6. jim - January 12, 2007

Let apt-medium handle your offline update/install medium.

http://wiki.debian.org/AptMedium

7. penlap - April 11, 2007

If you want to install xxx_version_arch.deb on a machine(A) with slow connection :
on A do this:
apt-get –print-uris -y install xxx | grep “^'” | gawk ‘{ print $1 }’ | sed “s/’//g” > packages.lst

take text file packages.lst to machine with fast connection and run:
wget -i packages.lst [ -P DIRECTORY_TO_SAVE_FILES ]
thers is one wget.exe file for windows wich can be find in Internet.
Now you have all the files you need.
On a machine A copy these files to /var/cache/apt/archives/ and run apt-get install xxx

To upgrade the whole system, apt-get –print-uris -y dist-upgrade | grep “^'” | gawk ‘{ print $1 }’ | sed “s/’//g” > packages.lst

8. abbas zarei - May 22, 2007

I have winxp in my computer that connected to a fast internet conection. can I download all updates in a package?

9. Timran Szaran - May 28, 2007

How update the packages database in offline mode
# “aptitude update” (offline repositories update):

Go to the computer without internet connection:
cat /etc/apt/sources.list

We can view here:
deb http://archive.ubuntu.com/ubuntu/ dapper main restricted

Go to the computer with internet connection and download:

mkdir -p dapper/main
mkdir -p dapper/restricted
cd dapper/main
wget -c http://archive.ubuntu.com/ubuntu/dists/dapper/main/binary-i386/Packages.bz2
bunzip Packages.bz2
cd ../..

cd dapper/restricted
wget -c http://archive.ubuntu.com/ubuntu/dists/dapper/restricted/binary-i386/Packages.bz2
bunzip Packages.bz2
cd ../..

mv dapper/main/Packages archive.ubuntu.com_ubuntu_dists_dapper_main_binary-i386_Packages
mv dapper/restricted/Packages archive.ubuntu.com_ubuntu_dists_dapper_restricted_binary-i386_Packages

#Go back to the computer without internet connection:
mv *Packages /var/lib/apt/lists/

#Ok, now we have two file with databases of repositories.

/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_dapper_main_binary-i386_Packages
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_dapper_restricted_binary-i386_Packages

You maked “aptitude update” in offline mode.

10. omar - May 29, 2007

does anybody knows how to make this on Debian 4 “etch” ?

11. Timran Szaran - May 31, 2007

I think is the same method make all offline:
You need
1) configure /etc/apt/sources.list ,
2) make “aptitude update” offline for update packages databases.
3) With apt-get –print-uris -y install xxx see what packages you need to download.
4) download packages with wget
5) Copy and install these downloaded packages.

12. cesar - September 9, 2007

How can i connect like 6 pcs in to mi w. router with a slow internet connection and few packages sent? Is there any hack to allow friends to be conected to the internet all at once and not having to disconect because the agency doesnt allow more than 2 pcs?

13. Mitchell - April 14, 2008

Learn to speak English and someone just might tell you.

If you are running Windows XP on the internet enabled computer, try wubdepends, it’s a portable .exe file that can be found on sourceforge. It even resolves dependencies for you!

14. jobsearch - April 24, 2008

Thats a good point Mitchell wubdepends works well and should solve any other problems.

15. War$nake - January 6, 2009

Chk out these ideaz here…

Installing packages without an internet connection:
http://fasterthanlight.wordpress.com/2009/01/05/packgs-without-internet/

And installing packages using Live CD:
http://fasterthanlight.wordpress.com/2008/07/02/install-applications-from-live-cd/

16. seks izle - September 29, 2010

hi,
If the computer connected to the Internet is a Windows XP machine, will this work? Is there a program in XP (like FileZilla) that can download the required packages?

17. jackets and coats - July 5, 2013

fantastic issues altogether, you just won a new reader.
What might you suggest about your publish that you just made a few days in
the past? Any positive?

18. Jeff - April 29, 2014

Interesting method. Does it still work the way you claim it does?

19. nylon - June 8, 2014

Hello, i feel that i saw you visited my website so i got
here to return the prefer?.I am trying to in finding
things to improve my web site!I assume its adequate to make uuse oof
some off your ideas!!

20. Linnea - August 5, 2014

If you wish for to get a good deal from this post
then you have to apply these strategies to your won webpage.

21. Http://Xavieryostewart.Thoughts.com - August 8, 2014

I just couldn’t go away your site before suggesting that I extremely enjoyed the standard
info an individual supply for your visitors?
Is going to be back continuously in order to inspect new
posts


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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: