Changes

Jump to: navigation, search

Creating OpenVZ LiveCD

1,306 bytes added, 08:35, 17 April 2007
Modules add, Initrd modification and iso creation added
That's great, now we have all the tree ready,
let's compress it in the new image using create_compressed_fs tooland copy to the right place:
<pre>
mkisofs -R -iso-level 4 -force-rr -J ./KNOPPIX-content-modif/ > KNOPPIX-modif.img
./cloop-2.05/create_compressed_fs KNOPPIX-modif.img 65536 > KNOPPIX-modif
cp KNOPPIX-modif cd-contents/KNOPPIX/KNOPPIX
</pre>
</pre>
Now you have an aufs.ko file in current directory. Next we need to add these modules to the disc:<pre>cp aufs.ko cloop.ko cd-contents/KNOPPIX/modules/</pre>  When booting KNOOPIX uses initrd image,where it stores some kernel modules required to get access to the CD-drive.We need to remove old modules and add new one to initrd image. Extracting andmounting initrd:<pre>mkdir initrdcd initrdcp cd-contents/boot/isolinux/minirt.gz ./gunzip minirt.gzmkdir mntmount -o loop minirt mnt</pre> The modules directory on initrd contents kernel modules. Now we should replace these modules byequivalents from OpenVZ kernel. Note, that some modules are already build in OpenVZ kernel,so they are missing. After this operation is done copy new minirt.gz to the appropriate place:<pre>umount mntgzip minirtcp minirt.gz ../cd-contents/boot/isolinux/cd ..</pre>
The last step is to copy vmlinuz to isolinux directory:
<pre>
cp vmlinuz-2.6.18-8.el5-028stab027 cd-contents/boot/isolinux/linux
</pre>
 
Wow! We're ready to create is with KNOPPIX OpenVZ CD:
<pre>
chmod -R u+w cd-contents
rm cd-contents/boot/isolinux/boot.cat
mkisofs -b boot/isolinux/isolinux.bin -o KNOPPIX_V5.1.1-OPENVZ-CD-2007-01-04-EN.iso -no-emul-boot -l -J -r -boot-load-size 4 -boot-info-table KNOPPIX_V5.1.1CD-2007-01-04-EN.iso-content
</pre>
== Result ==
[todo]
== Links ==
172
edits

Navigation menu