|
The Shrink WrapThe final stage, now that you have a working movie player, is to shrink it down so it will run from memory, allowing you to spin down the disk, and get some peace and quiet. You may need to uninstall some packages, and remove any downloaded files in order to reduce the amount of disk space you are using. You can check your disk space withdf -h . One point to remember is that that the amount of space you are using will likely be less in a RAM disk, as most hard disk partitions use a 4k block size, whereas the disk image will likely only use a 1k block size, so less space will be wasted at the end of files. My disk usage went from 219MB on a 4k block size partition to just 167Mb on a 1k block size disk image.
To create the disk image, check out the instructions on Linux on Compact Flash remembering we are creating the image on a hard disk partition rather than a separate CF card. Once the image is created, it's easiest to leave the file there after compression, so you don't need to recreate it every time you want to update something. Use Now is the moment you'll want to add more memory. You need enough for the kernel, the compressed image and the uncompressed image, so if you have a 170MB disk image, which compresses down to 75MB you need just over 245MB of RAM. Once the ramdisk is loaded the memory storing the compressed image is freed up, giving you 75MB of free memory. In this scenario you might just get away with 256MB of RAM, but it depends on how small you've been able to trim your linux install. There are some small Linux Distros that might work well here. Now for the moment of truth, reboot the machine. With any luck you should see it loading the compressed disk image, then pause while it unzips it into a RAMDISK. A common mistake I make is to create a 200MB image, and then try to load it into a 200000K ramdisk, rather than a 204800 ramdisk, so check the original disk image is at least smaller than the ramdisk. If it hangs at this stage then either you have insuffient ram to hold the compressed image, ramdisk and kernel or, the ramdisk is too small. The SilenceNow is a good time to recheck that it is playing the videos ok, you may be suprised how zippy linux is running completely from memory with no disk access at all. Once running use thehdparm -y /dev/hda command to spin down the disk. Notice how quiet it is? Wasn't all that work worth it?
If you re-mount the disk drive it should spin up. To save changes, mount the fat32 partition, mount to uncompressed image, and update the files, then unmount the image, compress is with gzip as above, and reboot. You will probably want to add startup and helper scripts to spin down the disk, and mount and fileshares on your PC so you can quickly access those videos. Once you have a working system, you can then add pine or mutt so you can read your emails, or any other tools you want. This is a working linux install after all, not just a dumb lan enabled dvd player.
|
|||
© 2003-2010 silent.gumph.org |