Re: PXES Using compressed root filesystem (cramfs)
Diego Torres Milano <[email protected]>
| Newsgroups | gmane.linux.pxes.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: >Hi, > >I first must say I have been extremely impressed with how flexible & powerful >PXES has become. Especially been able to easily tweak the configuration using >the Remote Configuration option without having to rebuild the image. > >I was just wondering if anyone has previously looked at using a transparent >compression filesystem for the initrd (root filesystem?) or if there any plans >in the future for PXE to uses a compressed filesystem. > Next release of PXES will include squashfs, I'm testing it. With this filesystem type you will need ~12Mb for the root filesystem and ramdisk (same size). > >I just thought I might share my experience with getting PXES to work with a >compressed root filesystem. > >I had a couple of workstations that had only 32Mb of RAM that I wanted to get >working under PXES. However the most basic configuration of PXES with the >RDesktop client with XFree 4.3.0 weigh in at around 22Mb or (8-9Mb gzipped) >[3.3.6 very limited support for video cards]. Unfortunately the image was too >large and the kernel constantly paniced when attempting to run it under 32Mb. > >I tried manually pulling out drivers from the initrd image (mounting the initrd >image and rm file I didn't think I needed) which helped but didn't help enough. >I worked out that there was only at most 9-10Mb free to run X and the kernel >after the 22Mb ramdisk for the root image. > >What got me thinking was that the difference between the compressed initrd >(root filesystem) image and the uncompressed initrd (root filesystem) was 13Mb. >The ramdisk was obviously using most of the memory available and any savings >there would definately make a huge difference. > >>From past experience I knew there was some worked done on compressed >filesystems in linux. I did some searching and located a couple of options. >cramfs (Supported by the 2.4 kernel natively [Read Only]) >jffs2 (Not yet native in the liunx kernel [Read/Write] Design for Flash memory) > >As cramfs (although read-only) was already supported in the 2.4 kernel I >thought that would be the best to try. I compiled a new kernel 2.4.23 with the >config options for 2.4.20 supplied with PXES + cramfs. > >Mounted the uncompressed loopback initrd image with and ran >mkcramfs /mnt/loop /tftpboot/pxes/pxes-0.7-cramfs.initrd >I ran into problems with the mkcramfs supplied with Redhat 7.3. It wouldn't >properly mount the root filesystem. I was able to locate a new version of >cramfsprogs 1.1 which worked better from sourceforge. > >http://sourceforge.net/projects/cramfs/ > >cramfsprog brought down the initrd image size to around 10Mb. >Which is an instant 12Mb saving as the cramfs initrd image doesn't need >expanding. > >I had to add another parameter to the pxes\pxelinux.cfg\default (Boot file). >ramdisk_blocksize=4096 > >This tells the kernel that the root filesystem is using 4096 (cramfs default) as >the block size instead of the normal 1024 (ext2 default for small filesystems). > >So the default (Boot file) read something like >label 1 > kernel vmlinuz-2.4.23-cramfs.i586 > append ramdisk_size=10000 ramdisk_blocksize=4096 ro >initrd=pxes-0.7-cramfs.initrd root=/dev/ram > >The above append line on one line. > >Booted up a workstation and it worked. I was able to boot XFree 4.3.0 and >rdesktop in 32Mb of RAM. Using the cramfs would had added some overhead but I >was unable to see a significant slowdown (Although I wasn't looking too hard) > >Using cramfs allowed me to run PXES on a 32Mb workstation as now I had 18 - >20Mb of memory available to run the kernel and XFree 4.3.0. > >The biggest downside of using cramfs is that when you build the cramfs image it >is *mostly* a one way process. It is not that simple to make modifications to >the cramfs initrd image (Although I did read that there is a uncramfs util). > Thank you very much for the info. I hope next release solve your problems. > >Daryl, > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >Does SourceForge.net help you be more productive? Does it >help you create better code? SHARE THE LOVE, and help us help >YOU! Click Here: http://sourceforge.net/donate/ >_______________________________________________ >pxes-devel mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/pxes-devel > > -- ______ ________ / / \/ /___ ) I N T E G R A C I O N / / /___ / I N F O R M A T I C A /__/__/\___/_____' Diego Torres Milano Maipu 42 Office 164 - (C1084ABB) Buenos Aires Argentina [email protected] Tel: +5411 4331-2233 Fax +5411 4331-3377 www.in3.com.ar ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/