The magazine of the Melbourne PC User Group
Creating an ISO image with Knoppix
Major Keary |
|
A
reliable method of making a
copy of a CD is by way of an
.ISO image, which is a single file that contains the necessary components of the
source CD and unpacks and writes them — in their correct order — to a target CD.
Commercial CD/DVD burning applications create their own respective proprietary
formats, but most (if not all) recognise .ISO image files. Nero provides a
lessthan-intuitive write-to-image facility that produces an .NRG file, but it
will burn from .ISO image files.
Linux has a simple way of creating an ISO image and which is available on
Knoppix. There are a few preliminaries that you need to know about if using
Knoppix.
First, where to put the image file; by default Knoppix will write files to the
ramdisk that is created at start-up, which means that you lose data at shut-down
unless it can be moved to a physical location such as a hard disk or USB storage
device. The default Knoppix environment treats a system's hard drives and USB devices as read-only, so you have to find a way around
that by changing permissions.
It is not difficult, and once the technique has been mastered the whole process
of writing and saving an ISO image can be quick and reliable.
When Knoppix is fired up its desktop shows (figure 1) the system's various
drives and partitions. The designations used may vary and this illustration of a
Knoppix desktop reflects a system on which two CD/DVD drives are primary master
and primary slave respectively and designated hda and hdb (but don't show up as
such on the desktop). SCSI and USB storage devices are identified as sda, sdb,
and so on. Hard drives are less easy to identify; on the system illustrated the
Windows drive C: is designated as hde1 , and the following partitions on that
disk jump to hde5, hde6, and so on. The drive that Windows would identify as D
is hdf1 and any further partitions begin at hdf5. There is a
logic behind that — it is not simply the inscrutable face of Linux — but there
is not room to explore it here.
|

Figure 1 |

Figure 2 |
A simple way to work out which partition is which is to create an empty
directory ('folder in Windows-speak) in each partition. Starting with C drive
create a directory, AAA_C, or with as many As as necessary to ensure it is
listed at the top of the directory tree. Similar empty directories (AAA_D, etc.)
are used to identify the other disks/partitions. When looking at the contents of
hdfl it is easy to confirm it is, for argument's sake, the Windows D drive. It
may be crude, but is an effective navigational aid and is illustrated in figure
2.
To save an ISO file to, for example, D drive it is necessary to enable the write
permission. Assuming the partition you want to use is hdf1, right click on the
hdf1 icon and a drop-down menu appears as shown
in figure 3. From the list select 'mount'. Get the menu back by right-clicking
again and select 'change read/write mode'. A dialog box will appear (figure 4)
asking for confirmation; check `ok'. You can now write directly to hdfl .
Place the target CD in a drive (don't try to use the one with the Knoppix disk).
A dialog box will appear on the screen; just click on 'do nothing'. The CD drive
is now mounted. Make a note of its designation (hd?). For the purpose of the
exercise let us assume it is hdb.
|

Figure 3 |

Figure 4 |
The next step is to call up the console ("Konsole" in Knoppix) by clicking on
the monitor icon at the bottom of the screen display (figure 2). This is the
command-line interface.
The first step is to change directory: assuming
you want to save the ISO file to hdf1, type:
cd /media/hdf1
press the return key and the prompt line should show you are in hdf1.
Figure 5
shows the console screen with the change of directory, the command 'ls'
(displays the directory), and the input described below.
Now enter (on one line):
dd if=/dev/hdb of='targetcd.iso'
where "targetcd" is replaced by the name of the file to which the
ISO image is to be saved. Press return.
|

Figure 5 |
There will be no feed-back by way of progress meters, but after a short time the
command-line will report that the task has been completed and the new file will
appear in the directory listing. The single quotes are not necessary in this
instance, but provide a belt-and-braces safeguard in case the file name contains
some special character(s).
That may seem complicated and convoluted, but once you have done it a couple of
times the process is simple
and fast. Just remember that, under Knoppix, to do anything but read files
requires the partition or device to be mounted and the read/write mode to be
enabled. You can drag-and-drop in Knoppix provided write permissions have been
set, such as in the manner described.
While Knoppix, in common with other Linux desktop distros, can burn CDs from ISO
images, the procedure described is particularly useful for creating portable
image files that can be burned to CD on any other platform.
Reprinted from the September 2007 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|