Changes

Jump to: navigation, search

Creating OpenVZ LiveCD based on Centos 4.4

917 bytes added, 14:16, 2 July 2007
Vmlinux, initrd and isolinux.cfg: cdrom modules loading patch added
# cp root/boot/vmlinuz-2.6.18-ovz028stab035.1-smp ovz-livecd/boot/
</pre>
Modify initrd image. More precisely, we just need to add OpenVZ kernel modules thereand apply small patch to <tt>liblinuxlive</tt> file.Mount initrd:
<pre>
# mkdir initrd.d
# gunzip initrd.gz
# mount -o loop initrd mount/
</pre>
Copy modules to initrd:
<pre>
# cp -r ../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>
initrd image, that goes with Centos 4.4 LiveCD doesn't load cdrom kernel modules.
It works well for CentOS kernel, because cdrom support is built-in there.
But OpenVZ kernel supports cdrom (usual ide cdrom) via kernel module.
Consequetnly we need to apply the following patch to <tt>liblinuxlive</tt> file:
<pre>
--- liblinuxlive.orig 2006-08-19 08:53:11.000000000 +0400
+++ liblinuxlive 2007-07-02 17:50:34.000000000 +0400
@@ -337,6 +337,9 @@ modprobe_essential_modules()
{
echolog "starting loop device support"
modprobe_module loop max_loop=32
+ echolog "starting cdrom support"
+ modprobe_module cdrom
+ modprobe_module ide-cd
echolog "starting cdrom filesystem support"
modprobe_module isofs
echolog "starting squashfs support"
</pre>
Finishing actions with initrd:
<pre>
# sync
# umount mount/
# cd ..
</pre>
 
Now we should modify <tt>ovz-livecd/isolinux.cfg</tt> file, that controls <tt>isolinux</tt> boot loader.
We inform boot loader, that new kernel was added by introducing the following changes (in diff format):
172
edits

Navigation menu