Updating Ubuntu Images With Jigdo

By | 2008/04/18

Well its that time again, the Ubuntu community is just about ready to launch another fantastic release and with that release the worlds interweb tubes are going to get clogged as everyone upgrades.  It’s about this time that I always start thinking about ways to be more efficient with my bandwidth.

Bittorrent, of course, is a great improvement over the traditional direct download method but in some cases there are potentially more efficient methods to use.  I’d like to outline (as I do with every release) how to update your current ubuntu images using Jigdo.

Jigdo, if you’re not familiar, takes a current Ubuntu image and compares its contained packages with the packages within an updated image (ie; alpha vs beta, beta vs RC, RC vs final).  Using this method you’re only downloading the packages that have *changed* between images and not the entire image again.  The morning RC was released I used jigdo against my local ubuntu package mirror and had the new image in about a minute!

Installing Jigdo

Jigdo is available within the Ubuntu repositories.  To install Jigdo you can run the command:

sudo aptitude install jigdo-file

Using Jigdo

Jigdo requires a .jigdo file, which outlines what the latest image *should* have, which is then compared to the previous image file that you already have on the machine.  The previous image can be burned and in the drive or loop-mounted (mount -o loop file.iso /mnt).  So, to begin you’ll need to start Jigdo and give it the path to a .jigdo file:

jigdo-lite http://us.releases.ubuntu.com/hardy/ubuntu-8.04-rc-alternate-i386.jigdo

The .jigdo file can be found on most download sites, look for it just below the .iso or .torrent files.

Jigdo will then download that .jigdo file and read the contents of what package versions should be in the latest release.  It will then ask you for the image you want to compare it to, which you can point it to your loaded disk or mounted .iso.

If not much has changed between the images (its *really* efficient for updating dailies!) it should be finished pretty quickly.  The more changes there are the more packages it’ll have to download.  When it has being able to find, or has downloaded the required updated packages, it’ll create a new .iso image for you.  Tada!  You have an upgraded image and you’ve used much less bandwidth than traditional methods.

note: using Jigdo to compare a 7.10 image vs an 8.04 image is not going to offer any improvements–everything has been changed.  It is best used for incremental updates, like beta to RC, RC to final, etc.

For more information on using Jigdo for updating Ubuntu images see the JigdoDownloadHowTo Wiki page.

5 thoughts on “Updating Ubuntu Images With Jigdo

  1. Greg

    I had this same question when I noticed that not all ubuntu flavors had jigdo files.

    My current understanding of jigdo is that it can use your older downloaded cd as a starting point, then only update the files that need updating. (either put the cd in a drive or use a tool to mount the image) The desktop “live-cd” versions are constructed differently than the server and alternate install cds. The live cds have most of their data within one giant 600mb+ file that is a compressed filesystem. So jigdo would not help much with that. I supposed theoretically, someone could do some kind of recursive jigdo and make it look not just within cd, but within that compressed filesystem image, and update files withing that, but I don’t know enough about those compressed filesystems to know if that would work.
    -Greg

    Reply
  2. Hendrik

    I came to within 49 files of completing an update following this tutorial today.

    Then I got messages like:
    “–11:28:49– http://archive.ubuntu.com/ubuntu/pool/main/p/policykit/libpolkit-grant2_0.7-2ubuntu6_i386.deb
    => `ubuntu-8.04-rc-alternate-i386.iso.tmpdir/archive.ubuntu.com/ubuntu/pool/main/p/policykit/libpolkit-grant2_0.7-2ubuntu6_i386.deb’
    Connecting to archive.ubuntu.com|91.189.88.46|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    11:28:49 ERROR 404: Not Found.”

    and finally:

    “Aaargh – 49 files could not be downloaded. This should not
    happen! Depending on the problem, it may help to retry downloading
    the missing files.
    Also, you could try changing to another Debian or Non-US server,
    in case the one you used is out of sync.”

    It seems that http://archive.ubuntu.com/ubuntu/pool has been changed by the latest daily snapshot, so it no longer corresponds to the rc .jigdo description.

    Does this mean that it is no longer possible to update to the rc?

    Reply
  3. nickishappy

    I checked out one of the .jigdo files, and it looks like this might be a fairly easy to to create your own “spins.” You’d have to get around some of the md5 sums. Might be worth a try

    Reply
  4. Shane

    Thanks for this info! This has been really helpfull! I never knew what this jigdo thing was all about. I will be back here after I get the Ubuntu RC downloaded, and update it with jigdo, really neat trick! Thanks!

    Shane

    Reply

Leave a Reply

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