Travel Solo But Never Alone
Find the right memory at MemorySuppliers.com!

Create CDs from a DVD with jigdoCreate CDs from a DVD with jigdo

Posted March 11th, 2008 in Linux/Unix/BSD

jigdo allows you to create new ISO images from a jigdo file and template file, and files from your local filesystem, a CD/DVD and/or from remote sources. If you have a DVD image for the current release of Debian, for example, you can then create CD images from this using jigdo without having to download anything other than the jigdo and template files. This can be useful if you already have a DVD or DVD ISO image and need to install Debian onto a machine that only has a CD-ROM.

I posted about how to use jigdo-lite a couple of weeks ago, so you can refer to that article for more about what jigdo is and other ways of using jigdo-lite.

Mount the DVD

In this example. I will use jigdo-lite to create the debian-40r3-i386-CD-1.iso ISO image from the Debian 4.0r3 i386 DVD #1. The only files that need to be downloaded are the jigdo and template file for the CD image. First we need to mount the DVD.

If you are using the physical media then all you should need to do is put the DVD into your DVD drive and with most Linux distributions it will mount automatically at some mount point at either /media or /mnt . If it doesn't mount automatically then you'll need to do it yourself. For example:

mount /dev/cdrom /mnt/cdrom

If you have the DVD ISO image on your filesystem and want to mount that instead, at eg /mnt/cdrom, then you would do this:

mount -o loop debian-40r3-i386-DVD-1.iso /mnt/cdrom

Use jigdo-lite

The next step is to run "jigdo-lite" from the command line. The output will look something like this:

Jigsaw Download "lite"
Copyright (C) 2001-2005  |  jigdo@
Richard Atterer          |  atterer.net
Loading settings from `/root/.jigdo-lite'

-----------------------------------------------------------------
To resume a half-finished download, enter name of .jigdo file.
To start a new download, enter URL of .jigdo file.
You can also enter several URLs/filenames, separated with spaces,
or enumerate in {}, e.g. `http://server/cd-{1_NONUS,2,3}.jigdo'
jigdo []: 

Enter the full path to the jigdo file for CD #1 (eg ftp://mirror.pacific.net.au/debian-cd/4.0_r3/i386/jigdo-cd/debian-40r3-i386-CD-1.jigdo) and then press <enter>. jigdo-lite will then download the jigdo file and tell you this:

-----------------------------------------------------------------
Images offered by `ftp://mirror.pacific.net.au/debian-cd/4.0_r3/i386/jigdo-cd/debian-40r3-i386-CD-1.jigdo':
  1: 'Debian GNU/Linux 4.0 r3 "Etch" - Official i386 CD Binary-1 20080217-11:50 (20080217)' (debian-40r3-i386-CD-1.iso)

Further information about `debian-40r3-i386-CD-1.iso':
Generated on Sun, 17 Feb 2008 13:03:46 +0100

-----------------------------------------------------------------
If you already have a previous version of the CD you are
downloading, jigdo can re-use files on the old CD that are also
present in the new image, and you do not need to download them
again. Mount the old CD ROM and enter the path it is mounted under
(e.g. `/mnt/cdrom').
Alternatively, just press enter if you want to start downloading
the remaining files.

You can also enter a single digit from the list below to
select the respective entry for scanning:
  1: /mnt/cdrom
Files to scan: 

Here you would enter e.g. /mnt/cdrom, or whatever the path is to where you mounted the DVD or DVD image. If you've run jigdo-lite before, it will list the previous places it scanned files from and you can just enter the number instead. In the above example you could enter "1" instead of typing in /mnt/cdrom. Once you've entered your text hit <enter> and away it will go.

Downloading .template file
--16:46:52--  ftp://mirror.pacific.net.au/debian-cd/4.0_r3/i386/jigdo-cd/debian-40r3-i386-CD-1.template
           => `debian-40r3-i386-CD-1.template'
Resolving mirror.pacific.net.au... 61.8.0.17
Connecting to mirror.pacific.net.au|61.8.0.17|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /debian-cd/4.0_r3/i386/jigdo-cd ... done.
==> PASV ... done.    ==> RETR debian-40r3-i386-CD-1.template ... done.
Length: 26,403,358 (25M) (unauthoritative)

100%[==================================================>] 26,403,358   369.68K/s    ETA 00:00

16:48:35 (255.42 KB/s) - `debian-40r3-i386-CD-1.template' saved [26403358]

At this point it scans the files at /mnt/cdrom, and then continues:

Found 1096 of the 1096 files required by the template
Successfully created `debian-40r3-i386-CD-1.iso'

-----------------------------------------------------------------
Finished!
The fact that you got this far is a strong indication that `debian-40r3-i386-CD-1.iso'
was generated correctly. I will perform an additional, final check,
which you can interrupt safely with Ctrl-C if you do not want to wait.

OK: Checksums match, image is good!

Because it found all the files it needed on the DVD, it doesn't prompt you for any other locations. You should be able to generate CDs 1 through 6 from the first DVD. The 7th CD will probably need more files which you can either get from the 2nd DVD or via FTP. In would normally only be a few files so you'll still save heaps of bandwidth.

Summary

Using jigdo-lite you can create CD images from a DVD and save yourself time and bandwidth.

It is also possible to do it the other way around and make a DVD image from several CDs, you'd just need to mount all of them first and would need them as ISO files instead of actual media.