Pablo Iranzo Gómez's blog

A bunch of unrelated data

nov 15, 2007

Creating Jigsaw Download (Jigdo) files for downloading ISO's

Translations: es

Table of contents

  1. Introduction
  2. ¿How it works?
  3. ¿How do I create a .jigdo and a .template file?
  4. ¿How do I get an ISO from a .jigdo file?


Jigdo (JIGsaw DOwnload) is a small utility that can assemble a CD/DVD image from it's internal files.

For example, Debian has been using it for years for distributing the entire distribution: you downloaded a .jigdo file, and then, using the utility jigdo-lite (package jigdo-file on Debian like and RPM based1. This way, you only downloaded small files from servers, preventing line failures, spreading load between several servers, etc.

Furthermore, if you already had some files (for example if you started at version X and have been downloading and keeping al files until X.Y, jigdo, can use those updated files to compare them against the .jigdo file and avoid downloading duplicated files...

¿How it works?

A Jigdo download contains two parts, one, the .jigdo file which contains the files part of the ISO2 image and a template file automatically generated when creating the .jigdo using jigdo-file.

When specified jigdo-lite "file.jigdo" will ask for previous locations (folders) that could contain required packages, and will use the url's described in .jigdo file to download any missing package and reassemble an ISO image with same MD5sum of original, but saving on bandwidht and avoiding re-downloads from network failures (just small file compared to a full DVD iso)

¿How do I create a .jigdo and a .template file?

For example, if we download CentOS 5 DVD iso from and then mount it loopback and put on a folder (for example for providing our own mirror, or kickstartable tree) we can do:

(Suppossing that iso is at /var/www/CentOS/isos/ and that our exploded directory and file tree at /var/www/CentOS/tree/, we will do:

jigdo-file mt -i /var/www/CentOS/isos/CentOS-5.0-i386-bin-DVD/CentOS-5.0-i386-bin-DVD.iso -j /var/www/CentOS/Centos5-DVD.jigdo -t /var/www/CentOS/Centos5-DVD.template —uri Centosmirrors=[]( /var/www/CentOS/tree/

After some processing and ISO<->tree verification we will have two new files.

Using a text editor we can modify our .jigdo file and set the URL for our source packages (for example:

After that, if we provide those files to anyone, he/she could enjoy faster and better downloads of our ISO's that will get reconstructed automatically on target system

¿How do I get an ISO from a .jigdo file?


jigdo-lite http://SOMESERVER/PATH/file.jigdo

JigDo will download the descriptor, search it for the template file, download it and begin creation of ISO by downloading packages not found on optional local folder (to avoid re-download of packages).

I hope you find this useful :)

Attached are the sample .jigdo and .template that I created for this document, right now it allows you to get a Centos 5 DVD using individual RPM files.

You can test it using jigdo-lite

Or: jigdo-lite

  1. From Dag's Repo 

  2. It can also be used to deliver other kind of files 

posted at 21:50  ·   ·  linux  iso  foss