Getting Fedora respins with Jigdo

From Crashcourse Wiki

Jump to: navigation, search

Contents

So what's this "respin" thing?

When, in the course of the Fedora life cycle, an abundance of time has gone by since an official release, it becomes just too time-consuming to install that original release and run yum update to bring that installation up to date. As an alternative, you can download a "respin" of the official release, which is a relatively up-to-date version with most of the package updates already applied as of a certain date. And there are two popular options for getting that respin:

  • Pop over to [Fedora Unity] and simply download the entire respin ISO image, or
  • If you have the original release DVD, you can use the jigdo utility to download only the differences between the original release and the respin, and have that utility re-assemble the respin image on your local system. This typically saves buckets of time and bandwidth.

NOTE: Please read the rest of this page before trying any of it. Seriously. I mean it. I'm not kidding.

What is "jigdo?"

In a nutshell, jigdo (short for "jigsaw downloader") will build a newer ISO image by scavenging whatever files and packages it can from an older image that you already have (stuff that hasn't changed), then downloading piece-by-piece only those bits that it needs that have been updated (newer package files and other bits), and finally reconstructing a newer ISO image by putting the pieces back together based on a template file (hence the "jigsaw" analogy). Obviously, the big gain you get is having to download only the newer content of the ISO, which could be only a small fraction of the original.

NOTE: Regardless of what you might read elsewhere, the command you should be running here is jigdo-lite -- not jigdo, and there is no reliable GUI for this, either.

And now, to work.

The recipe

As an exercise, let's use jigdo-lite to create a respin of the Fedora 8 x86_64 DVD.

  • # yum install jigdo (if it's not installed already).
  • Insert your original (what I call the "baseline") Fedora 8 x86_64 DVD, which should get mounted automatically under /media/Fedora 8 x86_64 DVD (note the embedded spaces in that mount point name, which might cause problems, as I will explain shortly).
  • cd to your preferred working directory (which has enough space for the final ISO image plus a download working directory).
  • $ jigdo-lite http://jigdo.fedoraunity.org/templates/20071218/Fedora-Unity-20071218-8.jigdo
  • When asked, enter the number of the ISO re-spin image you want from the list (for this exercise, that would be "13").
  • Finally, when asked, enter the baseline DVD directory path as just /media, at which point jigdo-lite will download the appropriate template file that describes what the final ISO image should look like and start the first phase of the construction.

Just so you know, the "first phase" of the construction is to scan everything under the /media location you specified for everything jigdo-lite thinks it can salvage in building the new ISO image, after which it will tell you just how much it found that can be re-used, as in:

Found 2051 of the 2584 files required by the template

after which jigdo-lite will spend a few minutes creating the initial, full-sized ISO image that it will use as the basis for the respin. When you're prompted by jigdo-lite for yet another location to scan for re-usable files, just hit ENTER, and the rebuild process kicks in. Go for lunch.

Note that if you have directory locations for other files that might save time in the reconstruction process, just keep entering those locations as you're prompted one at a time until you're done, and finally just hit ENTER to let the construction begin. For the sake of this exercise, we'll just assume you're working only with what's on the original release DVD.

About the baseline DVD directory path

Normally, for efficiency, you would enter the exact mount point of the baseline DVD so that jigdo-lite won't waste any time scanning irrelevant directories under /media for re-usable content. If there's nothing else mounted under /media, then you can be lazy and specify just /media.

However, if you have other filesystems currently mounted under /media that you want to avoid scanning (like, oh, a 250G external hard drive), you should be more specific but, sadly, you can't specify a pathname of /media/Fedora 8 x86_64 DVD as jigdo-lite apparently can't handle embedded spaces in the pathname. A simple solution is to insert the baseline DVD in the drive, wait for it to be mounted, then create a symlink to that mount point and use the symlink as the scanning directory, as in :

$ ln -s /media/Fedora 8 x86_64 DVD /tmp/f8dvd

Yes, it's tacky but it appears to work just fine.

Another alternative is to use the gnome-mount command to redefine the default mount point for your DVD device to avoid those annoying spaces. Assuming a device file name of /dev/sr0 for your DVD drive, just do:

$ gnome-mount --write-settings --device /dev/sr0 --mount-point dvd

at which point inserted DVDs will be mounted to the acceptable mount point name /media/dvd. If you need to cancel this setting later, just:

$ gnome-mount --erase-settings --device /dev/sr0

Miscellaneous observations

  • Sadly, there's no cumulative progress counter to know how many objects are left to download for the ISO reconstruction.
  • You can, in fact, use jigdo-lite to reconstruct the newer ISO image even if you have none of the pieces already at hand. All that means is that this will involve downloading every single object required for the reconstruction, but this might be faster and more reliable than trying to grab the entire ISO image in one go.
  • It's not even necessary to have a physical DVD; if you have an ISO image instead, just mount that image somewhere using mount -o loop and use that mount point as one of the directory locations for the re-creation process. The effect is, not surprisingly, the same.

Acknowledgements

Thanks to Andre Robatino for the symlink idea and for bugzilla'ing jigdo-lite's [inability to handle embedded spaces] in the pathname, and to David Jansen for pointing out the value of the gnome-mount command.

Comments, suggestions, corrections to rpjday@crashcourse.ca.

Return to Fedora_Cookbook.

Personal tools