No edit summary |
|||
Line 11: | Line 11: | ||
{{admon/note | Note | Si vous voulez seulement graver une image ISO pré-fabriquée sur un disque optique, visitez la page http://fedoraproject.org/en/get-fedora/fr pour télécharger u CD Live ou un DVD Live, puis reportez-vous [http://docs.fedoraproject.org/install-guide/ guide d'installation] ou au [http://docs.fedoraproject.org/readme-burning-isos/ how-to sur le gravage] pour les instructions nécessaires.}} | {{admon/note | Note | Si vous voulez seulement graver une image ISO pré-fabriquée sur un disque optique, visitez la page http://fedoraproject.org/en/get-fedora/fr pour télécharger u CD Live ou un DVD Live, puis reportez-vous [http://docs.fedoraproject.org/install-guide/ guide d'installation] ou au [http://docs.fedoraproject.org/readme-burning-isos/ how-to sur le gravage] pour les instructions nécessaires.}} | ||
== | == Pour commencer == | ||
Pou créer une image live, il faut utiliser l'outil '''livecd-creator''' avec les privilèges du super utilisateur. L'outil est plus ou moins bien documenté – utilisez {{command | livecd-creator --help}} pour connaître les options. | |||
L'outil '''livecd-creator''' fait partie du paquet <code>livecd-tools</code>. S'il n'est pas installé sur votre système, ajoutez le avec [[dnf|DNF]] ou [[yum|YUM]]: | |||
<pre> | <pre> | ||
su -c 'yum install livecd-tools spin-kickstarts' #Versions prior to Fedora 22 | su -c 'yum install livecd-tools spin-kickstarts' #Versions prior to Fedora 22 | ||
ou | |||
su -c 'dnf install livecd-tools spin-kickstarts' #Fedora 22 and beyond | su -c 'dnf install livecd-tools spin-kickstarts' #Fedora 22 and beyond | ||
</pre> | </pre> | ||
Si vous êtes intéressé(e) par des versions localisées (c.-à-d. traduites dans d'autres langues), installez également '''l10n-kickstarts'''. | |||
== Configuring the image == | == Configuring the image == |
Revision as of 04:14, 3 April 2016
Cette page explique comment créer un Live CD ou DVD à contenu personnalisé sur des systèmes basés sur Fedora en y incluant des distribution telles que RHEL, CentOS et autres.
Pour commencer
Pou créer une image live, il faut utiliser l'outil livecd-creator avec les privilèges du super utilisateur. L'outil est plus ou moins bien documenté – utilisez livecd-creator --help
pour connaître les options.
L'outil livecd-creator fait partie du paquet livecd-tools
. S'il n'est pas installé sur votre système, ajoutez le avec DNF ou YUM:
su -c 'yum install livecd-tools spin-kickstarts' #Versions prior to Fedora 22 ou su -c 'dnf install livecd-tools spin-kickstarts' #Fedora 22 and beyond
Si vous êtes intéressé(e) par des versions localisées (c.-à-d. traduites dans d'autres langues), installez également l10n-kickstarts.
Configuring the image
The configuration of the live image is defined by a file called kickstart. It can include some basic system configuration items, the package manifest and a script to be run at the end of the build process.
For the Fedora project, the most important live image configurations files are:
- fedora-live-base.ks : The base live image system (included in the 'livecd-tools' package).
- For Fedora 20 and earlier: fedora-livecd-desktop.ks : Complete desktop with applications and input/output support for all supported locales in Fedora (this one is part of the 'spin-kickstarts' package) - despite the name, this is the kickstart that generates the ~1GB-sized images for recent releases.
- For Fedora 21 and later: fedora-live-workstation.ks - this is the Workstation product configuration.
kickstart files for other spins (e.g. Fedora Electronics Lab) can be found in /usr/share/spin-kickstarts/
after installing the 'spin-kickstarts' package. These pre-made configuration files can be a great place to start, as they already have some useful pre and post-installation scripts.
You can create a customized kickstart file by running system-config-kickstart
. Note that you might have to install the package first with su -c "dnf install system-config-kickstart"
in Fedora 22 and beyond or su -c "yum install system-config-kickstart"
in earlier versions of Fedora. This tool is mainly intended for generating kickstart files for automated installs, not live images, so the output will probably not be usable without editing, but it may help you to generate particular kickstart directives. Remember to add the line:
%include /usr/share/spin-kickstarts/fedora-live-base.ks
at the beginning of your kickstart file to include the base live configuration.
Making the image
To make the image, simply issue the following command:
livecd-creator --verbose \ --config=/path/to/kickstart/file.ks \ --fslabel=Image-Label \ --cache =/var/cache/live
The name given by --fs-label is used:
- as a file system label on the ext3 and iso9660 file systems (As such, it's visible on the desktop as the CD name).
- in the isolinux boot loader.
If you have the repositories available locally and don't want to wait for the download of packages, just substitute the URLs listed in the configuration file to point to your local repositories.
Examples
Spinning the fedora desktop
The following command:
livecd-creator --verbose \ --config=/usr/share/spin-kickstarts/fedora-live-workstation.ks \ --fslabel=Fedora-LiveCD \ --cache=/var/cache/live
will create a live CD called "Fedora-LiveCD" using the fedora-live-workstation.ks configuration file.
A Barebones Live CD
The command
livecd-creator --verbose \ --config=/usr/share/doc/livecd-tools-`rpm -q livecd-tools --qf "%{VERSION}"`/livecd-fedora-minimal.ks \ --cache=/var/cache/live
will create a live CD that will boot to a login prompt.
Testing your Live CD using KVM or qemu
As root:
qemu-kvm -m 2048 -vga qxl -cdrom filename.iso
If you do not have KVM support, you have to use qemu instead
qemu-system-x86_64 -m 2048 -vga qxl -cdrom filename.iso
Replace filename.iso with the name of your created Live CD image and qemu-system-x86_64 with an appropriate qemu binary for the target system, e.g qemu-system-i386.
Using your new live image
You can burn your image directly to a CD or a DVD if it fits, or you can write it to a USB stick.
Live Image Media Verification
The live image can incorporate functionality to verify itself. To do so, you need to have isomd5sum installed both on the system used for creating the image and installed into the image. This is so that the implantisomd5 and checkisomd5 utilities can be used. These utilities take advantage of embedding an md5sum into the application area of the iso9660 image. This then gets verified before mounting the real root filesystem.
Other Resources
- A Fedora Classroom class covering creating Fedora remixes.
- If you are distributing your spin you need to be concerned about trademark usage and GPL responsibilities.