教你创建自己的Fedora LiveCD
如何因你本地安装的Fedora,而创建Fedora LiveCD呢?
『一』首先,我们需要安装必要的软件。要想创建live image,工具livecd-creator不可或缺。[下面的命令需在管理员权限下运行]
yum install livecd-tools spin-kickstarts
yum install l10n-kickstarts
yum install fedora-kickstarts如果对该工具不太清楚,可使用‘–help’查询相关参数用法。
接着,我们创建livecd目录:
mkdir /root/livecd
cd /root/ livecd然后,复制选中的kickstart文件到当前目录下:
cp /usr/share/spin-kickstarts/fedora-live-base.ks .或
cp /usr/share/spin-kickstarts/fedora-live-mini.ks .抑或
wget https://fedorahosted.org/spin-kickstarts/browser/fedora-live-minimization.ks
wget https://fedorahosted.org/spin-kickstarts/browser/fedora-live-desktop.ks
『二』创建Live CD现在开始创建live cd,输入下面命令:
livecd-creator --config=/root/fedora-live-minimization.ks --fslabel=Fedora-LiveCD --cache=/var/cache/live输出结果为
mke2fs 1.41.12 (17-May-2010)
Filesystem label=_Fedora-LiveCD
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262144 inodes, 1048576 blocks
10485 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-14&arch=i386 error was
14: PYCURL ERROR 6 - ""
Error creating Live CD : Unable to download from repo : Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
[root@unixmen-Fedora14 livecd]# livecd-creator --config=/root/livecd/fedora-live-mini.ks --fslabel=Fedora-LiveCD --cache=/var/cache/live
mke2fs 1.41.12 (17-May-2010)
Filesystem label=_Fedora-LiveCD
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262144 inodes, 1048576 blocks
10485 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736这需要花些时间,下载软件源,创建iso文件。完成之后,烧录iso CD即可。
『三』使用KVM/qemu测试Live CD管理员权限下:
qemu-kvm -m 512 -cdrom filename.iso若没有KVM,可使用qemu来测试iso镜像文件:
qemu -m 512 --cdrom filename.iso提示,用你创建的LiveCD镜像名称代替filename.iso即可。若没有qemu/kvm,需先用yum安装。