home *** CD-ROM | disk | FTP | other *** search
/ Login Magazine 68 / LoginMagazineNo68.bin / ZipSlack / fourmeg.README < prev    next >
Text File  |  1999-11-04  |  3KB  |  67 lines

  1.  
  2. Introducing fourmeg.zip:
  3.  
  4. fourmeg.zip is an add-on for ZipSlack which creates an 8 megabyte swap file
  5. in your \LINUX directory.  This allows ZipSlack to boot on a machine that only
  6. has 4 megabytes of RAM.  (at least it might...)  Even if you have more
  7. RAM in your machine, you might still want to add this package.  For example,
  8. you might need swap space if you add the X Window System to ZipSlack (see the
  9. FAQ.TXT for more information on this), and adding fourmeg.zip provides a nice
  10. example of how to make a Linux swap file.
  11.  
  12. Note that the 2.2.12 kernel is quite a bit larger than version 2.0 was, so you
  13. may also need to replace the default kernel with one from the kernels/bare.i/
  14. or kernels/lowmem.i/ directories.  See the FAQ.TXT for more information on
  15. selecting a different kernel (the Q/A about "What if the machine halts at
  16. boot").
  17.  
  18. Installing fourmeg.zip:
  19.  
  20. To install fourmeg.zip, simply unzip the file in DOS/Windows on the same 
  21. partition where you unzipped ZipSlack.  (Be sure to unzip zipslack.zip FIRST!)
  22. It will overwrite a few files in \LINUX such as \linux\etc\fstab, and will 
  23. add an 8 megabyte swap file.  If you've only got 4 megabytes of RAM, you may
  24. also wish to disable any shadow RAM in your machine's BIOS settings to make 
  25. the maximum amount of RAM available to Linux.
  26.  
  27. How it works (for the technically curious):
  28.  
  29. fourmeg.zip does the trick by adding this file to your Linux system:
  30.  
  31. -rw-r--r--   1 root     root      8388608 Jul 30 19:04 swapfile
  32.  
  33. This file is used for swap space.  If you've got an 8 megabyte swap file
  34. and 4 megabytes of real RAM, then you'll have 12 megabytes of virtual 
  35. memory available for Linux.  This line in /etc/fstab tells the kernel to
  36. activate the swap space at boot time:
  37.  
  38. /root/swapfile        swap     swap        defaults   0   0
  39.  
  40. As shipped, the file is mostly filled with zeroes, and this is why the
  41. fourmeg.zip file can be compressed so efficiently. :^)  In fact, the
  42. file is generated from the /dev/zero device (a never-ending supply of
  43. zeros) using the 'dd' utility.  It is then formatted using the 'mkswap'
  44. program.  Here's how to make a swap file manually:
  45.  
  46. dd if=/dev/zero of=swapfile bs=1024 count=8192
  47. mkswap swapfile
  48. sync
  49.  
  50. If you need a larger swapfile, simply increase the value of 'count'.
  51.  
  52. To activate a swapfile manually, you can use 'swapon':
  53.  
  54. swapon /root/swapfile
  55.  
  56. Or, to have it made active with every boot, make sure there's a line for
  57. it in your /etc/fstab like this one:
  58.  
  59. /root/swapfile        swap     swap        defaults   0   0
  60.  
  61. Have fun!
  62.  
  63. ---
  64. Patrick Volkerding
  65. volkerdi@mhd1.moorhead.msus.edu
  66. volkerdi@ftp.cdrom.com
  67.