{"id":230,"date":"2010-08-11T11:02:58","date_gmt":"2010-08-11T10:02:58","guid":{"rendered":"http:\/\/kb.toderu.ro\/?p=230"},"modified":"2010-08-11T11:02:58","modified_gmt":"2010-08-11T10:02:58","slug":"grub-kernel-init-scripts-and-services-on-centosredhatfedora","status":"publish","type":"post","link":"https:\/\/kb.toderu.ro\/?p=230","title":{"rendered":"grub, kernel, init scripts and services on centos\/redhat\/fedora"},"content":{"rendered":"<p>\t\t\t\tGRUB Components and Configuration<br \/>\n      1st Stage<br \/>\n      Small, added to MBR or boot sector during installation<br \/>\n           Use \/sbin\/grub-install to repair<br \/>\n      2nd Stage<br \/>\n            Loaded from filesystem containing \/boot<br \/>\n            Configured in \/boot\/grub\/grub.conf<br \/>\n      To boot Linux: title, kernel, root filesystem, and initial ramdisk<\/p>\n<p>Kernel Initialization<br \/>\n     Kernel boot time functions<br \/>\n            Device detection<br \/>\n            Device driver initialization (modules loaded from initrd-<version>.img)<br \/>\n            Mounts root filesystem read only<br \/>\n            Loads initial process (init, PID 1)<br \/>\n     Logged to \/var\/log\/dmesg<\/p>\n<p>init Initialization<br \/>\n      init reads its config: \/etc\/inittab<br \/>\n            Initial runlevel<br \/>\n            System initialization scripts<br \/>\n            Runlevel specific script directories<br \/>\n            Trap certain key sequences<br \/>\n            Define UPS power fail \/ restore scripts<br \/>\n            Spawn gettys on virtual consoles<br \/>\n            Initialize X in runlevel 5<\/p>\n<p>System Initialization<br \/>\n      \/etc\/rc.d\/rc.sysinit<br \/>\n            Activate udev and selinux<br \/>\n            Sets kernel parameters in \/etc\/sysctl.conf<br \/>\n            Sets the system clock<br \/>\n            Loads keymaps<br \/>\n            Enables swap partitions<br \/>\n            Sets hostname<br \/>\n            Root filesystem check and remount read-write<br \/>\n            Activate RAID and LVM devices<br \/>\n            Enable disk quotas<br \/>\n            Check and mount other local filesystems<br \/>\n            Cleans up stale locks and PID files<\/p>\n<p>Standalone Service Initialization<br \/>\n      \/etc\/rc.d\/rc defines which standalone services to start<br \/>\n      l5:5:wait:\/etc\/rc.d\/rc 5<br \/>\n      Each runlevel has a corresponding directory:<br \/>\n            \/etc\/rc.d\/rc5.d\/<br \/>\n            K* symbolic links called with a stop argument<br \/>\n            S* symbolic links called with a start argument<br \/>\n      The System V init scripts reside in:<br \/>\n            \/etc\/rc.d\/init.d\/<br \/>\n            Behavior configured with files under \/etc\/sysconfig\/<\/p>\n<p>Non-Service Startup<br \/>\n      \/etc\/rc.d\/rc.local<br \/>\n            Runs near the end of the runlevel specific scripts (S99local)<br \/>\n            Common place for custom modification<br \/>\n      Better practice:<br \/>\n            Create a System V init script<br \/>\n            Existing \/etc\/rc.d\/init.d\/ scripts can be used as a starting point<br \/>\n      List all current settings: sysctl -a<br \/>\n      Reprocess settings from sysctl.conf: sysctl -p<br \/>\n      Set a \/proc value dynamically: sysctl -w net.ipv4.ip_forward=1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GRUB Components and Configuration 1st Stage Small, added to MBR or boot sector during installation Use \/sbin\/grub-install to repair 2nd Stage Loaded from filesystem containing \/boot Configured in \/boot\/grub\/grub.conf To boot Linux: title, kernel, root filesystem, and initial ramdisk Kernel Initialization Kernel boot time functions Device detection Device driver initialization (modules loaded from initrd-.img) Mounts [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":0,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}