Thursday, June 01, 2006

How do I update an internet-less Ubuntu box: a Repost!

Perhaps the fastest way to update an internet-less Ubuntu box is to bring the CPU to an internet shop, connect it to the Local Area Network with a shared internet connection and then do the “sudo apt-get update”. I guess that’s what Zak has been doing…

But in Linux, it is almost always that there are a number of ways to do things for your PC and this is my way of updating an internet-less Ubuntu box.

On an updated PC where I configured it not to delete the downloaded (and updated) deb packages located at /var/cache/apt/archives, I copy the contents of that folder to a folder on my home directory, thus:

$ sudo cp /var/cache/apt/archives/* ~/Desktop/updeb

I then burned the contents of ~/Desktop/updeb folder to a CD(s) with GnomeBaker or any CD Burning app of your preference.

Now going to the internet-less PC, copy the contents of the CD containing the updated deb packages to a folder at the home directory of the internet-less PC.

$ sudo mkdir ~/deb

$ sudo cp /media/cdrom/* ~/deb

Now go to the directory where you copied the packages

$ cd ~/deb

Do this while in the said directory to create Packages.gz:

$ sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Open and edit /etc/apt/sources.list to add the local folder as a repo…

$ sudo gedit /etc/apt/sources.list

Insert the following line at the end of the file…

deb file:/home/username/deb/. /

Save and close the file. Update and upgrade with Synaptic or at CLI!

$ sudo apt-get update

$ sudo apt-get upgrade

P.S.: Make sure you have installed the dpkg-dev package on the internet-less PC from the Ubuntu CD Installer before anything else.

$ sudo apt-get install dpkg-dev

I hope this helps!

1 comment:

Anonymous said...

If you have an internet less ubuntu installation, you should give this one a try:

http://www.offlineubuntu.co.cc/

It has easy steps to help you update your offline ubuntu with ease.