Cloop

From MorphixWiki

Jump to: navigation, search

deldarol zelacdar Cloop is a Linux kernel module that enables compressed loopback filesystem support. With it you can mount a compressed filesystem like a block device and seamlessly decompress its data while accessing it.

It is used in the Knoppix Linux Live CD to put 2-3 GB of software on a 650MB cdrom: the filesystem has been compressed into the file "/KNOPPIX/KNOPPIX", and is mounted by the initial init process by using a special "cloop" driver module.

When booting Knoppix this happens: The "boot.img" file written into the iso file loads the linux kernel from the emulated floppy disk, loading the initial ramdisk. The linuxrc process loads the "cloop.o" driver module, and searches for a file "/KNOPPIX/KNOPPIX" on all attached devices with a known filesystem. Yes, it should be possible to boot the compressed knoppix even from a hard disk. But I've never tested that. After finding a device with the compressed filesystem, it becomes mounted, and hardware detection and all the other things start.

The floppy disk "boot.img" does not care about from where it boots (drive, emulated), so it's rather simple to integrate it into our multi boot cdrom: copy "boot.img" in the "images/" directory, and add a hotkey in "bscript.i

The boot process mounts "/KNOPPIX/KNOPPIX" with "cloop". We already know "loop" - we use it to mount a filesystem file. '"cloop" is a "loop" with (de)compression' (Compressed Loopback Device).

Cloop is also available as a Debian kernel package.

[edit] External links

Personal tools