Hi! Wrote this small howto for making compressed CD's in Linux. New users will certainly appreciate the fact Linux provides much more features than just security,stability and speed as compared to other popular OS'es.
Making Compressed CDROM in Linux
Nikhil Joshi
Introduction
I had often wondered whether there is a way to zip your files, burn them on a CD and then decompress them on-the-fly to save space. Well the good news is there is a method to do the same! Linux provides a Transparent decompression extension to achieve the same. It is useful when you have a lot of text/HTML/ doc files to burn on the CD and you want to save the precious space. It is especially useful to view the e-books which are mostly in HTML format.
Prepare the Kernel
CAVEAT: Please note that the CD that we are going to make will only be readable in Linux environment as Windows does not have the Transparent decompression extension. First we have to enable the Transparent decompression extension in the kernel. Compiling the kernel is a tricky business and requires patience and will to learn something new. This link will certainly help you:
http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html
I'll outline the steps below:
1. Download and unpack the latest 2.6 series stable kernel from http:// www.kernel.org/ 2. Type make menuconfig 3. Goto File Systems -> CDROM/DVD Filesystems and enable Transparent decompression extension 4. make; make modules; make modules_install 5. Copy the bzImage to /boot and update the bootloader configuration appropriately
The commands
Now that we have the kernel ready let's see the commands. Put everything you want to compress in a directory. First we make a compressed directory hierarchy of the directory we want to compress.
$ mkzftree intree outree
creates a compressed directory (outree) out of a normal directory (intree). Now we will make an iso image out of the directory hierarchy.
$ mkisofs -o mycd.iso -R -allow-lowercase -allow-multidot -l -L - z outree
That's it!! We have created an iso file which we can burn using any CD Burning Software. I use k3b (http://www.k3b.org/) on Linux.
Conclusion
I created a normal iso image out of a directory tree and another iso image out of the compressed directory tree. The space savings were obvious: 591MB for normal iso and 448MB using compression. A gain of 143 MB. This directory tree had lots of PDF files which do not compress well as compared to ASCII text files. Overall the space saving was considerable and I am already a fan of Transparent decompression.
Hi Nikhil,
Excellent work. Keep it up.
GLUG Site maintainer(s), please put this howto on our site.
Some small corrections follows.
On Fri, 2004-11-05 at 07:55, Nikhil Joshi wrote:
- Type make menuconfig
- Goto File Systems -> CDROM/DVD Filesystems and enable Transparent decompression extension
Can be compiled as module?
- make; make modules; make modules_install
make bzImage && make modules && make modules_install
- Copy the bzImage to /boot and update the bootloader configuration appropriately
$ mkzftree intree outree
Is the command mkzftree is part of main stream distro? If not, where to get and how to install it?
creates a compressed directory (outree) out of a normal directory (intree). Now we will make an iso image out of the directory hierarchy.
$ mkisofs -o mycd.iso -R -allow-lowercase -allow-multidot -l -L - z outree
May be Nikhil will answer and update us on the above questions.
Once again, Great work Nikhil, keep it up. With regards,
On Fri, 5 Nov 2004, Dinesh Shah wrote:
Excellent work. Keep it up.
thanks a ton :-)
- Type make menuconfig
- Goto File Systems -> CDROM/DVD Filesystems and enable Transparent decompression extension
Can be compiled as module?
no there is no option of compiling as module.
$ mkzftree intree outree
Is the command mkzftree is part of main stream distro? If not, where to get and how to install it?
oops, forgot to mention that. In gentoo it is in zisofs-tools.
http://www.kernel.org/pub/linux/utils/fs/zisofs
I think this will be a part of a standard distro. Can users of other distros verify the same please?
Dear Mr. Nikhil,
I am having a linux PC running RH9 with 4.3 GB Hdd. I am using it for Internet sharing.
I need some help on backup and Restore. What are methods or commands I can use for backup? Can I backup entire HDD ? I mean everything on HDD including volumes How do I restore ? What all precaution I should take while backup and restore? What is fastest method to get PC up and running after crash and after restore?
Please suggest some links too so i can get more info.
The world only goes round by misunderstanding.
Regards,
Bhavesh
www.bhaveshg.com bginfotech
--------------------------------- Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com/a
*comments inline*
Bhavesh wrote:
Dear Mr. Nikhil,
I am having a linux PC running RH9 with 4.3 GB Hdd. I am using it for Internet sharing.
I need some help on backup and Restore. What are methods or commands I can use for backup?
best I think will be rsync, since it will preserve data perms too... do man rsync and check out for the options.... u can tar and store ur data on some other media over the network also.... can be used as a Cron job also... so u need not run it manually....(unless u want to),...
Can I backup entire HDD ? I mean everything on HDD including volumes
if u mean disk images, I am sure u can but I don't know any command/third party tool that lets u do that in Linux... but otherwise rsync will let u do that also....
How do I restore ?
as simple as untar-ing the tar files (as root) and copying them (preserving permissions) to where they belong....
What all precaution I should take while backup and restore?
If it is a multiuser system (assuming that it is), file perms are of importance, since after a restore u don't want everything becoming (in)accessible to all... also backups are best taken on a different media (I mean a diff physical media, not logical drive or something).... rsync should solve ur probs in that also.....
What is fastest method to get PC up and running after crash and after restore?
not too sure abt this one.... have used rsync effectively.... don;t know if anything else is more stable and/or faster.....
Please suggest some links too so i can get more info.
don;t have anything at hand.... tried google ???
The world only goes round by misunderstanding.
Regards,
Bhavesh
www.bhaveshg.com bginfotech
regards, Priyam. -=-=- ... "I think there is a world market for maybe five computers." - Thomas Watson (1874-1956), Chairman of IBM, 1943
On Fri, 5 Nov 2004, Bhavesh wrote:
Can I backup entire HDD ? I mean everything on HDD including volumes How do I restore ?
http://freshmeat.net/projects/g4l/ http://www.partimage.org/