home *** CD-ROM | disk | FTP | other *** search
/ Caldera Network Desktop 1.0 / caldera-network-desktop-1.0.bin / doc / HOWTO / mini / LILO < prev    next >
Text File  |  1995-06-05  |  7KB  |  206 lines

  1.                         LILO Mini-HOWTO
  2.  
  3. This file describes some typical LILO installations.
  4. It's intended as a supplement to the LILO User's Guide.
  5. I think examples are informative even if your setup isn't much like mine.
  6. I hope this saves you trouble.
  7.  
  8. Cameron Spitzer, cls@truffula.sj.ca.us
  9.  
  10.  
  11.  
  12. Example 1:
  13. ------- --
  14.     I have two IDE drives, and a SCSI drive.  The SCSI drive can't be
  15. seen from BIOS.
  16. The Linux Loader, LILO, uses BIOS calls and can only see drives that
  17. BIOS can see.  My stupid AMI BIOS will only boot from "A:" or "C:"
  18. My root file system is on a partition on the SCSI drive.
  19.  
  20. The solution:
  21.     Store the kernel, map file, and chain loader in a Linux partition on
  22. the first IDE.  Notice that it is not necessary to keep your kernel on
  23. your root partition.
  24.  
  25. The second partition on my first IDE (/dev/hda2) is mounted on /u2.
  26. Here is the /etc/lilo.conf file I used.
  27.  
  28.  
  29. #  Install LILO's boot record as Master Boot Record
  30. #  on the first IDE.
  31. #
  32. boot = /dev/hda
  33. #  /sbin/lilo (the installer) copies the LILO boot record from the
  34. #  following file to the MBR location.
  35. install = /u2/etc/lilo/boot.b
  36. #
  37. #  I wrote a verbose boot menu.  LILO finds it here.
  38. message = /u2/etc/lilo/message
  39. #  The installer will build the following file.
  40. #  It tells the boot-loader where the blocks of the kernels are.
  41. map = /u2/etc/lilo/map
  42. compact
  43. prompt
  44. #  Wait 10 seconds, then boot the 1.2.1 kernel by default.
  45. timeout = 100
  46. #  The kernel is stored where BIOS can see it by doing this:
  47. #      cp -p /usr/src/linux/arch/i386/boot/zImage /u2/z1.2.1
  48. image = /u2/z1.2.1
  49.     label = 1.2.1
  50. #  LILO tells the kernel to mount the first SCSI partition as root.
  51. #  BIOS does not have to be able to see it.
  52.     root = /dev/sda1
  53. #  This partition will be checked and remounted by /etc/rc.d/rc.S
  54.     read-only
  55. #  The same kernel can be told to mount a different partition as
  56. #  root instead.  I have an emergency root setup on /u2.
  57. image = /u2/z1.2.1
  58.     label = 1.2.1-hda2
  59.     root = /dev/hda2
  60.     read-only
  61. #  I kept an old Slackware kernel lying around in case I built a
  62. #  kernel that doesn't work.  I actually needed this once.
  63. image = /u2/z1.0.9
  64.     label = 1.0.9
  65.     root = /dev/sda1
  66.     read-only
  67. #  My DR-DOS 6 partition.
  68. other = /dev/hda1
  69.         loader=/u2/etc/lilo/chain.b
  70.         label = dos
  71.         alias = m
  72.  
  73.  
  74.  
  75.  
  76. Example 2:
  77. ------- --
  78. The system in my office has a 1GB IDE drive.
  79. The BIOS can only see the first 504 MB of the IDE.
  80. (Where MB means 2**10 bytes, not 10**6 bytes.)
  81. So I have MS-DOS on a 350 MB partition /dev/hda1 and my
  82. Linux root on a 120 MB partition /dev/hda2.
  83.  
  84. MS-DOS was unable to install itself correctly when the drive was
  85. fresh.   Novell DOS 7 had the same problem.
  86. Luckily for me, "Options by IBM" forgot to put the "OnTrack"
  87. diskette in the box with the drive.  The drive was supposed to
  88. come with a product called "OnTrack Disk Manager."  If you only
  89. have MSDOS, I guess you have to use it.
  90.  
  91. So I made a partition table with Linux' fdisk.
  92. MSDOS-6.2 refused to install itself in /dev/hda1.  It said
  93. something like
  94.    'this release of MS-DOS is for new installations.
  95.     Your computer already has MS-DOS
  96.           [which was wrong, the drive was fresh]
  97.     so you need to get anáupgrade release from your dealer.'
  98.  
  99. What a crock!  So I ran Linux' fdisk again and deleted partition 1
  100. from the table.  This satisfied MS-DOS 6.2 which proceeded to
  101. create the exact same partition 1 I had just deleted and installed
  102. itself.  MS-DOS 6.2 wrote its Master Boot Record on the drive, but
  103. it couldn't boot.
  104.  
  105. Luckily I had a Slackware kernel on floppy (made by the Slackware
  106. installation program "setup"), so I booted Linux and wrote LILO
  107. over MS-DOS' broken MBR.  This works.
  108. Here is the /etc/lilo.conf file I used:
  109.  
  110. boot = /dev/hda
  111. map = /lilo-map
  112. delay = 100
  113. ramdisk = 0             # Turns off the ramdisk in the Slackware kernel
  114. timeout = 100
  115. prompt
  116. disk = /dev/hda        # BIOS only sees first 500 MB.
  117.    bios=0x80            # specifies the first IDE.
  118.    sectors = 63         # get these numbers from your drive's documentation.
  119.    heads = 16
  120.    cylinders = 2100
  121. image = /vmlinuz
  122.   append = "hd=2100,16,63"  # This may be redundant.
  123.   root = /dev/hda2
  124.   label = linux
  125.   read-only
  126.   vga = extended
  127. other = /dev/hda1
  128.   label = msdos
  129.   table = /dev/hda
  130.   loader = /boot/chain.b
  131.  
  132. ## end
  133.  
  134. After I installed these systems, I verified that the partition containing
  135. the zImage, boot.b, map, chain.b, and message files can use an msdos
  136. file system, as long as it is not "stackered" or "doublespaced."
  137. So I could have made the DOS partition on /dev/hda1 500 MB.
  138.  
  139. I have also learned that "OnTrack" would have written a partition table
  140. starting a few dozen bytes into the drive, instead of at the beginning,
  141. and it is possible to hack the Linux IDE driver to work around this
  142. problem.  But installing would have been impossible with the precompiled
  143. Slackware kernel.  Eventually, IBM sent me an "OnTrack" diskette.
  144. I called OnTrack's technical support.  They told me Linux is broken
  145. because Linux doesn't use BIOS.  I gave their diskette away.
  146.  
  147.  
  148.  
  149. Example 3:
  150. ------- --
  151. Next, I installed Windows-95 on my office system.  It blew away my nice
  152. LILO MBR, but it left my Linux partitions alone.  Kernels take a long
  153. time to load from floppy, so I made a floppy with a working LILO setup
  154. on it, which could boot my kernel from the IDE.
  155. I made the lilo floppy like so:
  156.   fdformat /dev/fd0H1440     #  lay tracks on virgin diskette
  157.   mkfs /dev/fd0 1440         #  make file system of type minix
  158.   mkdir /3                   #  make a place to mount it
  159.   mount /dev/fd0 /3
  160.   cp -p /boot/chain.b /3     #  copy the chain loader over
  161.   lilo -C /etc/lilo.flop     #  install LILO and the map on the diskette.
  162.   umount /3
  163. Notice that the diskette MUST BE MOUNTED WHEN YOU RUN THE INSTALLER
  164. so that lilo can write its map file properly.
  165.  
  166. This file is /etc/lilo.flop.  It's almost the same as the last one:
  167.  
  168. #  Makes a floppy that can boot kernels from HD.
  169. boot = /dev/fd0
  170. map = /3/lilo-map
  171. delay = 100
  172. ramdisk = 0     # Turns off the ramdisk in the Slackware kernel
  173. timeout = 100
  174. prompt
  175. disk = /dev/hda        # 1 GB IDE, BIOS only sees first 500 MB.
  176.    bios=0x80
  177.    sectors = 63
  178.    heads = 16
  179.    cylinders = 2100
  180. image = /vmlinuz
  181.   append = "hd=2100,16,63"
  182.   root = /dev/hda2
  183.   label = linux
  184.   read-only
  185.   vga = extended
  186. other = /dev/hda1
  187.   label = msdos
  188.   table = /dev/hda
  189.   loader = /3/chain.b
  190.  
  191. ## end
  192.  
  193. Finally, I needed MS-DOS 6.2 on my office system, but I didn't
  194. want to touch the first drive.  I added a SCSI controller and
  195. drive, made an msdos file system on it with Linux' mkdosfs, and
  196. Windows-95 sees it as "D:".   But of course MSDOS will not boot 
  197. off of D:.  This is not a problem when you have LILO.  I added
  198.  
  199. other = /dev/sda1
  200.   label = d6.2
  201.   table = /dev/sda
  202.   loader = /boot/any_d.b
  203.  
  204. to the lilo.conf in Example 2.  MSDOS-6.2 runs, and it thinks
  205. it is on C: and Windows-95 is on D:.
  206.