# Basic Physics of Nuclear Medicine/MRI & Nuclear Medicine

This is a developing chapter of a wikibook entitled Basic Physics of
Nuclear Medicine.

Magnetic resonance imaging (**MRI**) is widely used to provide
colocalization information for correlative applications with nuclear
medicine images. An introduction to this imaging method is provided in
this chapter. We\'ll consider fundamental features to a depth sufficient
to describe the contrast and spatial characteristics of MR image data so
that spatial correspondence features with nuclear medicine data can be
appreciated. Since MRI is such a vast field, we\'ll limit our treatment
to a description of essential features only and you should refer to the
Bibliography
for more comprehensive accounts.

We\'ll start with an overview of the imaging process and then describe
magnetic resonance features of the simplest atomic nucleus known, i.e.
^1^H. From there we\'ll describe phenomena which generate contrast in MR
images and finish with a description of image formation using spatial
encoding techniques.

## MR Imaging Process

In principle, MRI is quite a simple imaging technique, as illustrated in
the animated graphic below. A patient is first of all placed inside a
large magnet -- the poles of which are indicated by the N and S boxes in
the figure. Radio waves are then used to excite the nuclei of hydrogen
atoms within the patient\'s body using an external coil and these are
subsequently re-emitted by the patient in a manner which is
characteristic of the NMR properties of the tissues involved. These
radio waves are detected using an external coil, digitized, processed by
a computer and displayed as tomographic slices revealing the
distribution of different tissues.

```{=html}
<div class="center">
```
  ----------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  !Illustration of the MR imaging process.   !`<small>`{=html}Representation of the water molecule with the oxygen atom in blue and the two hydrogen atoms in red. The human body contains a substantial amount of water and therefore has a large number of hydrogen nuclei distributed throughout its volume to generate NMR signals for imaging purposes.`</small>`{=html}

  ----------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

```{=html}
</div>
```
The imaging process is a bit more complex in practice, as indicated in
the following figure:

```{=html}
<div class="center">
```
  -------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  !Flow diagram for the MR imaging process.   !Illustration of the principal components of MRI scanner. Tx and Rx refer to RF transmitter and receiver circuitry, respectively. The gradient coils are used to establish gradients in the magnetic field generated by the magnet.

  -------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

```{=html}
</div>
```
The complexity arises from the use of gradient magnetic fields and
sophisticated radio wave excitations so as to provide spatial
localization information for the subsequent detection phase, and to
isolate a particular NMR characteristic of interest. One powerful
feature of MRI is that the method can generate images depicting a number
of different contrast characteristics. Three such image types are shown
as examples below:

!Three types of MR image: the T1 weighted image depicts relatively
bright grey matter and dark CSF; the T2 weighted image highlights the
CSF, while the PD weighted image shows little contrast between
tissues.

The physics behind the production of these types of images is briefly
described in this chapter. We\'ll start with some insights into the
nature of nucleons which we have not considered previously in this
wikibook.

#top

## Nuclear Spin

Our earlier
consideration
of the atomic nucleus concentrated on its composition in terms of the
mass, electrical charge and the relative number of its neutrons and
protons -- the intention being to introduce the phenomenon of
radioactivity. We neglected to mention, for the sake of simplicity, that
nucleons can be considered to spin in space around a central axis.
We\'ll now concentrate on this spinning characteristic in order to
introduce the phenomenon of nuclear magnetic
resonance (**NMR**), and
we\'ll see later how images can be formed on this basis.

Let\'s take an isolated proton as an example -- see the following
figure:

!A spinning proton produces a magnetic field similar to a bar
magnet.

Besides having an electrical charge, the proton also spins on its axis.
Since this spinning constitutes a moving electrical charge (i.e.
rotating around a central axis), a magnetic field is generated, as
illustrated, similar to that generated by a bar magnet -- but on a much
smaller scale, of course. This spinning magnet aligns itself with any
external magnetic field.

There\'s an additional feature to this rotation, however, called
`<b>`{=html}precession`</b>`{=html}, which
can be seen in many rotating objects, as illustrated by the spinning
gyroscope below:

!The precession of a
gyroscope.

The rate of proton precession is what\'s important in NMR and has an
angular frequency referred to as the
Larmor frequency. Its specified by the
gyromagnetic ratio of the nucleus in
question and for hydrogen it has a value of 2.68x10^8^ rad/s/T. This
ratio implies a rate of 42.58 million precessions per second when a
hydrogen nucleus is placed in a magnetic field of strength 1
Tesla "wikilink"), i.e. rather higher than that for the
precession shown in the animation above!

The following equation is of relevance here:

```{=html}
<div class="center">
```
`<span style="color:green;">`{=html}`<big>`{=html}f = γ
B~o~`</big>`{=html}`</span>`{=html}

```{=html}
</div>
```
where `<span style="color:green;">`{=html}f`</span>`{=html} is the
precessional frequency,
`<span style="color:green;">`{=html}γ`</span>`{=html} is the
gyromagnetic ratio and
`<span style="color:green;">`{=html}B~o~`</span>`{=html} is the strength
of the magnetic field. This is a very important relationship in NMR and
is exploited in numerous ways in MRI, as you will see below.

Clinical MRI scanners typically use field strengths between 0.1 and 3 T
depending on the application. The strength of the earth\'s magnetic
field in comparison is about 50
μT, i.e. about 2,000 to 60,000 times smaller, while that of a magnetic
door lock is about 0.1 T.

We\'ve just considered the situation for an isolated proton in a
magnetic field. An interesting phenomenon occurs when many billions of
protons, in a sample of tissue for example, are placed in a magnet:

:

    :   `<span style="color:blue;">`{=html}some of the protons line up
        in parallel with the field and some line up against
        it.`</span>`{=html}

These two states are referred to as **parallel** and **anti-parallel**
states, as illustrated in the following figure:

!The protons align themselves either parallel or anti-parallel to an
external magnetic field, B~o~. The anti-parallel state is slightly lower
in energy than the parallel state. Transitions from the lower energy to
the higher energy state can occur if an exact amount of energy ΔE is
supplied.

The above figure also indicates that the two alignments are equivalent
to two quantum energy states separated by an energy difference, ΔE. More
nuclei occupy the lower energy than the higher energy state, but their
excess is incredibly small -- less than 0.001%. Its enough, however, to
exploit in NMR!

This energy difference is directly related to the precessional frequency
through the following equation:

```{=html}
<div class="center">
```
`<span style="color:green;">`{=html}`<big>`{=html}ΔE = h
f`</big>`{=html}`</span>`{=html}

```{=html}
</div>
```
where `<span style="color:green;">`{=html}h`</span>`{=html} is Planck\'s
Constant and `<span style="color:green;">`{=html}f`</span>`{=html} is
the precessional frequency, related to the Larmor frequency,
`<span style="color:green;">`{=html}ω`</span>`{=html}, through:

```{=html}
<div class="center">
```
`<span style="color:green;">`{=html}`<big>`{=html}ω = 2 π
f`</big>`{=html}`</span>`{=html}

```{=html}
</div>
```
The important point here is that:

:

    :   `<span style="color:blue;">`{=html}transitions from the parallel
        to the anti-parallel state can be induced in the sample when it
        is excited with electromagnetic radiation of energy,
        ΔE.`</span>`{=html}

This energy is about 1.75x10^-7^ eV for a proton in a 1 T field, i.e. a
tiny amount of energy compared with electron binding energies, for
instance. Compared to a 140 keV gamma-ray emitted by ^99m^Tc, its energy
is over a million, million times smaller.

The energy difference is equivalent to the energy of electromagnetic
radiation in the radio frequency
(**RF**) region of the electromagnetic
spectrum, as illustrated below:

!The electromagnetic spectrum indicating regions exploited in nuclear
medicine, radiology and
MRI.

So, if we had a tissue sample placed in a magnetic field of 1 T and we
beamed in radio waves at 42.58 MHz, we can expect to excite protons from
the parallel to the anti-parallel state. This phenomenon is the
`<b>`{=html}*resonance*`</b>`{=html} feature of NMR.

Its what happens following excitation that\'s exploited in MRI:

:

    :   `<span style="color:blue;">`{=html}transitions back to the
        parallel state occur spontaneously over a time period which is
        characteristic of individual tissues and their various
        pathological conditions.`</span>`{=html}

These transitions cause electromagnetic radiation to be emitted from our
tissue sample whose amplitude decreases with time. The detected
emissions form what is called a Free Induction
Decay, as illustrated below:

!A free induction decay characterized by a time constant,
T2\*.

Its the time constant of signal decays
such as these which is determined in MRI and which can be encoded into
MR images -- once we\'ve figured out where within the patient the
signals have originated from.

#top

## Magnetic Sum Vector

Its useful before proceeding to consider the situation from a magnetic
vector perspective, as illustrated in the following figure:

!Illustration of the cancelling effect feature of parallel and
anti-parallel
vectors.

The figure shows the situation for a hypothetical tissue sample placed
in a magnetic field such that seven hydrogen nuclei are in the parallel
state and five are in the anti-parallel state. Five of the parallel
vectors cancel the effects of the five anti-parallel vectors and we\'re
left with a net condition of two parallel vectors. We can simplify the
situation further by considering the summation of these two
vectors to give us a magnetic sum vector along
the Z-axis, as illustrated in the following diagram:

!Illustration of the magnetic sum vector,
M~z~.

Since the magnetic field direction is generally along the Z-axis in MRI,
our magnetic sum vector is referred to as **Longitudinal
Magnetization**. As a result, a longitudinal magnetization becomes
established when a patient is placed inside the magnet of an MRI
scanner.

#top

## RF Excitation

Let\'s consider the situation once longitudinal magnetization has become
established and when a pulse of RF radiation at the resonant frequency
is beamed into our tissue sample, as illustrated in the following
diagram:

