home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 22690 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  6.2 KB

  1. Xref: sparky comp.os.linux:22690 comp.os.linux.announce:101
  2. Newsgroups: comp.os.linux,comp.os.linux.announce
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!db.TC.Cornell.EDU!mdw
  4. From: mdw@db.TC.Cornell.EDU (Matt Welsh)
  5. Subject: LILO Quick Start Guide
  6. Message-ID: <1993Jan4.221031.7124@tc.cornell.edu>
  7. Followup-To: poster
  8. Keywords: LILO start quick fun
  9. Sender: news@tc.cornell.edu
  10. Nntp-Posting-Host: db.tc.cornell.edu
  11. Organization: Jim's Burger Hut 
  12. Date: Mon, 4 Jan 1993 22:10:31 GMT
  13. Approved: linux-announce@tc.cornell.edu (Matt Welsh)
  14. Lines: 128
  15.  
  16. [Yep, I'm posting this to c.o.l.a, because this is one of those things that
  17. 'everyone should see'. I encourage other postings of this nature. -mdw]
  18.  
  19.     LILO: QUICK START GUIDE/FAQ
  20.     A Fun Guide by Matt Welsh (mdw@tc.cornell.edu)
  21.     Thanks a lot to makis@helios.unl.edu.
  22.  
  23. I see lots of people who are having problems getting LILO set up on their
  24. system. Basically, LILO will let you boot MS-DOS, Linux, or whatever you
  25. want on different partitions on your drive, and let you choose at bootup
  26. time what partition to boot. But, LILO does *much* more than just this, 
  27. and that's why the docs are rather long and detailed. I think what a lot
  28. of people use for LILO for is chooing between something like MS-DOS and
  29. Linux at bootup time on their hard drives. So, here's a "quick start" guide
  30. to give you the scoop on how to do this with LILO.
  31.  
  32. You need the most recent version of LILO (version 7), and a kernel that's
  33. at least 0.97.pl2. You can get LILO.7 on tsx-11 or Sunsite, they're pretty
  34. easy to find. I don't know what version of LILO is on the current SLS
  35. release.
  36.  
  37. The LILO.7 package contains the sources only. You need to do a 'make' to
  38. compile the programs and a 'make install' to copy LILO to the directory
  39. /etc/lilo on your system. 
  40.  
  41. You need to create the following files in /etc/lilo:
  42.     - config (tells LILO how to set up your boot record)
  43.     - disktab (tells LILO about the physical partitions that
  44.       you're booting)
  45.     - install (runs LILO on the 'config' program)
  46.  
  47. In the file /etc/lilo/config, you have stanzas for each partition that you
  48. want to boot, giving the partition name, the file to boot from, and so on.
  49. At the top of the config files you specify the drive to boot, the map file
  50. and boot file to use (which should be /etc/lilo/map and /etc/lilo/boot.b, 
  51. respectively), and other global options.
  52.  
  53. Here's what my /etc/lilo/config files looks like. The notes after '#'
  54. are comments.
  55.  
  56. -------------------------------------------------------------------------------
  57. # Tell LILO to set the boot record on the drive /dev/hda. If you boot
  58. # from a drive other than /dev/hda, set it here instead.
  59. boot = /dev/hda
  60.  
  61. # Tell LILO to perform some optimization.
  62. compact 
  63.  
  64. # Tell LILO to use the boot file /etc/lilo/boot.b. Unless you're hacking 
  65. # things heavily this is the only boot file you want to use.
  66. install = /etc/lilo/boot.b 
  67.  
  68. # Tell LILO to use the map file /etc/lilo/map. The map file tells LILO where
  69. # to look for partitions, and it's updated when you run LILO. You can give
  70. # any name you want here, but /etc/lilo/map is the canonical name.
  71. map = /etc/lilo/map 
  72.  
  73. # This stanza tells LILO to boot the file /Image on /dev/hda2, using the label
  74. # 'linux'. Since it's the first boot entry here, it's also the default.
  75. image = /Image
  76.   label = linux
  77.   root = /dev/hda2
  78.  
  79. # This stanza is for an 'old' kernel image in the file /Image.old, on
  80. # /dev/hda2. This is for backup purposes... if you build a new kernel and
  81. # it won't boot for some reason, you can copy your old kernel to /Image.old
  82. # and boot from it.
  83. image = /Image.old
  84.   label = linux-old
  85.   root = /dev/hda2 
  86.  
  87. # This stanza is for booting MS-DOS from /dev/hda1.
  88. other = /dev/hda1       # this is for the msdos partition
  89.   table = /dev/hda
  90.   label = msdos
  91. -------------------------------------------------------------------------------
  92.  
  93.  
  94. This is the file /etc/lilo/install. You run this to install LILO (not the
  95. same thing as doing a 'make install', which only copies the LILO software to
  96. /etc/lilo). 
  97.  
  98. -------------------------------------------------------------------------------
  99. #!/bin/sh
  100. /etc/lilo/lilo -C /etc/lilo/config $@
  101. -------------------------------------------------------------------------------
  102.  
  103. And here's the file /etc/lilo/disktab, where you put an entry for each 
  104. partition and drive you plan to boot (in this case, one each for /dev/hda, 
  105. /dev/hda1, and /dev/hda2). The given device numbers (0x300, etc) are for
  106. IDE drives; for SCSI drive you use 0x800, 0x801, and so on (I think-- check
  107. the full LILO documentation). The sec/track and other information is given
  108. by your machine's CMOS (and fdisk may be able to give it to you as well, if
  109. you don't remember it offhand). The partition offset if given by Linux at
  110. bootup time.
  111.  
  112. Note that you only need to describe partitions in this table that you plan
  113. to boot from. Also, you don't need any entries for floppies if you use LILO
  114. to boot from floppy.
  115.  
  116. See the full LILO docs to figure out what you should put in this table!
  117.  
  118. -------------------------------------------------------------------------------
  119. # Dev.  BIOS    Secs/   Heads/  Cylin-  Part.
  120. # num.  code    track   cylin.  ders    offset
  121. 0x300   0x80    17      10      980     0       # /dev/hda
  122. 0x301   0x80    17      10      980     17      # /dev/hda1
  123. 0x302   0x80    17      10      980     23630   # /dev/hda2
  124. -------------------------------------------------------------------------------
  125.  
  126. This works for me, but I don't guarantee it will work for you. If you've done
  127. everything right running /etc/lilo/install should install LILO and Voila!
  128. you can boot from your hard drive. LILO will boot by default the first 
  129. partition given in the config file; if you hold down shift, capslock, or
  130. control at boot time Lilo will ask you what partition you want to boo (by
  131. name, such as "linux", "old-linux", and so on). There are MANY other options
  132. and things you can do in the config file; this is just a basic setup.
  133.  
  134. Werner's put a lot of work into this program, and it shows... this quickie 
  135. doc should get you started. NOW go back and read the full LILO documentation 
  136. to make sure you understand everything, keeping the above in mind. 
  137.  
  138. Good luck!
  139.  
  140. mdw
  141. -- 
  142. Matt Welsh     mdw@tc.cornell.edu     Cornell Theory Center
  143.   "It's a Katana, ya Midwestern computer geek." --Tom Payne
  144.