http://www.livecd.ethz.ch/build.html
Creating a LiveCD image with livecd-tools
For SL6 use the livecd-tools provided in the sl-addons repo. To install livecd-tools run as root
yum --enablerepo=sl-addons install livecd-tools
For SL7 download the livecd-tools from http://www.livecd.ethz.ch/download/RPMS/7x/x86_64
for SL 7.2 and later
wget http://www.livecd.ethz.ch/download/RPMS/7x/x86_64/livecd-tools-21.4-5.el7.x86_64.rpm
wget http://www.livecd.ethz.ch/download/RPMS/7x/x86_64/python-imgcreate-21.4-5.el7.x86_64.rpm
yum install livecd-tools-21.4-5.el7.x86_64.rpm python-imgcreate-21.4-5.el7.x86_64.rpm
for SL 7.0, 7.1
wget http://www.livecd.ethz.ch/download/RPMS/7x/x86_64/livecd-tools-20.5-4.el7.x86_64.rpm
wget http://www.livecd.ethz.ch/download/RPMS/7x/x86_64/python-imgcreate-20.5-4.el7.x86_64.rpm
yum install livecd-tools-20.5-4.el7.x86_64.rpm python-imgcreate-20.5-4.el7.x86_64.rpm
The LiveCD creation is based on kickstart configuration files. You can find the files which were used to create SL6 LiveCDs under /usr/share/livecd-tools or you can download the latest files with svn. The following command will download the kickstart configuration from trunk into a folder called livecd-config-SLx
svn co https://svn.iac.ethz.ch/pub/livecd/trunk/SL6/livecd-config livecd-config-SL6 # SL6 ks files
svn co https://svn.iac.ethz.ch/pub/livecd/trunk/SL7/livecd-config livecd-config-SL7 # SL7 ks files
The following main kickstart files are available for SL6
sl67-livecd-gnome.ks kickstart file used for 32-bit SL67 LiveCD with gnome desktop
sl67-livecd64-gnome.ks kickstart file used for 64-bit SL67 LiveCD with gnome desktop
sl67-livedvd.ks kickstart file used for 32-bit SL67 LiveDVD
sl67-livedvd64.ks kickstart file used for 64-bit SL67 LiveDVD
sl67-mini_livecd-icewm.ks kickstart file used for 32-bit SL67 LiveMiniCD with icewm desktop
sl67-mini_livecd64-icewm.ks kickstart file used for 64-bit SL67 LiveMiniCD with icewm desktop
sl67-livecd-gnome-NONPAE.ks kickstart file used for 32-bit SL67 LiveCD with gnome desktop running on non-pae capable hardware
The above kickstart files can include the following files
sl67-live-base.ks The base for all kickstart files
sl67-extra-software.ks Install extra software which is not part of standard SL6
sl67-config-icewm.ks Customize icewm
sl67-doc.ks Creates a short documentation in /usr/share/HTML/index.html
sl67-live-NONPAE.ks Include to build LiveCD running on non-pae capable hardware
The following main kickstart files are available for SL7
sl-71-livecd.ks kickstart file used for 64-bit SL71 LiveCD
sl-71-livedvd-gnome.ks kickstart file used for 64-bit SL71 LiveDVD with gnome desktop
sl-71-livedvd-kde.ks kickstart file used for 64-bit SL71 LiveDVD with kde desktop
sl-71-livedvd-extra.ks kickstart file used for 64-bit SL71 LiveDVD with gnome desktop and extra packages from EPEL
Modify the kickstart files to fit your needs. For more information about kickstart configuration files see for example http://fedoraproject.org/wiki/Anaconda/Kickstart.
To rebuild the SL67 LiveCD, SL67 LiveDVD, and SL67 LiveMiniCD run as root
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-livecd-gnome.ks --fslabel=SL67-LiveCD-i386
LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-livecd64-gnome.ks --fslabel=SL67-LiveCD-x86_64
</pre>
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-livedvd.ks --fslabel=SL67-LiveDVD-i386
LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-livedvd64.ks --fslabel=SL67-LiveDVD-x86_64
</pre>
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-mini_livecd-icewm.ks --fslabel=SL67-LiveMiniCD-i386
LANG=C livecd-creator --config=/usr/share/livecd-tools/sl67-mini_livecd64-icewm.ks --fslabel=SL67-LiveMiniCD-x86_64
</pre>
Or just use your own kickstart file
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">LANG=C livecd-creator --config=sl6-myconfig.ks --fslabel=My-LiveCD
</pre>
livecd-creator as some more options. See livecd-creator help:
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">livecd-creator -h
</pre>
For more information see also
- How to create a Fedora LiveCD: http://fedoraproject.org/wiki/How_to_create_and_use_a_Live_CD
- Creating a CentOS LiveCD image: https://projects.centos.org/trac/livecd/wiki/CreateImage
- Build a Fedora Live CD (IBM Doc): http://www.ibm.com/developerworks/linux/library/l-fedora-livecd/index.html
Test the ISO image
You can burn your ISO image to a CD or DVD ROM to test it. However, it is much easier to test it with qemu or vmplayer
Get qemu from rpmforge (http://rpmrepo.org/).
How to run qemu (see man qemu):
<pre style="border: 1pt dashed rgb(121, 121, 121); background-color: rgb(248, 248, 248); font: 400 12px/20px "DejaVu Sans Mono", "Liberation Mono", monospace; margin: 5px 0px 10px; padding: 5px 10px; color: rgb(0, 0, 0); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">qemu -m 1024 -cdrom SL6-LiveCD.iso
qemu -m 1024 -full-screen -cdrom SL6-LiveCD.iso
</pre>
Escape full screen in qemu with ALT+CTRL+f
Or alternatively you can use VMware Player.
网友评论