!Illustration of RF
excitation.

Two processes occur simultaneously during absorption of the radiant
energy:

:\***Reduction in M~z~**: Some of the protons resonate and move to the
anti-parallel state, resulting in a reduction in the longitudinal
magnetization, as illustrated below:

!Illustration of the reduction in M~z~ during RF
excitation.

:

    :   Notice that our initial situation with five protons aligned
        parallel, which gives rise to a longitudinal magnetization,
        M~z~, of relatively large magnitude, changes to one where three
        are left with this alignment and two with the anti-parallel
        alignment. The magnitude of M~z~ is reduced as a result.

:\***Phase Coherence**: the vectors align with each other in phase, as
illustrated below:

!Illustration of the establishment of transverse
magnetization.

:

    :   The outcome of phase coherence is the establishment of a
        magnetic sum vector in the X-Y plane, called the **Transverse
        Magnetization**.

So, once longitudinal magnetization is established by placing a patient
in the magnet of an MRI scanner and radio waves at the resonant
frequency are generated, we in effect establish a transverse
magnetization while reducing the longitudinal magnetization. Its what
happens next to these two magnetic sum vectors, M~z~ and M~xy~, that\'s
of interest in MRI.

#top

## RF Emission

We can consider the emission phase of the MR imaging process from both
the longitudinal as well as the transverse magnetization perspectives.
Since the protons in our tissue sample have been excited by the
absorption of RF energy at the resonant frequency, the emission phase
corresponds with what is called **relaxation** as protons return to
their lower energy state.

-   **Longitudinal Relaxation**

:

    :   The situation following excitation is illustrated in the top
        left panel of the following figure:

!Illustration of longitudinal
relaxation.

:

    :   A hypothetical situation is shown where four protons are aligned
        parallel to the external magnetic field, and four excited
        protons are aligned anti-parallel. The magnetic sum vector is
        zero at this stage. Excited protons then return progressively to
        their lower energy state, as shown by the other panels in the
        above figure. The result is a re-establishment of the
        longitudinal magnetization, M~z~, as illustrated in the
        following figure:

!A T1 curve.

:

    :   It is seen in this figure that the longitudinal magnetization
        becomes re-established in an exponential manner characterized by
        a time constant, called **T1**.

-   **Transverse Relaxation**

:

    :   The situation following excitation is illustrated in the top
        left panel of the following figure, with phase coherence taken
        into account. As a result, a transverse magnetization, M~xy~
        becomes established:

!Illustration of transverse
relaxation.

:

    :   A hypothetical situation is illustrated where three protons are
        aligned parallel and three anti-parallel, in phase coherence wih
        each other. The other panels in the figure illustrate a
        progressive loss of coherence that is characterized by this form
        of relaxation, where the transverse magnetization decreases to
        zero, as shown in the following figure:

!A T2\* curve.

:

    :   It is seen in this figure that the transverse magnetization
        decreases in an exponential manner characterized by a time
        constant, called **T2\*** -- also called *T2 Star*.

In case you\'re wondering about phase coherence at this stage, a good
analogy to think of is that of analogue time clocks in different parts
of the world. You may have seen such clocks on international TV news
programmes showing the time in different parts of the world or in
foreign exchange banks, for instance. Dublin, Sydney, New York and
Mumbai, for example, all have clocks which take 60 minutes for one
revolution of the big pointer. Their frequencies are identical, in other
words. But they each show times separated by several hours because of
their geographic location and daylight saving factors. We can conclude
that these clocks are out of phase with each other, even though their
frequencies are the same. However, all clocks located in Sydney, for
example, would have the same phase and we can say that they are in
*phase coherence*. In a similar manner, phase coherence of proton
precessions results during RF excitation in NMR and its the loss of this
coherence which happens in transverse relaxation.

So, what do these two time constants, T1 and T2\*, mean in terms of our
tissue sample?

The protons which generate NMR signals are primarily those in cellular
fluids and lipids, i.e. nuclei of hydrogen atoms that are relatively
free to move within their environment. Hydrogen protons in tightly-bound
environments such as within proteins or DNA, however, usually do not
contribute to NMR signals and the same situation exists for those in
solid structures such as bone.

We can first of all consider a water molecule moving through its
environment within our tissue sample as a result of local chemical and
physical forces. The magnetic properties of its two hydrogen protons
generate a small magnetic field of about 1 mT and the molecule\'s motion
is therefore also influenced by the magnetic properties of other water
molecules in its vicinity -- and it in turn influences their motion.
When excited protons are involved following RF excitation, it is
interactions with their local environment which cause them to loose
their excess energy and return to the lower energy state with the
emission of RF radiation. This can be considered to be the origin of the
re-establishment of longitudinal magnetization during relaxation.
Chemistry calls this phenomenon **spin-lattice relaxation** -- *spin*
referring to the spinning proton and *lattice* to its local environment.

The rate at which molecules can move within their environment is related
to their size and hence small molecules have a low probability for
interaction. This is why fluids such as CSF have long T1 values, for
instance -- see the table below. Medium-sized molecules (e.g. lipids),
in contrast, move more slowly, have a greater probability for
interaction as a result, and exhibit relatively short T1 values.

The T2\* phenomenon results from the compounding effect of imperfections
in the external magnetic field and from so-called **spin-spin**
interactions. These latter are interactions where two nearby protons can
cause each other to flip so that one changes from anti-parallel to
parallel alignment, while the other changes from parallel to
anti-parallel, i.e. one gains the excitation energy from the other.
Phase coherence with other excited protons is lost during this exchange
and the end result is a relaxation of the transverse magnetization. This
spin-spin interaction is also called T2 relaxation. It tends to happen
much more rapidly than T1 relaxation and T2 values are therefore
generally less than T1 values, as shown in the following table:

+--------------+----------------------+----------------------+
| Tissue       | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | **T1 (ms)**          | **T2 (ms)**          |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+==============+======================+======================+
| Muscle       | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 870                  | 47                   |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| Liver        | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 490                  | 43                   |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| Kidney       | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 650                  | 58                   |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| Grey Matter  | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 920                  | 100                  |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| White Matter | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 790                  | 92                   |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| Lung         | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 830                  | 80                   |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+
| CSF          | ```{=html}           | ```{=html}           |
|              | <div class="center"> | <div class="center"> |
|              | ```                  | ```                  |
|              | 2,400                | 160                  |
|              |                      |                      |
|              | ```{=html}           | ```{=html}           |
|              | </div>               | </div>               |
|              | ```                  | ```                  |
+--------------+----------------------+----------------------+

: `<small>`{=html}T1 and T2 values at 1.5 Tesla.`</small>`{=html}

Since T2 arises mainly from neighbouring protons, a higher interaction
probability exists with larger than with smaller molecules.
Macromolecular environments will therefore display shorter T2 values
than water-based fluids, e.g. CSF.

A final point to note is that both T1 and T2 measurements from a small
volume of tissue result from the integrated motional effects of all
molecular species which contain hydrogen protons in that volume, be they
those of small molecules, lipids or macromolecules.

#top

## Inversion Recovery

A practical problem arises when we try to measure T1 because M~z~ exists
within the Z-axis of the patient. If we could flip the longitudinal
magnetization vector into the XY plane, then T1 could be measured using
external coils. This is what the Inversion Recovery imaging technique is
designed to do.

It involves a two stage excitation process, where an RF pulse of
sufficient duration to excite all the lower energy protons is applied
initially and this is followed by a second RF pulse after a time
interval of duration sufficient for similar numbers of protons to exist
in the two alignments. The first stage is illustrated in the following
figure:

!Illustration of the application of a 180^o^ RF
pulse.

The RF pulse in this case is referred to as a 180^o^ pulse since the
longitudinal magnetization, M~z~, has been inverted during the
excitation process.

Then a short time interval is used to allow some longitudinal relaxation
to occur, as illustrated in the following figure:

!Recovery of M~z~ following a 180^o^ RF pulse in cases where T1 is long
(left panel) and short (right
panel). and short (right panel).")

Notice that M~z~ recovers relatively slowly when the T1 of the tissue in
question is relatively long, and that it recovers quite quickly when T1
is short. We can conclude that the extent of the recovery is related to
T1.

A 90^o^ RF pulse is then used to move M~z~ into the XY plane so that its
amplitude can be measured, as shown in the next figure:

!The recovered M~z~ is moved onto the XY plane using a 90^o^ RF
pulse.

The sequence of RF pulses is shown in the left panel of the figure
below, separated by the time interval, TI, and the resultant Free
Induction Decay (FID) is shown below it. The amplitude of the FID is
dependent on the relative values of T1 and the time interval, TI. For
instance, when the time interval is less than T1, the longitudinal
magnetization can still be negative when the 90^o^ is applied -- as we
saw in an earlier figure. At the other extreme, when the time interval
is much greater than T1, the longitudinal magnetization has sufficient
time to fully recover and the amplitude of the FID is dependent
primarily on the **proton density**.

The figure in the right panel below shows the dependence of the
longitudinal magnetization measured from the FIDs of grey matter and CSF
against the time interval, TI. It is seen that both substances generate
a negative value of M~z~ when the time interval is short, as we might
expect. It is also seen that M~z~ increases in each case when the time
interval is increased and a region is reached where the values are
strongly dependent on T1. It is further seen that a large difference can
exist between the measured values for our two substances in this region.
This feature gives rise to the generation of contrast between these two
substances in T1-weighted images. Typically a time interval of 400 ms is
used for such tissue discrimination.

!The inversion recovery pulse sequence and resultant FID (left) and the
dependence of M~z~ on the time interval, TI
(right). and the dependence of Mz on the time interval, TI (right).")

