Mod Edit: No longer active
Alternative: http://keryxproject.org/ http://www.webupd8.org/search/label/...max-results=10
NEW: major changes. New host and new features - see post #49.
For those accessing the Internet from a library, school, college, workplace, from windows, etc.
Just upload the status file from the offline Ubuntu (the complete pathname is /var/lib/dpkg/status) to your user account, select the ubuntu release, check if you want to upgrade or not, add a list of packages you want to install, click "List packages", wait a minute and you will get a list of the packages you need and you still don't have installed on your ubuntu offline, just like if you had done "sudo apt-get install".
To see how it works check post #11.
VERY IMPORTANT: To install ubuntu-restricted-extras offline in Gutsy check this post. If you don't do it like posted on that link, you'll get broken packages and a broken system!
The following is here just for historic curiosity and concept.
Please read post #11 and #49 for about nonetdebs website.
last few days I've been messing around with this BASH script I've made - nonetdebs. It's fresh (not wide testing done yet, just here) and I need some feedback about if it is useful and if it really works.
nonetdebs can download or list the packages you need to download for your Ubuntu at home with no Internet connection.
It is somehow related/based in this http://ubuntu.wordpress.com/2005/09/...slow-internet/ and this http://beans.seartipy.com/2006/05/06...et-connection/ but done the automatic and easiest way (with a nurcses GUI), plus the independence of which Linux/Ubuntu version you are running (nonetdebs creates a chroot, so nothing is installed on the connected system, the packages are just downloaded) and plus avoids downloading already installed packages (the file you bring from the other computer tells what packages are already installed there).
nonetdebs can be an alternative to APTonCD and/or APT-move:
- APTonCD and APT-move need an equivalent version of Ubuntu on both computers, nonetdebs don't;
- Creating DVD mirrors of the repositories is a big download and needs frequent updates, nonetdebs just downloads upgrades and new packages you want, knowing the packages you already have. It is a more individualized option.
What you need:
1. The status file from your Ubuntu box. You can email if to yourself (~2 MB, maybe 5 MB, 10 MB max, it is located at /var/lib/dpkg/status), or copy it to a CD-RW or USB memory stick/pen.
2. A computer that have Internet connection.
Option 1: A computer, as long as you can boot it with a LiveCD (Ubuntu Desktop?) and have an Internet connection with it. For real Windows, maybe you can use Wubi to install Ubuntu in it and use this script, or use cygwin --- all untested options except for the LiveCD (testers needed). A writeable partition from the LiveCD: ext3, something writeable. Many possible untested options here... (except FAT32, debootstrap apparently doesn't like it)
Option 2: Any Linux box with Internet, as long as you can install debootstrap and dialog and you know its root password (k/x/ubuntu, fedora, whatever). BASH and wget are also needed, but are generally available in almost all Linux distros.How it works:
* on the following text, "the other computer" is the Ubuntu without Internet.
The complicated way:
The simple way:
1. You copy the file /var/lib/dpkg/status from the other computer to a USB pen/stick or to a CD.
2. You take a LiveCD and a USB pen to the computer with internet and boot it.
3. You install "dialog" and "debootstrap" packages on the LiveCD, then you download
and run nonetdebs script on a terminal.
4. You setup nonetdebs (mirrors for downloading, locale, Ubuntu version, status file).
5. You select upgrades, select new packages and make the downloads to the USB memory.
5. You go home.
6. You plug the USB pen on the other computer, open a terminal, type
sudo apt-get update
sudo apt-get --allow-unauthenticated upgrade
sudo apt-get --allow-unauthenticated install packages_names
1. You have a copy of your status file from the other computer (email attachment, or on CD or USB);
2. You download the packages "dialog" and "debootstrap" and run the nonetdebs script (download it from here
and make it executable);
3. nonetdebs downloads, setups and creates a chroot with debootstrap of the Ubuntu version of the other computer on the connected computer (on USB or disk - ext3/something_writeable and with the needed space available - 200 MB minimum ).
This will make a download of a minimal Ubuntu of the Ubuntu version you have choose (50 MB of download, 200 MB max of disk or USB space). This is a one time download. The next time you use nonetdebs, you can select this chroot again, no more chroot downloading needed. You can even create a backup of that chroot from the script;
4. You copy the status file (from the other computer) to the chroot (done from the script). With the status file, the chroot will «know» what packages you have at home and will know which one to upgrade and/or install -- less downloads needed, more accurate upgrades;
5. You select to upgrade and/or install any new packages you want from the repositories. The script will only select the packages you don't have on the other computer, and will select all dependencies except the ones you already have installed (less download volume);
6. once nonetdebs has created a list of the files you need to download (this list will be inside the chroot if, for some reason, you can't download and save the packages with the LiveCD, or if you have a low-bandwith at home and can't/don't_want_to make the downloads there and only have Internet access from a Windows box, etc). The list is the internet address of the packages needed on the repositories (check post #2
to download it from Windows).
7. You download the packages nonetdebs will create a script when you download the packages - nonetrepo - and puts it in the same directory where you saved your packages. This script - nonetrepo - is to add the new repository without too much trouble (easier).
8. OPTIONAL: you can create an ISO file and burn it from Windows ((reboot needed here - look at post #2
9. You go home (where the other computer is) and run
from the directory where the packages are, to had the new repository. You can do this directly on the USB memory stick/pen or copy the files from a CD to the hardisk and run the script from there (a writable directory/partition is needed here for dpkg-scanpackages work, although some tweaking might work to avoid copying the files to disk).
10. You're done. Update APT (Synaptic or apt-get) and install the new packages. Use
sudo apt-get --allow-unauthenticated upgrade
sudo apt-get --allow-unauthenticated install name_of_the_packages
to install them. Update-manager will not work, because the files aren't signed.
I've tested it upgrading a Ubuntu 7.10 Gutsy Tribe-5 to its latest updates (more than 400 packages upgraded) with a LiveCD and a USB memory pen, then I connected it to internet, add the regular repositories, and no more needed updates were found.
Note to aptitude users: although it is possible to make apt-get download "recommended packages" (to be used with aptitude on the other computer) it doesn't work with Dapper, so I've not enabled this option, but it can be done with Feisty/Gutsy (Edgy not tested) just with some tweaking (with apt.conf on the chroot directory and APT options).
If you try to write to non-writeable partitions, the script will tell you that you can't.
TODO: nonetrepo - check on the other computer if the new repository already exists on source.list (duplicates).
WISHLIST: nonetdebs - gtk frontend (zenity).
The nonetdebs script can be found here: http://ubuntu.no.sapo.pt/nonetdebs/nonetdebs
("dialog" and "debootstrap" also packages required).