{"id":251,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:01","modified_gmt":"2020-08-22T20:26:01","slug":"this-is-the-page-title-toplevel-86","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=251","title":{"rendered":"Installing Your Kernel"},"content":{"rendered":"\n<title>Installing Your Kernel<\/title>\n<question id=\"188\" text=\"After a kernel is rebuilt it is usually 'activated' with which command?\" \/>\n<concept id=\"146\" description=\"After a kernel is rebuilt it is usually 'activated' with the 'lilo' command.\" \/>\n<p>\nOnce you have rebuilt your <glossary>kernel<\/glossary>,  you must install it to be able to <glossary>boot<\/glossary>\nit. Because it is the\nsimplest to use and available on all current distributions, I am only going to talk about the Linux\nLoaded (LILO) as a method to install your <glossary>kernel<\/glossary>.\n<\/p>\n<p>\nLILO is actually a general-purpose boot\nmanager that can <glossary>boot<\/glossary>\nalmost every OS that you installed on your system. LILO normally is run from\nthe hard disk, but you can configure it to run from a floppy as well. LILO can act as a primary boot\nloader (that is, it is started from the master <glossary>boot<\/glossary>\nblock) or a secondary loader (started by the\nprimary loader).\n<\/p>\n<p>\nThere are some problems when you run OS\/2 or NT because they have their own\nboot managers. Therefore you will probably have to use their manager as the primary <glossary>boot<\/glossary>\nloader and have LILO on the Linux <glossary>partition<\/glossary>\nto <glossary>boot<\/glossary>\nLinux.\n<\/p>\n<question id=\"189\" text=\"What is the configuration file for the Linux loader (lilo)?\" \/>\n<p>\nLILOs configuration is in <file type=\"\">\/etc\/lilo.conf<\/file>,\nwhich is a text\nfile that can be edited with any text editor (vi, emacs, etc.). On many systems,\nthere is a configuration program liloconfig, which will prompt you for some basic configuration\nparameters that are then written to <file type=\"\">\/etc\/lilo.conf<\/file>.\n<\/p>\n<p>\nTo get a better idea of what this is all\nabout, lets look at the lilo.conf file from one of my systems with a Linux and <glossary>DOS<\/glossary>\nfile system. (Most of this was the default.)<\/p>\n<filecontents type=\"\">\n# Modified by YaST2. Last modification on Fri Nov  9 16:27:26 2001\ndisk=\/dev\/hda\n    bios=0x80\n    disk=\/dev\/hdb\n    bios=0x81\n    disk=\/dev\/hdc\n    bios=0x82\n    disk=\/dev\/sda\n    bios=0x83\nboot = \/dev\/hda\nvga = 791\nread-only\nmenu-scheme = Wg:kw:Wg:Wg\nlba32\nprompt\ntimeout = 80\nmessage = \/boot\/message\n    image = \/vmlinuz\n        label = linux_vm\n        root = \/dev\/hda4\n        initrd = \/boot\/initrd\n        append = &#8220;enableapic vga=0x0317&#8221;\n    image = \/boot\/vmlinuz\n        label = linux2\n        root = \/dev\/hda4\n        initrd = \/boot\/initrd\n        append = &#8220;enableapic vga=0x0317&#8221;\n    image = \/vmlinuz\n        label = linux3\n        root = \/dev\/hdb7\n        initrd = \/boot\/initrd\n        append = &#8220;enableapic vga=0x0317&#8221;\n    image = \/boot\/vmlinuz.suse\n        label = failsafe\n        root = \/dev\/hda4\n        initrd = \/boot\/initrd.suse\n        append = &#8220;disableapic ide=nodma apm=off&#8221;\n        optional\n    image = \/boot\/memtest.bin\n        label = memtest86\n    other = \/dev\/hda1\n        label = windows\n<\/filecontents>\n<question id=\"191\" text=\"Lilo can boot operating systems on different drives as well as different partitions.\" \/>\n<concept id=\"147\" description=\"Lilo can boot operating systems on different drives as well as different partitions.\" \/>\n<p>\nThe first part of the file are the basic configuration parameters. The\nboot line defines the device that LILO should install itself onto, in this case, device <device>\/dev\/hda<\/device>,\nwhich is the master boot block. If you wanted to install lilo on a different partition, maybe to use\na commercial boot manager, you might specific <device>\/dev\/hda2<\/device>, which is the second\n<glossary>partition<\/glossary> of the first drive. Note that this is what it is on an <glossary>IDE<\/glossary>\ndrive; on an SCSI drive, the device would be <device>\/dev\/sda2<\/device>.\n<\/p>\n<p>\nThe delay line specifies the number of\n<i>tenths<\/i> of seconds LILO should wait before booting the first image. Here we have 80, so this\nmeans 8 seconds. The <glossary>VGA<\/glossary>\nline specifies the <glossary>text<\/glossary>\nmode the system should use when booting. Normal\nmeans to select 80&#215;25 <glossary>text<\/glossary>\nmode. The <glossary>ramdisk<\/glossary> line specifies the size of the <glossary>RAM<\/glossary>\ndisk to create; in this case, it won&#8217;t be created because the size is 0.\n<\/p>\n<p>\nNext is the section that defines a\nparticular OS to <glossary>boot<\/glossary>.\n The image line specifies the image to load. In the first case, this is the\nfile vmlinuz in the root file system. Next we define the root file system; here it is the device\n<device>\/dev\/hda4<\/device>, which is the fourth <glossary>partition<\/glossary>\non the first disk.\n<\/p>\n<question id=\"190\" text=\"When the lilo prompt is displayed, which key will show you the available boot options?\" \/>\n<p>\nThe label is the name you use to specify which OS you want to <glossary>boot<\/glossary>. In the\nfirst example, it is called linux_vm (which tells me that this kernel is configured to run VMWare.\nAlso, when the LILO prompt comes, press TAB to display this label, in this case, Linux. The next\nline says the root file system should be mounted read-only. This seems to contradict logic and\nexperience because the root file system ought to be writable. Actually, this is only used for\nchecking when the system first boots; later, other routines will remount the file system as\nread-write.\n<\/p>\n<p>\nIn the last section is the description for the <glossary>DOS<\/glossary>\/<glossary>Windows<\/glossary>\n<glossary>partition<\/glossary>,\nwhich is on the first partition on the first drive, <device>\/dev\/hda1<\/device>.\n<\/p>\n<p>\nWhen the lilo.conf file is set up as you want, you need to run <command>\/sbin\/lilo<\/command> to\ninstall it. If you are using Windows NT, which likes to take control and prescribe everything, you\nwill need to configure LILO as a &#8220;secondary&#8221; <glossary>boot<\/glossary>\nloader. You can also do this if you\ndon&#8217;t want LILO to be your <glossary>boot<\/glossary>\nmanager.\n<\/p>\n<p>\nIf LILO is installed as your master <glossary>boot<\/glossary>\nrecord, you can &#8220;remove&#8221; it by overwriting the <glossary>MBR<\/glossary>.\nFrom <glossary>DOS<\/glossary>, you can remove it with\n<\/p>\n<commandexample command=\"fdisk\">fdisk \/mbr<\/commandexample>\n<p>\nThe original <glossary>boot<\/glossary> block is stored in the \/boot directory as either boot.3?? for\n<glossary>IDE<\/glossary> drives or boot.8??\nfor <glossary>SCSI<\/glossary>\ndevices, where ?? is the device where the master <glossary>boot<\/glossary>\nblock was. You can then use the dd command to copy it back to the hard disk. The syntax of dd\nfollows:\n<\/p>\n<p>\n<commandexample command=\"dd\">dd if=input_file of=output_file  bs=block_size count=block_count<\/commandexample>\n<p>For example:<\/p>\n<p>\n<commandexample command=\"dd\">dd if=\/boot\/boot.0300 of=\/dev\/hda bs=446 count=1<\/commandexample>\n<\/p>\n<p>\nAlthough the size of the file in <directory>\/boot<\/directory> is 512 bytes, only the first\n446 contain information. You need to be very careful here. If you make a mistake, for example,\ncount=10, you can overwrite important information on the first <glossary>partition<\/glossary>.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Your Kernel Once you have rebuilt your kernel, you must install it to be able to boot it. Because it is the simplest to use and available on all current distributions, I am only going to talk about the &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=251\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-251","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=251"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/251\/revisions"}],"predecessor-version":[{"id":586,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/251\/revisions\/586"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}