A final point to note is the proton density-weighting that results when
long time intervals are used, with little tissue discrimination.
Typically an interval of 700 ms is used for such studies.

There are numerous other pulse sequences used besides Inversion Recovery
in MRI. These include:

:\*Spin Echo

:\*Saturation Recovery

:\*Short TI IR (STIR)

:\*Echo Planar Imaging

:\*Small Angle Gradient Echo (SAGE).

The Spin Echo sequence, for instance, can be used to generate a
T2-weighting in images. You\'ll remember from earlier that an FID decays
exponentially with a time constant, T2\*. This parameter results from
the combined effect of two phenomena:

:\*static and oscillating magnetic fields induced by neighbouring
protons (and unpaired
electrons!) which we\'ve
discussed earlier and which generate the T2 information;

:\*small imperfections in the primary magnetic field, B~o~, which are
referred to as field inhomogeneities, and generate a time constant,
T~inh~.

These two time constants can be considered to add, such that:

```{=html}
<div class="center">
```
$\frac{1}{T2^*} = \frac{1}{T2} + \frac{1}{T_{inh}}$

```{=html}
</div>
```
and the function of the Spin Echo pulse sequence is to disentangle this
relationship to extract the T2 information. Note that this pulse
sequence can also be used to generate images with a T1 or a proton
density weighting depending on various time intervals used in its pulse
sequence.

The further treatment of Spin Echo and other pulse sequences is beyond
the introductory level of this chapter and you are referred to the
Bibliography
for additional learning resources. However, you\'re likely to find that
the treatment above will provide a sufficient foundation for developing
your understanding of these other pulse sequences.

You might also like to check out the superb e-MRI online learning
resource

#top

## Spatial Localization of NMR Signals

Since we\'ve seen above how contrast between tissues can be generated in
MRI we\'re now in a position to consider how images are formed. In other
words, we\'ll consider how to localize the origin of the FIDs generated
within the patient following RF excitation.

Its helpful to consider an analogy at this stage because this imaging
situation is distinctly different to that encountered in nuclear
medicine, radiography or sonography where the radiation travels in
straight lines and imaging techniques based on emission, transmission
and reflection can be readily conceptualized. Its a little bit more
difficult in MRI because the radiation is emitted in all directions
simultaneously, so that there\'s little or no chance in knowing its
origin from an FID measurement. In other words, the FID only allows the
amplitude, frequency and phase of the radio waves to be measured.

!A grand piano with a keyboard and scales
overlaid.{width="128"}

The analogy we\'ll use is that of a piano keyboard
and the playing thereof. Let\'s imagine a concert pianist, for instance,
on stage and playing the keyboard of a grand piano. Notice that the
pianist\'s fingers hit keys to the left of the keyboard in order to
produce a relatively low frequency (i.e. low pitch) sound, keys on the
right for high frequency notes and keys in the middle for intermediate
frequencies. So, besides hearing the music produced while the pianist
plays, we also receive information about where in space the pianist\'s
fingers were located at any individual moment. In technical jargon we
can say that we are using a method of spatial localization through
frequency discrimination of audio signals to determine locations along
the piano\'s keyboard. This same approach can be applied in MRI using
frequency discrimination techniques for the spatial localization of
radio signals.

The 3D situation is of course a bit more complex than the 1D piano
keyboard, but the principle is basically the same. Frequency
discrimination can be achieved by arranging for RF emissions from the
patient to have slightly different frequencies depending on their
origin. Furthermore, phase discrimination can also be applied so that
the phase of the RF emissions can be related to locations within the
patient. The fidelity of the frequency and phase discrimination should
of course be sufficient so that the corresponding voxels within the
patient are sufficiently small enough for clinically-useful views of the
anatomy to be generated. Afterall, the fidelity of our frequency
discrimination in the case of a piano keyboard is limited at an extreme
by the width of the keys!

The magnetic field of the magnet in an MRI scanner is therefore
supplemented by small fields introduced using gradient coils so that a
linear gradient, for instance, in the field can be established. With
such a gradient applied along the patient\'s Z-axis, we can expect the
resonant frequency of hydrogen protons to be different for planes along
this axis, as illustrated in the following figure:

!Illustration of the application of a linear gradient (in blue) in the
magnetic field along a patient\'s Z-axis so that the resonant frequency
can be related to planes along this
axis. in the magnetic field along a patient's Z-axis so that the resonant frequency can be related to planes along this axis.")

Should we wish to excite a single slice along this axis, for instance,
all we need to do is generate radio waves of the relevant frequency, as
dictated by our earlier equation:

```{=html}
<div class="center">
```
`<big>`{=html}`<span style="color:green;">`{=html}f = γ
B~o~`</span>`{=html}.`</big>`{=html}

```{=html}
</div>
```
This approach is called **slice selective excitation**. Both the
strength of the gradient field and the
bandwidth of the RF pulse produced by the
transmitter can influence the thickness of the selected slice as
indicated in the following figure:

!Effect of gradient field (left) and bandwidth (right) on slice
thickness. and bandwidth (right) on slice thickness.")

We can see in the left panel above that increasing the gradient in the
magnetic field from G~a~ to G~b~, for instance, decreases the slice
thickness, ΔZ, when the bandwidth, Δf, is kept constant. In comparison,
we can see in the right panel that increasing the bandwidth of the RF
pulse generated by the transmitter circuitry, from Δf~a~ to Δf~b~ for
instance, increases the slice thickness.

It is important to note that the slice selection gradient is applied
during the application of the RF excitation pulses. The protons in any
given plane can then be made to resonate by changing the RF pulse centre
frequency, f~o~, during the scan.

The G~z~ gradient and the RF bandwidth control the slice thickness and
position in this manner. Note that although the slice selection gradient
has been described here in terms of the Z-axis, there is no reason in
principle why any other directions cannot be chosen for the application
of the gradient. The slice selection is therefore not governed by
mechanical considerations, as is the case in X-ray CT, SPECT and PET.

One method of tomographic imaging based on this approach is considered
next. Let\'s assume for simplicity that our patient can be represented
by an elongated cube, as shown in the following figure:

!Illustration of slice selection during the RF excitation phase using a
longitudinal magnetic field
gradient.

Notice that our patient is placed in a magnet with a longitudinal
gradient in the field, as illustrated by the blue line. The field
strength is relatively low, as a result, towards the left of our cube
and relatively high towards the right. A central slice of the cube can
be excited when an RF pulse of the appropriate frequency is applied.
Suppose the selected slice contains two features which generate FIDs, as
indicated by the red and green objects.

The RF pulse is used to excite protons in this slice so that they all
precess at the same frequency. A transverse gradient in the magnetic
field is then applied during the emission phase, as illustrated in our
next figure, so that the field strength is low, for instance, to the
left of the selected slice and higher to the right of the slice.
Precessional frequencies will therefore increase, decrease or remain the
same depending on their horizontal location across the slice. The
emitted FIDs will therefore contain a range of frequencies which
represent this horizontal location.

!Illustration of the application of a transverse gradient during the RF
emission
phase.

The frequency content of the FIDs can be unscrambled by computing the
one-dimensional Fourier
transform,
as illustrated in the figure above, to derive the horizontal spatial
locations of the emitters. The resultant Fourier spectrum constitutes
one projection, somewhat similar to that acquired in X-ray computed
tomography. The subsequent steps are to generate projections at
different angles around the slice by repeating steps 1 and 2 in the
above figure using different transverse gradients. A series of
projections can then result which can be processed using Filtered Back
Projection
to form an image of the axial slice.

