6,534
edits
Changes
m
This part contains detailed description of LiveCD creation. I've removed the output of some
commands in order to simplify the reading.
Note: before proceed with commands below, one needs to disable SE Linux on the host, otherwise rpm operations
in cdroot-ed environment described later on will fail due to inability to restore security file context. So, please,
do:
<pre>
# setenforce 0
</pre>
This will put SE linux in so-called 'permissive' mode, where all the blockers will be substituted by warnings.
If you wanna get rid of the warnings (rather annoying), the only way to do is to edit <tt>/etc/sysconfig/selinux</tt>
to read <tt>SELINUX=disabled</tt> and then reboot the host.
=== Creating booted LiveCD root filesystem ===
<tt>tetex</tt>, <tt>latex</tt>, <tt>k3b</tt> and printing related packages:
<pre>
# cp -r to_booted_livecd/ livecd-root/tmp/# chroot livecd-root/
# rpm -e lksctp-tools-1.0.2-6.4E.1.i386
Clean it:
<pre>
# rm livecd-root/root/.bash_history
</pre>
Here we have to make one step to workaround [[Checkpointing and live migration]] problem. The thing is that at the moment
on this directory:
<pre>
mkdir livecd-root/vz/private/
</pre>
At the moment vzquota doesn't support <tt>tmpfs</tt> ([http://bugzilla.openvz.org/show_bug.cgi?id=558 Bug #558]).
# rm -f ovz-livecd/base/*.mo
# for f in bin etc lib root sbin usr var vz; do \
mksquashfs livecd-root/$f ovz-livecd/base/$f.mo -keep-as-directory; \
done
</pre>
than 8 characters) to kernel image, otherwise <tt>isolinux</tt> will not see it.
<pre>
# cp livecd-root/boot/vmlinuz-2.6.18-ovz028stab035.1-smp ovz-livecd/boot/ovz18
</pre>
Modify initrd image. More precisely, we need to add OpenVZ kernel modules there
Copy modules to initrd:
<pre>
# cp -r ../livecd-root/lib/modules/2.6.18-ovz028stab035.1-smp/ mount/lib/modules/
# rm -rf mount/lib/modules/2.6.18-ovz028stab035.1-smp/build # we don't neet it on initrd image
</pre>
# umount mount/
# gzip initrd
# /bin/cp initrd.gz ../ovz-livecd/boot/initrd.gz
# cd ..
</pre>