home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 15 / boot-disc-1997-11.iso / Debian / Tools / LODLIN16.ZIP / LODLIN16 / DOC / ANNOUNCE.TXT next >
Text File  |  1996-03-31  |  7KB  |  159 lines

  1. NOTE: This was the annoncement on linux-kernel of bzImage+initrd
  2.       Starting with kernel version 1.3.73 bzImage+initrd is part of the
  3.       official kernel.
  4.       YOU NEED NOT TO APPLY THE PATCH
  5. -------------------------------------------------------------------------
  6.  
  7. From lermen@elserv.ffm.fgan.deWed Mar  6 11:10:17 1996
  8. Date: Wed, 6 Mar 1996 11:09:46 +0100 (MET)
  9. From: Hans Lermen <lermen@elserv.ffm.fgan.de>
  10. To: linux-kernel@vger.rutgers.edu
  11. Cc: Werner Almesberger <almesber@lrc.epfl.ch>
  12. Subject: PATCH: Linux high in the sky and more
  13.  
  14. Hi,
  15.  
  16. this is a patch that adds direct loading of kernels above 1 MB, support for
  17. an initial RAM disk that is loaded by the boot loader and that can be
  18. mounted as root before the "real" root is mounted, plus a few minor fixes
  19. to make LOADLIN work better, particularly in W95 environments. The initial
  20. RAM disk feature (we call it simply "initrd") should help to confine the
  21. number of prebuilt kernels a distribution has to come with to something
  22. reasonable, i.e. one.
  23.  
  24. All these features will be supported in the next versions of LILO and
  25. LOADLIN, which both are essentially ready to be released.
  26.  
  27. The features are in detail:
  28.  - kernels can be loaded directly above 1 MB, which removes the 0.5 MB
  29.    compressed size restriction. This also works with dd'ed floppy boot.
  30.  - a file (e.g. a RAM disk image) can be loaded by the boot loader and is
  31.    then available to the kernel, e.g. for mounting
  32.  - when such a RAM disk is mounted on /, a special initialization program
  33.    /linuxrc is executed. When it terminates, the RAM disk can be unmounted
  34.    (or "moved" to a different mount point) and the "real" root FS is mounted.
  35.    The root FS device can be altered from within that environment.
  36.  - no loading restrictions when using LOADLIN under Windows 95 (the 0x90000
  37.    segment is mostly occupied by W'95 )
  38.  
  39. Attached is a detailed description of what the patch does. The patch itself
  40. (for 1.3.71) can be found at
  41. ftp://lrcftp.epfl.ch/pub/people/almesber/lilo/bzImage+initrd-1.3.72.patch.gz
  42. and
  43. ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/bzImage+initrd-1.3.72.patch.gz
  44.  
  45. Since the first announce of this patch in mid-February, some additional
  46. features have been included, bugs have been fixed and documentation has been
  47. added. We think it is stable enough to be included in the mainstream kernel.
  48.  
  49.  
  50. Cheers, Werner & Hans
  51.  
  52. ---------------------------------- cut here -----------------------------------
  53.  
  54. Loading of big kernels (1 MB compressed)
  55. ----------------------------------------
  56.  
  57. We call the new kernel format bzImage (big-zImage), and in fact it's the
  58. the old zImage kernel with the following changes:
  59.  
  60. 1. The gunzip code (arch/i386/boot/compressed/misc.c) will now be linked at
  61.    0x100000. Because it would overwrite itself while decompressing, the
  62.    first part of the decompressed data is written to low mem. When low mem
  63.    becomes exhausted, then the rest is put behind __end. When decompression
  64.    has completed, then a small move routine is copied down to low mem,
  65.    which then moves the kernel at its proper place. This technique has the
  66.    advantage that it needs the fewest changes to the old zImage.
  67.  
  68. 2. The arch/i386/boot/setup.S has gotten a header, which from the kernel's
  69.    point of view is always located at 0x90202. This header contains
  70.    information used to coordinate the operation of loaders and the kernel
  71.    (e.g. to detect inconsistencies).
  72.  
  73. 3. Because the kernel size is given as a 16 bit value (segment format) in
  74.    the bootsector, the compressed size of the bzImage is limited to 0xffff0
  75.    Bytes (~1MB). Given a compression ratio of 1:2, which is quite
  76.    realistic, the decompressed kernel can be about 2 Meg.
  77.  
  78.  
  79. Loading of ramdisk directly by the loaders
  80. ------------------------------------------
  81.  
  82. With the same technique used for the kernel, also a ramdisk image can be
  83. loaded high. The image is loaded directly below mem_end. The start address
  84. and the size are put into the setup.S header so the kernel can find the
  85. data. The pages used by the image are marked "in use" and are freed later,
  86. when no longer needed.
  87.  
  88. We've extended the RAM disk code to allow loading of a RAM disk from that
  89. data. (Typically, the loaded data will be compressed.) Then, that initrd
  90. can be mounted as root and the executable /linuxrc will be run. /linuxrc
  91. can now access additional media and load modules. (Actually, /linuxrc can
  92. do most things init can do.)
  93.  
  94. When done, /linuxrc terminates, the "real" root file system is mounted
  95. and the initrd is either unmounted or it is "moved" to the mount point
  96. /initrd. Note that, in the latter case, the initrd is not unmounted, so
  97. any open files do not need to be closed, i.e. processes can survive the
  98. root change.
  99.  
  100. This avoids the need to either have a large collection of precompiled
  101. kernels, to re-compile the kernel, or to have a "kernel link set". In
  102. particular, the boot floppy could be self-contained, i.e. no additional
  103. media would be necessary to create a bootable hard disk based system.
  104.  
  105. There are a few other options, like
  106.  - if root=/dev/ram, we boot directly into the RAM disk, using init
  107.  - from within the initrd environment, the root FS device can be changed
  108.    (using /proc/sys/kernel/real-root-dev)
  109.  - if root=/dev/ram _after_ initrd, we simply start init in initrd
  110.  
  111. A detailed description of the initrd technique can be found within
  112. the patch in the file linux/Documentation/initrd.txt.
  113.  
  114.  
  115. Better support for LOADLIN
  116. --------------------------
  117.  
  118. The fact that LOADLIN operates in a DOS/Windows environment adds two
  119. complications:
  120.  
  121.  - the kernel cannot be loaded in physically contiguous memory. Instead,
  122.    LOADLIN has to re-arrange the pages after executing setup (which may have
  123.    to be done in VM86 mode), but before booting the actual kernel
  124.  - segment 0x9000 may be occupied (i.e. under Windows 95), so that the
  125.    setup.S code must run in a different segment
  126.  
  127. For those two reasons, the code32_start has been added to the setup.S
  128. header and setup.S itself has been made position independent. Since
  129. earlier versions of LOADLIN already used a setup header similar to the
  130. one we need now anyway, we've retained compatibility by basing the new
  131. header on the old one.
  132.  
  133.  
  134. Final remarks
  135. -------------
  136.  
  137. Given that many distributions will be based exclusively on the next major
  138. release of Linux for the next year, we think that it is important that
  139. this patch be integrated into 1.4/2.0, although the feature freeze is
  140. already in place.
  141.  
  142. The next versions of LOADLIN and LILO will support the features described
  143. above. Some preliminary test versions are available on
  144. ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/loadlin-1.6-pre11-bin.tgz
  145. and
  146. ftp://lrcftp.epfl.ch/pub/people/almesber/lilo/lilo.18dev3.tar.gz
  147.  
  148. This patch was jointly developed by Werner Almesberger and Hans Lermen.
  149.  
  150. -- 
  151.   _________________________________________________________________________
  152.  / Werner Almesberger, DI-LRC,EPFL,CH   werner.almesberger@lrc.di.epfl.ch /
  153. /_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
  154.  
  155. --
  156.  
  157. Hans Lermen
  158. <lermen@elserv.ffm.fgan.de>
  159.