Posted by Ed on 07/12/2005 @ 6:12 PM
First go check out Steps 1 and 2 if you haven't already at
STEP 1
STEP 2
ok, you should have e2fsprogs downloaded from e2compr's sourceforge site. BTW, if you haven't already, make sure your shell's CFLAGS and CXXFLAGS variables are cleared or at least set to something non-arch specific, like simply -O2.
First read the INSTALL file and make the build directory as shown. Run the following configure command, also create a directory named temp in the build directory that you'll install all the files to.
../configure --disable-nls --enable-fsck --enable-compression --enable-htree --disable-swapfs --disable-debugfs --disable-imager --disable-resizer --prefix=./temp --disable-e2initrd-helper
run make and compile the tree and install it. You should now have all the e2fsprogs you'll need with e2compr support in ./temp. You'll want to copy them over to the / of your chroot. Congratulations, you have ext2 compression support in your WRAP system. Now you'll have to do the kernel compile for your host box so you can compress the CF filesystem that you're going to put in your WRAP box unless you wanna do that all on the WRAP box itself... I suggest the former method, not the latter. C
opy the kernel to another directory so you dont destroy your WRAP tree and configure for your host machine using your last kernel's config to start. Make sure you use the same compression algorithm in both kernels. Also, your host machine's kernel will likely have ext2 as a module, in which case you have no "default" compression so you'll have to load the algorithm module manually when you reboot. It's also a nice idea to have a small ext2 partition or ramdisk so you can move your CF filesystem to it, otherwise you wont be able to compress it on the host machine.
You shouldn't need to install e2fsprogs on your host machine since the CF filesystem should be copied (to ensure you have a backup in case something goes wrong on the ext2 fs) and you'll never need to use fsck, the ext2 fs you use should be empty save for the CF filesystem.
after you reboot, chroot to your CF root and chattr -R +c -m lzo /bin /sbin /home /root /usr /var /etc
Basically any directory in your CF fs but /boot and /tmp and /sys and /proc and /dev . You can pick and choose or change my suggested compressed directories as you wish, but dont compress the ones mentioned above that i listed as such. You should see a compression from ~90MB to around 50MB. If something went wrong it's probably because you diddn't do it on a ext2 fs or you didn't load the compression algorithm module.
Your CF fs should now be ready, you wont need to mess with chattr again since anything copied to a directory that's +c'd gets chattr attributes inherited.
Next step is configuring things like lilo and fstab and init.d