Changes

Jump to: navigation, search

Creating OpenVZ LiveCD based on Centos 4.4

690 bytes added, 07:18, 3 July 2007
Creating booted LiveCD root filesystem: compatibility to old squashfs added
In order to decompress these images we need <tt>unsquashfs</tt> tool. <tt>squashfs</tt> source archive contains
patches for various kernel versions (to be able to mount <tt>squashfs</tt>), and user-space tools for compressing usual filesytem into <tt>squashfs</tt> filesystem and for decompressing it back. Well, we don't need kernel patches right now (but we will need them later), we only want to install <tt>squashfs</tt> user-space tools:.Here is '''an important''' note. We want, our LiveCD to be able to boot original Centos 4.4 kernel. This original kernel doesn't support<tt>squashfs</tt> of version <tt>3</tt>. Consequently we use <tt>sqashfs2.2-r2</tt> for <tt>mksquasfs</tt> tool, but for <tt>unsquashfs</tt> tool and later for compiling fresh OpenVZ kernels with <tt>squashfs</tt> support we use <tt>sqashfs3.2-r2</tt> sources/patches, because they are back compatible with <tt>sqashfs v2</tt>.
<pre>
# wget http://belnet.dl.sourceforge.net/sourceforge/squashfs/squashfs2.2-r2.tar.gz# tar xzf squashfs2.2-r2.tar.gz# cd squashfs2.2-r2/squashfs-tools/# makecc mksquashfs.o read_fs.o sort.o -lz -o mksquashfs# cp mksquashfs /usr/bin/ # cd ~/workbench/# wget http://switchbelnet.dl.sourceforge.net/sourceforge/squashfs/squashfs3.2-r2.tar.gz
# tar xzf squashfs3.2-r2.tar.gz
# cd squashfs3.2-r2/squashfs-tools/
cc mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o mksquashfs
cc unsquashfs.o -lz -o unsquashfs
# cp mksquashfs /usr/bin/
# cp unsquashfs /usr/bin/
# cd ~/workbench
172
edits

Navigation menu