This method is rather slow for clinical application and numerous other
methods have been devised. We\'ve considered it here simply because its
a good exercise in integrating many of the features that you\'ve learnt
about in this chapter and because of its relative simplicity. Faster
image acquisition times can be generated using the so-called Spin Warp
method, for example. Here, a two-dimensional Fourier transform is
applied using repeated slice selective excitations along with
frequency-encoding gradients (as we\'ve just described) as well as
phase-encoding gradients during the emission phases.

#top

## Back to the Nucleus

There are many other features of MRI that are beyond the scope of this
chapter. Issues such as safety in magnetic environments are of vital
importance and features such as magnetic resonance
angiography (**MRA**),
magnetic resonance
spectroscopy
(**MRS**), Diffusion Tensor Imaging
(**DTI**), functional MRI (**fMRI**),
contrast media, image artefacts as well as magnet
design, shielding and siting are
fascinating to consider from a nuclear medicine perspective.

We\'ll conclude this chapter with an important basic feature which we
didn\'t consider earlier in the interests of clarity. This brings us
back to the nucleus and the topic of nuclear spin. You\'ll appreciate
that its not just the hydrogen proton that demonstrates the NMR
phenomenon and that it can occur, at the least, in situations where the
nucleus has an odd number of protons. In other words, situations where
there\'s an isolated proton which does not have a partner to pair with
magnetically in its nucleus.

There\'s actually three types of nucleus where nuclear spin is concerned
-- those with:

::\***Odd Mass Number**, i.e. nuclei with one unpaired nucleon;

::\***Even Mass Number & Even Atomic Number**, i.e. nuclei with no
unpaired nucleons;

::\***Even Mass Number & Odd Atomic Number**, i.e. nuclei with two or
more unpaired nucleons.

Examples of nuclei with a net nuclear spin are given in the following
table:

+----------------------+----------------------+----------------------+
| Nucleus              | ```{=html}           | ```{=html}           |
|                      | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | **Gyromagnetic       | **f~o~ at 1 Telsa    |
|                      | Ratio, γ             | (MHz)**              |
|                      | (10^6^rad/s/T)**     |                      |
|                      |                      | ```{=html}           |
|                      | ```{=html}           | </div>               |
|                      | </div>               | ```                  |
|                      | ```                  |                      |
+======================+======================+======================+
| ^1^H | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 268                  | 42.58                |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^2^H | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 41                   | 6.53                 |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^13^C | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 67                   | 10.66                |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^14^N | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 19                   | 3.02                 |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^19^F | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 253                  | 40.27                |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^23^Na | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 71                   | 11.3                 |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+
| ^31^P | <div class="center"> | <div class="center"> |
|                      | ```                  | ```                  |
|                      | 108                  | 17.19                |
|                      |                      |                      |
|                      | ```{=html}           | ```{=html}           |
|                      | </div>               | </div>               |
|                      | ```                  | ```                  |
+----------------------+----------------------+----------------------+

Only ^1^H has found application in routine medical imaging because of
the vast quantity of water in the human body.

#top


# Knowing Knoppix/Introducing Knoppix

## Introducing Knoppix

*"Knoppix is... so astoundingly useful it\'s nearly impossible to
overpraise" \-- slashdot.org*

### What is Knoppix?

#### Linux that runs from CD

Knoppix is an astonishingly clever product. It
is a single CD that runs Linux on your PC or laptop. It gives you a full
graphical desktop with networking, sound, the lot (subject to suitable
hardware). No installation is necessary.

Knoppix is excellent for demonstrations, system recovery, or just
testing how well the hardware in a given PC is supported. The Knoppix CD
is compressed. On-the-fly transparent decompression gives a remarkable
1,600 Mb of software on a single 700 Mb CD.

#### Can be installed on a Hard Disk or a USB key

You can **optionally** install Knoppix on your hard drive from the
Knoppix LiveCD. Type **knoppix-installer** in a root
console when using Knoppix.

For installation on a USB key see
<http://www.knoppix.net/wiki/USB_Based_FAQ>

#### How it works

Start the computer using the Knoppix CD. The existing software on the
hard disk will be bypassed. The hard disk may still be accessed
read-only. When you have finished using Knoppix, restart and take the CD
out. The regular operating system will run as normal.

#### Safe to run

Knoppix leaves your existing software untouched. In fact, Knoppix can
run on a computer with no hard disk at all! After running Knoppix,
simply take the CD out of the drive. The computer will behave as if
nothing has happened.

The general philosophy of Knoppix is to access disks in read-only mode
as much as possible. This is ideal for beginners, because it protects
against accidents.

#### Personal

Settings and personal files can be saved to a disk, such as a removable
USB hard drive stick. This lets you store a personalised Knoppix setup
and take it with you everywhere.

#### Free

Most amazing of all, Knoppix is free. The latest version is always
available from the Knoppix download page. Not only is Knoppix free as in
no charge, it is also free as in freedom. Subject to certain conditions,
you are entitled:

-   To make unlimited copies.
-   To use one copy on as many computers as you like.
-   To give unlimited copies to your friends.
-   To sell unlimited copies.
-   To customise it to suit yourself.
-   To redistribute your customised versions.

**`Web link`**\
`The Knoppix download page:`\
`http://knopper.net`

### What you can do with Knoppix

#### Learn Linux

This book is designed to help you run Linux for the very first time.
Knoppix is perfect for newcomers. Linux isn\'t going away any time soon.
That is why learning it is an investment in your time that will pay off
for years to come. This book is meant for people who are at least
reasonably familiar with computers. For example, I assume you know your
way around your computer\'s mouse, keyboard, CD drive, and so on.

#### Rescue and test

Knoppix is a wonderful tool for rescuing and testing PCs. I will provide
enough information to be useful, without going into mind-bending detail.
With Knoppix it is possible to:

-   Read files from Windows formatted hard disks, even when the
    operating system installed on the hard disk cannot be started
    (unless the hard disk has an unrecoverable data error, or if it is
    physically damaged).
-   Copy files onto other disks, such as removable USB drives, Zip
    drives, CD-RW blanks and network drives (given suitable hardware).
-   Identify hardware, even when Windows cannot identify it (subject to
    certain limitations).

#### Use and explore

Knoppix is a complete desktop system. Use it:

-   To print.
-   To play music.
-   To use a scanner or a digital camera.
-   To connect to the Internet.
-   To browse the Internet\'s World Wide Web.
-   To send and receive Internet email.
-   To try out the built-in office applications, graphics tools, sound
    playing, video playing, Internet applications and games.

#### Network

Knoppix is a child of the Internet. Knoppix does networking with its
eyes closed. For security reasons, Knoppix does not automatically run
any servers that could be accessed from the outside.

### Where Knoppix comes from

Knoppix was created in Germany by Klaus Knopper. Knoppix is a volunteer,
co-operative, community effort. It exists entirely on the Internet. At
the moment Knopper is the man who does most of the work on the disk. He
does get patches and some scripts from the community, but he is still
the most important person. The Knoppix project is hosted by LinuxTag,
which is based in Germany at the Technical University of Kaiserslautern.
The LinuxTag team runs conferences, workshops and exhibitions for
everyone interested in Linux and Free Software.

**`Web links`**\
`The home page of Klaus Knopper(in German):`\
`http://www.knopper.net/`\
`The home page of LinuxTag (in German):`\
`http://www.linuxtag.org/`

### Knoppix is Free Software

Knoppix is *Free Software*. It is licensed under the *GNU General Public
Licence (GPL)*. Free Software is not freeware, and not shareware. Free
Software means "free as in freedom", not necessarily price. This means
you are allowed to run, copy, distribute, study, change and improve
Knoppix at no charge.

The catch is that when you give (or sell) copies to other people, you
must give them the same freedoms under which you received it. This
limitation ensures that Knoppix is free now and will remain free
forever. For more details, see the license text at the end of this book.

**`Web link`**\
`The Free Software Definition: `\
`http://www.gnu.org/philosophy/free-sw.html`

### Limitations

#### No warranty

First and most important of all, Knoppix is experimental software. There
is no warranty. Use it at your own risk.

#### CD means slow

Compact Disc Read Only Memory (CD-ROM) drives are much slower than hard
disk drives. This means that some applications on the Knoppix CD may
take a long time to start; much longer than they would do on a full
permanent Linux system. However, Knoppix has some clever (optional)
tricks that can spectacularly speed things up.

Knoppix does not get very far on unreliable CD-ROM drives. Since
everything has to be loaded from CD, it falls over pretty quickly if
CD-ROM errors occur, or if the Knoppix CD itself is damaged. Knoppix has
built-in tools for testing its own media.

#### Not everything works

Knoppix supports a huge range of common PC hardware, but not everything.
Internal dial-up modems and external USB broadband modems tend not to
work. AOL and Compuserve are completely incompatible. Certain cheap
printers may be useless. Many cheap colour laser printers do not work.
Support for wireless (802.11b) network adapters is limited at best.
Certain types of multimedia audio and video files are unplayable. Most
commercial DVD movie discs cannot be played. In general, Knoppix does
not run Windows software.

#### RAM intensive

Knoppix works by loading everything into Random Access Memory (RAM). The
more RAM you have, the better. For typical performance, you need 128 Mb
of RAM.

If you are lucky enough to have 828 Mb of RAM or more, Knoppix has
clever tricks to make good use of all the RAM in your computer. This can
deliver blazingly fast performance.

If you have less than 128 Mb of RAM, Knoppix has the ability to use part
of the hard disk as if it were RAM. This is called creating a *swap
file*. However, this technique does not work on all hard disks, and
performance is much slower than real RAM.

**`Web link`**\
`LiveDistro Knoppix Resource`

### What is included in Knoppix?

Knoppix is a compilation of a huge number of works from around the
Internet. Some of the projects mentioned in this book are:

  Project                                         Home page
  ----------------------------------------------- ------------------------------------
  AbiWord word processor                          <http://www.abisource.com/>
  Audacity sound recorder                         <http://audacity.sourceforge.net/>
  Common Unix Printing System (CUPS)              <http://www.cups.org/>
  Debian distribution                             <http://www.debian.org/>
  Gnumeric spreadsheet                            <http://www.gnumeric.org/>
  The GNU Image Manipulation Program (The Gimp)   <http://www.gimp.org/>
  GNU utilities                                   <http://www.gnu.org/>
  The K Desktop Environment (KDE)                 <http://www.kde.org/>
  Linux kernel                                    <http://www.kernel.org/>
  Mozilla web browser                             <http://www.mozilla.org/>
  OpenOffice.org office suite                     <http://www.openoffice.org/>
  Samba file sharing server for Windows PCs       <http://www.samba.org/>
  Scanner Access Is Now Easy (SANE)               <http://www.sane-project.org/>
  Xine Media Player                               <http://xinehq.de/>
  X Multimedia System                             <http://www.xmms.org/>
  X Window System                                 <http://www.xfree86.org/>

Putting it all together is the work of the Debian
project. The result is called the Debian *distribution*. This means that
Knoppix is Debian modified to run on a self-contained CD.

### What is Linux?

Linux (pronounced \"lin-ucks\") is a free operating
system. An \"operating system\" is the
base software that makes a computer useful.

Strictly speaking, Linux is the *kernel*. The kernel is the core
component of the operating system. Think of an operating system as a
nut. The *shell* is the part that you use. The kernel is the core that
talks to the computer\'s hardware.

**`Note`**\
`There are many different Linux `*`distributions`*`.`\
`But there is only one current version of the ``Linux kernel``.`\
`Therefore, every distribution contains Linux.`

#### A little history

In the 1970s, computer *programs* were free. A program is a sequence of
instructions that makes a "calculating machine" do something useful. The
engineers who worked on these instructions became known as programmers.
They shared their know-how with each other. They found that it made
their work more pleasant.

Unfortunately, this co-operative spirit died under commercial pressures.
Restrictive practices in the fast-growing "software industry" meant that
sharing the most useful programs and some of the most vital technical
information became largely impossible.

A man named Richard Stallman was greatly frustrated by this change. He
wanted to bring back the spirit of the early days that he had known at
MIT (Massachusetts Institute of Technology). He knew that he had the
perfect skills to build a free operating system. He knew that if he
didn\'t do it, no-one would. So he decided to do it, or "die trying".

By the 1990s, Stallman\'s Free Software
Foundation had found or created
nearly all the components of a free operating system. He called his
creation "GNU\'s Not UNIX".

The name is a joke designed to poke fun at the alphabet soup of computer
acronyms. Some acronyms have other acronyms as part of their definition.
The GNU acronym takes this one stage further - it has its own acronym as
part of its definition. "Is Not" is a way of saying "is like" or "is
compatible with".

*UNIX* refers to a family of operating systems that were used mainly in
science, engineering and finance. Stallman chose to base his efforts on
UNIX because it was tried and tested. It would also be convenient for
other people to switch from UNIX to GNU.

##### How GNU grew

!Linux creator Linus
Torvalds.
In 1991, the GNU project still lacked a kernel, the vital core component
of an operating system. Luckily, a student in Finland called Linus
Torvalds created one "as a hobby".

In 1991, Torvalds produced a simple, basic system called "Freax". He
called it "Linux" privately but never meant it to be called that in
public, because he didn\'t want to be too egotistical. He made it free
because he wanted feedback. It was posted on the Internet by a friend.

Pretty soon, Torvalds began receiving email from places he\'d dreamed of
visiting, like Australia and the United States. Instead of cash, Linus
preferred postcards. His sister Sara was suddenly impressed that her
brother was somehow hearing from new friends far away.

Torvalds had used the Free Software Foundation\'s tools, so he decided
to make it free likewise. This was a way to say "thank you". He decided
to put Linux under the Free Software Foundation\'s *General Public
Licence*. This meant that anyone could use, improve or sell Linux, but
no-one could take overall control.

##### It\'s a GNU world!

From there, it snowballed in the most extraordinary way. It has
catapulted Torvalds to accidental super-stardom. He has appeared on the
cover of *Time* magazine. We should remember that Stallman started it
all. That is why the full title of Linux is *GNU/Linux*. In other words,
Knoppix is a Linux-based GNU system.

**`Web link`**\
`Overview and history of the GNU project: `\
`http://www.gnu.org/gnu/gnu-history.html`


# Knowing Knoppix/Knoppix for the first time

## Knoppix for the first time

*"The most important design issue\... is that Linux is supposed to be
fun." \-- Linus Torvalds*

### Overview

The purpose of this section is to get you started into Knoppix for the
very first time. This section skips nearly all of the options for
starting Knoppix. The options for starting Knoppix are explained later.

### Hardware requirements

The recommended hardware is as follows:

-   Pentium I 350 MHz processor (recommended minimum).
-   128 Mb RAM.
-   Either: IDE or SCSI bootable CD-ROM or DVD drive
-   Or: 3.5\" floppy drive plus non-bootable CD-ROM or DVD drive.
-   SVGA compatible graphics card (most cards supported).
-   Monitor capable of 800x600 pixel resolution.
-   Serial mouse, or PS/2 mouse, or USB mouse.

### Starting Knoppix

There are two stages to starting Knoppix:

#### The first stage

The first stage is to get to the *boot prompt*. The boot prompt lets you
customise the Knoppix startup process. For example, you can specify at
the boot prompt what screen resolution you want Knoppix to use. To reach
the boot prompt, you use either the CD/DVD or the floppy disk. What
about some instructions for use with USB???

#### The second stage

The second stage is to run Knoppix itself. This requires the CD/DVD.
Knoppix follows the instructions given at the boot prompt to complete
the startup process.

### The first stage

#### Getting to the boot prompt

To get to the boot prompt, follow these steps:

1.  If the computer is already on, insert the Knoppix CD/DVD. If the
    CD/DVD drive is set to *auto-run*, information explaining about
    Knoppix will appear. Restart the computer.
2.  If the computer is off, turn it on, then immediately insert the
    Knoppix CD/DVD. To play for time, press the Pause/Break key
    immediately after turning your computer on. On many PCs and laptops,
    this will pause the BIOS, giving you more time
    to insert the CD/DVD. Then press the Pause/Break key again to resume
    startup.
3.  Most newer computers will automatically check for a bootable CD/DVD
    in the first drive. The Knoppix boot prompt should then appear. The
    boot prompt is the last three lines at the
    bottom of the screen. If your computer can\'t display the white and
    blue Knoppix logo, you will get a blue background instead.\
4.  On some computers, you must press a key for the "boot device
    menu". The boot device menu is used
    to tell the computer which drive to boot from. A prompt saying which
    key will display the boot menu will appear on the screen just after
    you turn the computer on. For example, on some Dell desktop PCs,
    press F12 when prompted, press the Down Arrow key until "Boot from
    IDE-CDROM" is highlighted, then press Enter.
5.  At the boot prompt, press Enter to boot Knoppix accepting all the
    defaults (including the German keyboard/language.) If you do nothing
    for 60 seconds, Knoppix boots automatically. To boot Knoppix with
    another keyboard/language, see the section "Which language?" below.

**`Tip`**\
`If you have two CD/DVD drives, and one of them is a CD/DVD Re-Writable drive, `\
`put the Knoppix CD/DVD in the other drive.`\
`Keep your writable drive empty if you can.`\
`This will let you try out the CD/DVD writing features in Knoppix easily at a later time.`

#### Help at the boot prompt

Press F2 for the help screen. The help
screen is a summary of the boot prompt options. Pressing F2 or any other
key cancels the timer, so Knoppix will not automatically boot.

##### Quick help

**Question: How do I get out of the boot prompt?**\
Take the disc out of the drive, then restart your computer.

**Question: How do I use the boot floppy?**\
Turn off the computer. Insert the Knoppix boot floppy disk. Turn the
computer back on. The computer should boot from the floppy drive. Then
the Knoppix boot prompt should appear.

If that doesn\'t work, enter your computer\'s Basic In/Out System (BIOS)
setup. The key to press that takes you into the BIOS setup is usually
shown on the screen just after you turn the computer on. Visit the boot
priority screen (it may have another name
such as *boot device menu*). Set the BIOS to boot from the CD/DVD or
floppy drive before the hard disk drive. If unsure, check with your
motherboard or computer manufacturer.

**Question: The computer has two CD-ROM drives. Why does the Knoppix
disc boot in one drive but not the other?**\
Some BIOSes can only boot the *first* CD-ROM/DVD drive. To work around
the problem, start up from the Knoppix boot floppy disk. Then you can
put the Knoppix CD/DVD in either CD-ROM/DVD drive. If you are really
determined, switch the CD-ROM/DVD drive
order so the drive you want to boot from is
the first drive.

### The second stage

#### Starting Knoppix proper

To start Knoppix with the United Kingdom keyboard/language:

1.  Type this at the boot prompt:\
    `knoppix lang=uk`
2.  Press the Enter key on the keyboard.
3.  Knoppix will begin loading with the UK keyboard/language.

#### Which keyboard/language?

The most important option at the boot prompt is the
keyboard/language.
More correctly, the keyboard/language option sets the
locale. A locale is a collection of regional
settings including keyboard layout, language, time format, date format,
currency format and paper size. Some language translations may be
incomplete.

The locale options are named using the International Standards
Organisation two-letter country codes (ISO 3166 and ISO 639). The locale
options are:

  Code         Keyboard/language
  ------------ ----------------------
  de           German (default)
  be           Belgian
  bg           Bulgarian
  ch           Swiss
  cn           Simplified Chinese
  cs *or* cz   Czech
  dk *or* da   Dansk
  es           Spanish
  fi           Finnish (incomplete)
  fr           French
  he *or* il   Hebrew
  it           Italian
  jp           Japanese (limited)
  nl           Dutch
  pl           Polish
  ru           Russian
  sl           Slovenian
  tr           Turkish
  tw           Traditional Chinese
  uk           United Kingdom
  us           United States

#### Automatic hardware detection

Knoppix will then try to detect the various items of hardware in your
computer. How long it takes depends upon the speed of your machine. Here
are some examples to give you an idea of what to expect:

  Processor                   RAM      CD-ROM speed   Time needed
  --------------------------- -------- -------------- ------------------
  Intel Pentium 4 (2.6 GHz)   512 Mb   48x            40 seconds
  AMD Duron (1 GHz)           256 Mb   32x            45 seconds
  AMD Athlon (600 MHz)        128 Mb   24x            1 min 30 seconds

#### The X Window System

Next, it will briefly say "INIT: Entering runlevel 5" and then Knoppix
will try to start the X Window System.
The X Window System is the graphics display.

If you have a supported graphics card, you will see a black cross on a
grey stippled background. This means the X Window System started
successfully.

#### The K Desktop Environment

Knoppix will begin loading the *K Desktop Environment*. KDE runs on top
of the X Window System. The progress of loading KDE will be shown in the
middle of the screen. When KDE has finished loading, the welcome page
will be loaded.

When the welcome page appears, congratulations! You have started Linux,
the X Window System, and the K Desktop Environment successfully.

#### Quick help

**Question: Why does KDE come up in German?**\
You need to specify the
keyboard/language at
the boot prompt. For example, for the UK locale, enter `knoppix lang=uk`
at the boot prompt.

**Question: It says \'cloop: read error\', what does that mean?**\
There is a problem reading the Knoppix CD. You either have a faulty
CD-ROM drive or a damaged CD. To test the Knoppix CD, enter at the boot
prompt:

`knoppix testcd`

This will make Knoppix check the media for errors. If you know that the
Knoppix CD is good, this error usually means a faulty CD-ROM drive.

**Question: I get a blank screen when the X Window System comes up,
why?**\
Knoppix is trying to use a screen
resolution that your monitor doesn\'t
support. For example, Knoppix may have detected your graphics card is
capable of 1024x768 pixel resolution, but your monitor can\'t cope with
that. Try setting a lower resolution at the boot prompt. For example,
enter:

`knoppix lang=uk screen=800x600`

This will make Knoppix use a screen resolution of 800 by 600 pixels when
it starts the X Window System.

**Question: Why does the screen go blank when the kernel boots?**\
This problem usually occurs with low cost TFT (flat screen) monitors.
The kernel is using a *framebuffer* console, but the monitor is
incompatible with it. Turn off the *framebuffer console*. At the boot
prompt, use the option "*vga*=normal". For example, type:

`knoppix lang=uk vga=normal`

This will turn off the framebuffer console and the penguin logo.

**Question: Why doesn\'t the mouse work?**\
This could mean you are trying to use a PS/2 mouse in a 9-pin serial
port through a PS/2-to-serial adapter. Some PS/2 mice do not work when
plugged into a 9-pin serial port. Try a real serial mouse.

**Question: It says "Initrd extends beyond end of memory".**\
Your motherboard is reporting the RAM size incorrectly. Specify the
amount of physical RAM in your computer at the boot prompt. For example,
if you have 128 Mb of RAM, enter at the boot prompt:

`knoppix lang=uk mem=128M`

**Question: It says "Could not find the KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell."**\
Try booting with:

`knoppix ide2=0x180 nopcmcia`

If that doesn\'t work, it means your PCMCIA CD-ROM drive is not
supported. There is a workaround. In Windows, copy the directory called
"KNOPPIX" from the *Knoppix* CD to the root of a local FAT formatted
hard drive partition (*e.g.*: drive "C:"). The copy will take some time
to complete. Then start *Knoppix* and specify the partition that you
copied the KNOPPIX directory to, using the "*fromhd*=" boot parameter.
For example, boot with:

`knoppix fromhd=/dev/hda1`

If Windows is not available, use a single-floppy Linux such as
"tomsrtbt" to do the copy, however that is beyond the scope of this
book.

### Getting out

Now that you\'ve got Knoppix up and running, feel free to have a poke
around. Everything is read-only, so you\'re unlikely to do any harm to
your computer. To exit Knoppix:

1.  Click the "K" menu in the bottom left corner.
2.  Click "Logout".\
3.  Knoppix will begin shutting down.
4.  The Knoppix CD will be ejected.
5.  Remove the CD and close the tray.
6.  Press Enter on the keyboard.
7.  Knoppix will attempt to turn off the computer automatically. If it
    doesn\'t turn off automatically, it is now safe to turn off the
    computer yourself using the power button.

**`Tip`**\
`For a quick exit, press Ctrl+Alt+Backspace. This “three finger salute” kills the ``X Window System``.`\
`Killing the X Window System takes down KDE and all its open applications.`\
`Knoppix will then shut down automatically.`


# Knowing Knoppix/The K Desktop Environment

!KDE 3.4 running in Slax, another Live Linux
distro{width="370"}

## The K Desktop Environment

!Konqi: the KDE
mascot The
*K Desktop Environment* is a modern, powerful and free graphical user
interface environment for UNIX
compatible systems. Its name is a play on the *Common Desktop
Environment* created by Sun Microsystems in the 1980s. This section
explains what KDE has to offer.

**`Web link`**\
`The home page of the K Desktop Environment:`\
`http://www.kde.org/`

### Single click, not double-click

KDE looks familiar to Windows and Macintosh users because it takes some
of the best elements from each. There is an important difference:
everything is single click. Nothing needs a double-click to make it
work. If you double-click, you\'ll end up with a program running twice,
or something else you don\'t need. Just single
click. To revert this to what you may be
used to, there is an appropriate setting under Peripherals -\> Mouse in
the Control Center.

**`Tip`**\
`To ``select a file`` instead of opening it, hold down the Ctrl key and click the left mouse button.`\
`The icon will be selected, rather than opened.`\
`It is then safe to let go of the Ctrl key.`

### Context menus everywhere

Most icons have a context menu. To get the
context menu for an icon, right-click on the icon. You\'ll get a little
pop-up menu of common actions for that icon. This also works on window
edges, toolbars, and just about everything else.

**`Tip`**\
`Right-click to see the context menu for an item.`

### Hover the mouse for help

Like Macintosh and Windows, most icons have a tooltip. Hover the mouse
pointer over an icon. A little yellow label will tell you what that icon
does. Tooltips only work in the current active window. This means that
if you have two windows open, you will only get tooltips in the window
that is at the front. To get tooltips in the
other window, you must click it to bring it to the front.

**`Tip`**\
`Not sure what an icon does? Hover the mouse pointer over it.`

### The Desktop

The main part of the screen is called the
*Desktop*. This is where the application windows
appear. There are also icons for each *disk device* in the system.

Here are device icons for two CD-ROM drives, a 1.44 Mb floppy drive, and
a hard disk partition. Notice that the "hard disk partition" icon has
the name "hda1". Knoppix has its own way of naming disks and partitions.
For details, see the section "Knoppix essentials". These icons are
actually hyperlinks. In other words, they are just pointers to the place
in the system where the files appear. You can\'t drag and drop files and
folders onto Desktop device icons, as you can on the Apple Macintosh.

**`Note`**\
`Desktop icons are shortcuts. There are no files inside Desktop icons.`\
`Instead, Desktop icons are just pointers to the places where the files actually appear.`

If you plug in a hot-pluggable disk device, such as a USB external hard
drive, a new icon for it will appear on the Desktop. This behaviour will
be familiar to Apple Macintosh users.

### The Panel

At the bottom of the screen is the *Panel*. The
Panel is always visible. It contains various utilities and status
information.

#### K Menu

In the far left corner of the Panel is the *K
Menu* which is just like the Windows "Start" menu.
Click for a list of programs that are available on the system.

#### Quick launch

Next to the K Menu are *Quick Launch*
icons. These icons represent frequently used programs. Hover the mouse
pointer over the program icon for a description of what it does.
Single-click on the icon to start that program. Be aware that the
*OpenOffice* program may take several minutes to start, especially if
you have a slower computer.

#### Desktop Guide

The *Desktop Guide* consists of four
squares. Each square represents one desktop. You start off in the first
desktop. Click in the Desktop Guide to switch between the four available
desktops. To move open windows between Desktops, click the Window
Control Box at the top left corner of the window. Point at "To desktop",
then choose the Desktop that you would like to send the window to.

#### Taskbar

A button is shown in the *Taskbar* for each open
window. This example shows three open windows; *Konsole*, the
*Konqueror* web browser, and the *GIMP* graphics editor.

#### System Tray

The *System Tray* contains an icon for the
current keyboard layout. To view the available keyboard layouts,
right-click on the keyboard layout icon.

#### Clock

The clock shows the time and date.

#### Hide Panel

At each end of the Panel is a *Hide Panel* button. Click the Hide Panel
button to make the Panel shrink to that side of the screen. Click the
button again to unhide the Panel. Drag the Hide Panel button to move the
entire Panel from one side of the screen to another.

### Left mouse button selects text, middle button pastes

To copy and paste text using a three
button mouse:

1.  Select the text that you want to copy and paste with the left mouse
    button, so that the text is highlighted.
2.  Point to the place where you want the text to go.
3.  Click the middle mouse button. The last selected text will be pasted
    from the X Window System\'s *copy buffer* into the place where you
    clicked.

This also works in other window managers that run in X. If this method
doesn\'t work, you can use the Ctrl+C \> Ctrl+V or the Ctrl+Insert \>
Shift+Insert combination. The latter key combination is slightly older,
but is supported in apps that don\'t support the former combinations.

## Alternatives to KDE

:   *See also: Alternatives to
    KDE*

For whatever reason, you may you might want to try something other than
KDE. Several alternatives exist, such as GNOME,
Xfce, and WindowMaker. GNOME, being an entirely separate desktop
environment rather than a window manager, is distributed within
Gnoppix. For more info, see Alternatives to
KDE. Once knoppix has
loaded you can switch between the various alternatives.

In newer versions of Knoppix,
Beryl "wikilink") may be supported (this
depends on your hardware). Although using Beryl is almost identical to
using KDE it must be specified at boot time with:

`knoppix desktop=beryl`


# Knowing Knoppix/Knoppix essentials

## Knoppix essentials

*"If I ever met Bill Gates, there wouldn\'t be much of a meeting point.
I couldn\'t tell him about business, and he couldn\'t tell me about
technology." \-- Linus Torvalds*

This section contains important background information that will help
you understand the rest of this book. If you are in a hurry, skip over
this section. The terms explained in this section will be used often, so
you may need to refer back to this page later.

### File names

The following rules apply to file names in *Knoppix*.

-   **Case sensitive.** This causes the most problems for beginners. For
    example, "myfile.txt", "MyFile.txt" and "**MYFILE.TXT**" are all
    different names.
-   **Long file names are allowed.** File names can be up to 255
    characters long.
-   **There is no "C:" drive.** Instead, all files are arranged in a
    tree beginning with "/", which is called the *root
    directory*. The "root directory" is
    like "My Computer". It is the starting point for everything stored
    inside in the computer.
-   **Forward slashes.** For example, in Windows, part of the location
    of an image file might be:\
    `My Documents\My Pictures\duck.jpg`\
    In *Knoppix*, the backslashes that represent the path to the file
    are written as forward slashes instead, like this:\
    `My Documents/My Pictures/duck.jpg`

**`Note`**\
`What's the difference between a directory and a folder? Not much.`\
`A folder is just the icon that is usually used to represent a directory.`\
`The words “directory” and “folder” are `*`interchangeable`*`.`\
`Remember, a hard disk is like a filing cabinet.`\
`Partitions are like drawers, directories are like folders, and files are like individual documents.`

### Drive names

You may be used to Microsoft Windows\' naming scheme for disk drives.
For example, you may be used to "drive A:" for the first floppy drive;
"drive C:" for the first visible hard drive partition, and so on.
Knoppix has its own drive naming scheme. This section explains how the
naming scheme works.

#### Disk types

The naming scheme starts with a two-letter code for the type of disk.

  Name   Drive type
  ------ ----------------------------------------------
  fd     Conventional floppy drive
  hd     Integrated Drive Electronics (IDE) drive
  sd     Small Computer System Interface (SCSI) drive

#### IDE drives

IDE drives are the most common in desktop PCs
and laptops. A single letter indicates how the drive is connected. Most
PCs and laptops have two IDE *channels*: primary
and secondary. Each channel can have up to two
devices: master and slave.

  Name   IDE drive
  ------ ------------------
  hda    Primary Master
  hdb    Primary Slave
  hdc    Secondary Master
  hdd    Secondary Slave

#### SCSI drives

For SCSI drives, a single letter indicates
its location. This is called its position in the *SCSI chain*. Zip, USB
and Firewire drives are also treated as SCSI drives.

  Name   SCSI drive location
  ------ ---------------------
  sda    First SCSI drive
  sdb    Second SCSI drive
  sdc    Third SCSI drive

#### Disk partitions

IDE and SCSI hard drives are divided into *partitions*. Zip, USB and
Firewire drives also contain partitions. A
partition is like a compartment within a disk. There may be a single
partition that covers the entire disk. There may be more than one
partition. Each partition is indicated by a number.

  Name   Drive                      Partition
  ------ -------------------------- ------------------
  hda1   Primary master IDE drive   First partition
  hda2   Primary master IDE drive   Second partition
  hda3   Primary master IDE drive   Third partition

#### SCSI emulation for IDE CD-ROM drives

IDE CD-ROM drives are treated as SCSI drives. This is called *SCSI
emulation*. SCSI emulation is there so that CD burning applications can
use the same language to talk to SCSI and IDE drives.

  Name   CD-ROM drive
  ------ ---------------------
  scd0   First CD-ROM drive
  scd1   Second CD-ROM drive
  scd2   Third CD-ROM drive

#### Conventional 1.44 Mb floppy drives

For ordinary floppy disk drives, a number
shows the drive number.

  Name   Floppy drive number
  ------ ---------------------
  fd0    First floppy drive
  fd1    Second floppy drive

### Drive detection

Knoppix automatically detects all IDE and SCSI
devices. The names of the devices are printed in the startup messages
(Ctrl+Alt+F1). Here is an example:

`hda: [FUJITSU MPA3026AT]`\
`hdb: [LS-120 VER5 00 UHD FLOPPY]`\
`hdc: [HITACHI DVD-ROM GD-2500]`\
`hdd: [MATSHITA CD-RW CD-7586]`

This example shows that the primary master is a Fujitsu hard drive. The
primary slave is an Imation LS-120 SuperDisk drive. The secondary master
is a Hitachi DVD-ROM drive. The secondary slave is a Matshita CD-RW
drive.

### Partition detection

*Knoppix* automatically detects all
partitions on all IDE and SCSI devices. For
example, given a single Windows partition on the primary master IDE hard
drive, the following *device name* will be created:

`/dev/hda1`

This means the partition will be called /dev/hda1 in Knoppix.

**`Note`**\
`Some removable disks also have partitions, notably Iomega Zip disks.`\
`For the partitions on an Iomega Zip disk to be detected properly, you must insert the disk into the drive before you start Knoppix.`

### Mount points

Each device name has a *mount point*. This
is a special place where the files on a device appear. A mount point is
created automatically for each device name. For example, given the
Fujitsu drive above, the following mount point will be created:

`/mnt/hda1`

This means the partition /dev/hda1 will be mounted to /mnt/hda1.

#### Auto-mounting of floppy and CD-ROM drives

Conventional floppy and CD-ROM drives are
*auto-mounted*. This means Knoppix takes care
of mounting and unmounting them automatically. The auto-mount locations
are:

-   First floppy drive: /mnt/floppy
-   Second floppy drive: /mnt/floppy1
-   First CD-ROM drive: /mnt/cdrom
-   Second CD-ROM drive: /mnt/cdrom1

### Login accounts

When you start Knoppix, you are logged in automatically. No
passwords are needed. All passwords are locked
by default. Knoppix bypasses all the usernames and passwords of the
operating system installed on the hard disk.

  Keyboard shortcut   Virtual terminal                                        Logged in as user account
  ------------------- ------------------------------------------------------- ---------------------------
  Ctrl+Alt+F1         Console number 1                                        root
  Ctrl+Alt+F2         Console number 2                                        root
  Ctrl+Alt+F3         Console number 3                                        root
  Ctrl+Alt+F4         Console number 4                                        root
  Ctrl+Alt+F5         X Window System (KDE)   knoppix

You can switch between the virtual terminals at any time. For example,
to switch to the first console, press Ctrl+Alt+F1. The Knoppix startup
messages will be displayed. To switch to the second console, press
Ctrl+Alt+F2. To get back to the X Window System, press Ctrl+Alt+F5.

**`Note`**\
`The X Window System is on virtual terminal number 5.`

### User accounts

#### The user account

The Knoppix *user* account is called "*knoppix*".
This account is for all productivity tasks, including CD burning and
printing. When the X Window System starts, you are logged in to that
user account automatically, without a password.

#### The superuser account

The *superuser* account is for system
administration tasks. The superuser account is called the *root
account*. When *Knoppix* starts, you are logged in as
*root* to all four consoles automatically with no
password. It is also possible to use the root account within the X
Window System.

**`Important`**\
`As with other Linux distributions, use the `*`user`*` account for all your everyday tasks.`\
`Only use the `*`root`*` account when you need it.`\
` For example, when you are logged on as `*`root`*`, you have the power to instantly delete every file on every disk with one simple command.`\
`When you are logged on as a `*`user`*`, the system will not let you do that. This helps you to protect yourself against accidents.`\
`Get into the habit now and it will save you later!`


# Knowing Knoppix/Identifying hardware

# Common hardware

Knoppix has built-in hardware identification. This means Knoppix can
identify the make and model of a huge range of common PC components,
such as processors, graphics cards, network cards, and so on. To
use the hardware identification:

1.  Click K Menu.
2.  Click System.
3.  Click Info Center.\
4.  The *Info Center* application will come
    up. On the left side are the various categories. Click a category to
    view the details.\

The most useful categories are:

-   Processor (Central Processing Unit).
-   Memory (Random Access Memory, or RAM).
-   Partitions (partitions on hard disks and other drives).
-   PCI (Peripheral Component Interconnect cards).
-   PCMCIA (credit-card sized cards for laptops. PCMCIA stands for
    Personal Computer Manufacturer Interface Adapter).
-   Storage Devices (hard disks and other drives).
-   USB Devices (Universal Serial Bus peripherals).

Note :If you plug in a new USB device, and you are already on the USB Devices page, choose any other category and then select USB Devices again to refresh the list.

# Listing hard disks

To get a listing of the hard disk drives in the computer, including the
make and model of each one:

1.  Click the Konsole (bottom row, 6th from the left).
2.  Enter the following command, then press Enter.\
    `dmesg`
3.  The `dmesg` command shows the "kernel messages". You will get quite
    a lot of output. Scroll up about two-thirds of the way until you see
    lines like this:\
    `hda: ST320410A, ATA DISK drive`\
    `hdc: JLMS XJ-HD165H, ATAPI CD/DVD-ROM drive`\
    `hdd: LITE-ON LTR-52327S, ATAPI CD/RW drive`\
    The example above is from a computer with IDE drives. It has one
    hard disk drive and two CD drives. The primary master (hda) is a
    "Seagate Technology 320410A" hard disk drive. "ATA" stands for "AT
    Attachment". The secondary master (hdc) is a DVD drive and the
    secondary slave (hdd) is a CD writer.

Tip
:   To see only the lines from `dmesg` that contain the letters "hd",
    enter:
:   `dmesg | grep hd`
:   The "\|" character is a vertical bar, not a capital "i".
:   On a UK keyboard layout, the vertical bar is on the key between "Z"
    and the left "Shift".

# Limitations

The ability to identify hardware is tremendously useful. However, there
are limitations you should know about.

## Hardware newer than Knoppix

The most important limitation is that Knoppix cannot accurately identify
PCI and PCMCIA hardware that is newer than Knoppix is. USB and Firewire
devices work differently and are not subject to this limitation.

This book comes with Knoppix version 3.3, which is dated September 2003.
Knoppix should be able to identify most hardware made before that date
(except the very old or very rare).

However, Knoppix version 3.3 may only be able to identify PCI and PCMCIA
hardware made after September 2003 as an "Unknown device". A newer
version of Knoppix may help. A newer version can be obtained from the
Knoppix web site and from other vendors.

## Winmodems

The vast majority of modems made these days are
winmodems. A *winmodem* is a modem that relies
on the CPU for some of it\'s communication routines. This is done to
save a few components and reduce manufacturing costs. *Winmodems* tend
not to work well with Linux. A common example is the Intel 537 series of
PCI internal modem cards.

Knoppix can only tell you what a winmodem identifies itself as, in its
hardware. Knoppix cannot tell you about the Windows-specific software
needed to get it working in Windows. For example, in the case of Intel
537 based winmodems, there are many different vendor-specific Windows
drivers, which may be incompatible with each other. However, these cards
will all be reported the same in Knoppix. That is more a limitation of
the hardware, rather than a limitation of Knoppix.

## Identified does not mean supported

Knoppix may not have driver support for all the hardware it can
identify. In other words, just because Knoppix tells you the make and
model of a device does not mean it actually works in Knoppix. For
example, the Intel 536EP internal modem PCI card is accurately
identified; but it is not usable because it requires proprietary
software that cannot be distributed with Knoppix.

## Not guaranteed

The identification provided by Knoppix may be wrong. This is because
Knoppix is not perfect (sorry). However, it is pretty reliable. For
example, in two years of using Knoppix every day, I have had only one
instance of wrongly identified hardware (a fairly obscure sound card).

The hardware identification strings are mostly provided by Linux users,
rather than the hardware vendors themselves. However, the hardware
vendors are not perfect either. Sometimes the Linux users\'
identification corrects mistakes made by hardware vendors!


# Knowing Knoppix/Reading the hard disk

Knoppix supports all IDE and most SCSI hard disk drives. It reads files
from the full range of Microsoft operating systems -- from MS-DOS
through to Windows XP.

This is useful because if you cannot start Windows, often all the data
files are still there happily on the hard disk. On many occasions, it is
a simple matter to locate the files using Knoppix. It is usually then
equally trivial to rescue the files by copying them somewhere safe
(explained in the later sections).

To browse the files on the internal hard disk, look on the Desktop. You
should see an icon for each *hard disk partition*. To access the files
on that partition:

1.  Click the icon for the hard disk partition.
2.  Wait for a moment while the partition is *mounted*. A green triangle
    will appear, indicating that the partition is in use.
3.  Wait while the *Konqueror* file manager starts up.
4.  The files on the partition should be displayed, read only. This
    example shows a typical "drive C:" from a computer that usually runs
    Windows 98.

# Selecting files and folders

To create data CDs and copy files and folders onto other disks, you need
to know how to select. There are several ways to
select files and folders:

-   Lasso. Click and hold the left mouse button on a blank area in the
    *Konqueror* window. Drag across to the opposite corner. The files
    and folders in the marked area will be selected. To deselect, click
    any blank area within the window.
-   Ctrl + click. Hold down the Ctrl key on the keyboard, and click a
    file or folder. It will be selected. To deselect, Ctrl + click the
    file or folder icon again, or click any blank area within the
    window.
-   Shift + click. Ctrl + click the first file or folder. Let go of the
    Ctrl Key. Hold down the Shift key, and select the last file or
    folder. The range will be selected. To deselect, click any blank
    area within the window.
-   Right-click. Click the right hand mouse button on a file or folder.
    A "context menu" will appear, showing the most common actions for
    that item. The file or folder will also be selected. To deselect,
    click any blank area within the window.

# Enabling write access

Knoppix has the optional ability to write to hard
disk drives. *Write mode* lets you copy files to the drive, and change
existing files. Knoppix supports writing to MS-DOS and Windows 95/98/Me
formatted partitions. Writing to native Windows NT/2000/XP partitions is
not supported. To enable write access:

1.  Click the icon of the hard disk partition you want to write to.
2.  Wait for a moment while the partition is mounted.
3.  Wait while the *Konqueror* file manager starts up.
4.  The files on the partition will be displayed.
5.  Right-click the icon of the hard disk partition.
6.  Click "Change read/write mode".
7.  You will be prompted to make the partition *writeable*. Click "Yes".
8.  You should now be able to write files to the partition.

# Quick help

**Question: There are no icons for the hard disk on the Desktop.**\
If you have an IDE hard disk, this usually means the BIOS did not detect
the hard disk drive. Go into your motherboard\'s BIOS and make sure the
hard disk is detected by the BIOS properly. If you have one of the
recent "Serial ATA" hard drives, they are not supported in this version
of Knoppix. Try a newer version of Knoppix.

**Question: I still can\'t access the hard disk.**\
The partition may be encrypted, which means it may have been specially
set up on purpose to make it inaccessible to outside tools like Knoppix.
The partition table may be incorrect, or there may be data errors. In
the worst case, the drive may be physically damaged; listen for
ping-pong ball bouncing or loud rattling noises.

**Question: How can I check or test my hard disk?**\
Knoppix has many built-in tools, but they are beyond the scope of this
book. You will need a more advanced book, a knowledgeable friend or help
online to use these tools. Having said that, here is a hint. To list the
commands that have the words "dos", "ntfs" or "partition" anywhere in
their short description, enter:

`man -k dos ntfs partition`


# Knowing Knoppix/CD reading and writing

# Reading CD-ROMs

Knoppix has built-in support for reading
*Compact Disc Digital Data* discs. It is best to have two CD drives --
one for the Knoppix CD, and one for the data CD that you want to read.
If not, see "If you have only one CD drive" in the "Advanced startup
options"
section.
To read a data CD:

1.  Insert the data CD into an empty CD-ROM drive.
2.  Click the icon on the Desktop on that represents the drive. The
    "CDROM" icon represents the first CD drive, and "CDROM1" represents
    the second drive. In Windows, the first drive is given a lower drive
    letter (*eg* "D:"). The second drive is given a higher drive letter
    (*eg* "E:").
3.  A green triangle will appear on the CD drive icon to indicate that
    the drive is in use.
4.  Wait while the *Konqueror* file manager starts up.
5.  The files on the CD will be displayed.

## Ejecting the CD

1.  Close all windows and files opened from the CD.
2.  Press the Eject button on the front of the drive.
3.  The CD tray will be ejected.

## Quick help

**Question: When trying to access a CD for the first time, it says "The
file or directory <file:/mnt/cdrom> does not exist". What does this
mean?**\
Usually this means the drive is still preparing itself, or the *Knoppix*
auto-mounter has not finished working yet.
Wait a few moments, then try again. If it still doesn\'t work, click the
Home icon in the Panel, then type <file:/mnt/auto/cdrom> or
<file:/mnt/auto/cdrom1>. If it still doesn\'t work, click the *Knoppix*
icon in the Panel, click Root Shell, then enter this command:

`/etc/init.d/autofs restart`

**Question: Why is the CD stuck in the drive?**\
*Knoppix* uses the locking mechanism of the drive to prevent you from
taking out a CD that is still in use. Close all windows and documents
opened from the CD, then try again.

**Question: When I right-click on the CD drive\'s icon and then click
"Eject", it says "Eject failed!" What does that mean?**\
It means the drive doesn\'t like the *Knoppix* "eject" program. Just
press the eject button on the front of the drive instead.

# CD writing

Knoppix has built-in support for CD
writing. To create your own CDs using Knoppix, it is best to have two CD
drives. You need one drive for the Knoppix CD, and a Compact Disc
Re-Writeable drive for the blank media. Normally, the Knoppix CD
occupies the first drive, and it cannot be removed while Knoppix is
running.

However, if you have a suitable hard disk, it is possible to start
Knoppix from a single CD-ROM drive and then use it for other CDs. See
the later section, "Advanced startup options".

The following CD-RW drives are compatible with Knoppix:

-   All SCSI CD-RW drives.
-   Nearly all IDE CD-RW drives produced after 1999.
-   Some IDE CD-RW drives produced before 1999.
-   Most external (USB) CD-RW drives.

Knoppix uses SCSI commands to create CDs. When working with IDE CD-RW
drives, Knoppix uses *SCSI emulation*. This means that *Knoppix* works
with IDE CD-RW drives while actually using the SCSI language to talk to
the drive. For this reason, SCSI CD-RW drives are ideal, while most IDE
CD-RW drives should work. To copy files onto a data
CD:

1.  Select the files or folders to be written onto CD.
2.  Right-click on the selection.
3.  Click "Create CD with K3b".
4.  Wait for a moment while the *K3b* program starts.
5.  The *K3b* window will be displayed. In the "Current Projects" pane,
    you will see the folder that you chose. To add additional files and
    folders, drag and drop them into the Project pane.
6.  The disk usage is in shown in the green
    bar at the bottom of the Projects pane. It shows the amount of space
    that will be used on the writeable CD. This example shows 90.3 MB
    will be used, out of a possible 650 MB.
7.  Click the "Burn" button (fourth from the left in the toolbar). The
    disk writing window will be appear. The make and model of your CD-RW
    drive will be shown.
8.  Select the writing speed to be used from the
    "Speed" box. The correct writing speed to choose depends upon the
    speed of your CD-RW drive and the media. For example, if you have an
    8x CD-RW drive and 4-10x compatible media, choose 8x.
9.  Click the "Filesystem" tab.
10. Click "Generate Joliet extensions" to put a tick in the box. This
    step is needed to make the CD fully readable in Windows. If you are
    only going to use the CD in another Linux or UNIX computer, you do
    not need this.
11. Click "Write".
12. The CD will be created. When the writing process has finished, the
    CD will be ejected.
13. Click "Close" to return to K3b.

## Quick help

**Question: Why does it eject the CD and do nothing? Or, why do I get an
error while CD writing?**\
You may be trying to use incompatible media. For example, if you try to
write onto CD-RW media labelled "4-10x compatible" at 32x then the drive
will just eject the blank CD.

**Question: When I put the written CD in a computer running Windows,
some of the file names come out in capitals and some spaces or dots are
turned into underscores. Why?**\
You need step 10, "Generate Joliet extensions". The original
specification for data CDs allows each file name only 8 characters plus
a 3 character extension. For example: "*hello.txt*" fits, but "long file
name of your *dreams.txt*" does not. "*Joliet*" is the Microsoft way of
putting long file names on a data CD.

**Question: The setup works fine, but when it gets ready to burn, there
are no devices to be selected. How come?**\
You need to run K3B as root. Go to a terminal (the image of a monitor
with a shell on it), then type \'su\', hit return, then type \'k3b\' and
hit return. This runs K3B as root and fixes some issues.

\'\'\'Question: how to read the data from cd and DVD