livecd-iso-to-disk --format fails with existing LV on USB
[livecd/EL-5.git] / README
blobdf0f189241b8e80e9fc5f112286c0aebe071ff47
2                        The Fedora live CD tools
3                     David Zeuthen <davidz@redhat.com>
4                     Jeremy Katz <katzj@redhat.com>
6                     Last updated: October 9 2007 (v0.5)
8 This project concerns tools to generate live CD's on Fedora based
9 systems including derived distributions such as RHEL, CentOS and
10 others. See the project Wiki at 
12  http://fedoraproject.org/wiki/FedoraLiveCD
14 for more details. Discussion of  this project takes places at the
15 fedora-livecd@redhat.com mailing list
17  http://www.redhat.com/mailman/listinfo/fedora-livecd-list
19 This project and it's source files is licensed under the GPLv2
20 license. See the file COPYING for details.
22 1. LIVE CD DESIGN GOALS
24 The live CD is designed in such a way that the when running from a
25 live CD, the system should appear as much as possible as a standard
26 system with all that entails; e.g. read-write rootfs (achieved using
27 dm-snapshot), standard ext3 file system (for extended attributes) and
28 so on. 
30 Another design goal is that the live CD should be ''installable'',
31 ie. an user should be able to install the bits from the live CD onto
32 his hard disk without this process requiring network access or
33 additional media. (NOTE: this feature is not yet implemented)
35 Finally, another design goal is that the tool set itself should be
36 separate from configuration; the same unmodified tool should be usable
37 for building various live CD flavors with vastly different
38 configurations, e.g. a GNOME live CD, a KDE live CD, a live cd with
39 music programs and so on.
41 2. CREATING A LIVE CD
43 To create a live cd, the livecd-creator tool is used. Super user
44 privileges are needed. The tool is more or less self-documenting, use
45 the --help option to see options.
47 2.1 HOW THE LIVE CD CREATOR WORKS
49 In a nutshell, the livecd-creator program
51  o Sets up a file for the ext3 file system that will contain all the
52    data comprising the live CD
54  o Loopback mounts that file into the file system so there is an
55    installation root
57  o Bind mounts certain kernel file systems (/dev, /dev/pts, /proc,
58    /sys, /selinux) inside the installation root
60  o Uses a configuration file to define the requested packages and
61    default configuration options.  The format of this file is the same
62    as is used for installing a system via kickstart.
64  o Installs, using yum, the requested packages into the installation
65    using the given repositories
67  o Optionally runs scripts as specified by the live CD configuration file. 
69  o Relabels the entire installation root (for SELinux)
71  o Creates a live CD specific initramfs that matches the installed kernel
73  o Unmounts the kernel file systems mounted inside the installation root
75  o Unmounts the installation root
77  o Runs resize2fs to minimize and unminimize the ext3 file to remove data
78    from deleted files
80  o Runs resize2fs to minimize on a devicemapper snapshot, to generate a
81    small minimized delta image file which can be used by anaconda to
82    reduce installation time by not copying unused data to disk
84  o Creates a squashfs file system containing only the ext3 file (compression)
86  o Configures the boot loader
88  o Creates an iso9660 bootable CD
91 2.2 EXAMPLE: A BAREBONES LIVE CD
93 The command
95 # livecd-creator \
96   --config=/usr/share/livecd-tools/livecd-fedora-minimal.ks
98 will create a live CD that will boot to a login prompt. Not that since
99 no configuration is done the user will not be able to login to the
100 system as the root password is not set / cleared.
102 2.3 LIVE CD CONFIGURATION FILES
104 The configuration of the live CD is defined by a file that uses the
105 same format as installing a system via kickstart.  They can include
106 some basic system configuration items, the package manifest and a
107 script to be run at the end of the build process.
109 For the Fedora project, there are currently a variety of different
110 live CD configuration files.  These include a minimal live image
111 (livecd-fedora-minimal.ks), a complete desktop image
112 (livecd-fedora-desktop.ks) and others.
114 2.4 EXAMPLE: SPINNING THE FEDORA DESKTOP LIVE CD
116 Assuming that you use the livecd-fedora-desktop.ks configuration file,
117 then the following command
119 # livecd-creator \
120   --config=/usr/share/livecd-tools/livecd-fedora-desktop.ks \
121   --fslabel=Fedora-7-LiveCD-1-foo
123 will create a live CD called "Fedora-7-LiveCD-1-foo". The name
124 given by --fslabel is used.
126  o as a file system label on the ext3 and iso960 file systems
127    (as such it's visible on the desktop as the CD name)
129  o in the isolinux boot loader
131 If you have the repositories available locally and don't want to wait
132 for the download of packages, just substitute the URLs listed in the
133 configuration file to point to your local repositories.
135 3. LIVE CD INSTALLS
137 As of Fedora 7, anaconda has support for doing an installation
138 from a live CD.  To use this, double click on the "Install to Hard
139 Drive" item on the desktop or run /usr/bin/liveinst if you don't have
140 such an icon.
142 4. LIVE CD MEDIA VERIFICATION
144 The live CD can incorporate functionality to verify itself.  To do so,
145 you need to have anaconda-runtime installed both on the system used
146 for creating the image and installed into the image.  This is so that
147 the implantisomd5 and checkisomd5 utilities can be used.  These
148 utilities take advantage of embedding an md5sum into the application
149 area of the iso9660 image.  This then gets verified before mounting
150 the real root filesystem.
152 In a future release, the isomd5 utilities will probably be split out
153 of anaconda.
155 5. USING LIVE IMAGES FROM USB MEDIA 
157 USB sticks are becoming increasingly prevalent and are a nice way to
158 use live images.  You can take a live CD iso image and transform it so
159 that it can be used on a USB stick.  To do so, use the
160 livecd-iso-to-disk script.
161    /usr/bin/livecd-iso-to-disk /path/to/live.iso /dev/sdb1
163 Replace /dev/sdb1 with the (unmounted) partition where you wish to put
164 the live image.  This is not a destructive process; any data you 
165 currently have on your USB stick will be preserved.