Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation.

Similar presentations


Presentation on theme: "CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation."— Presentation transcript:

1 CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation Configuring and Compiling the Linux Kernel Cleaning the Source Tree Configuring the Linux Kernel Compiling the Linux Kernel Using Loadable Kernel Modules Installing the Kernel and Associated Files Changing lilo.conf (RHEL) grub.conf Rebooting Boot Loader grub: The Linux Loader Lilo: The Linux Loader (RHEL) LOADLlN: A DOS-Based Linux Loader dmesg: Display Kernel Messages

2 CIS238/DL2 Boot loaders grub – update grub.conf after binary is installed lilo – update lilo.conf and then run lilo command to activate and rewrite your mbr sysctl utility – modifies kernel parameters while the system is running. Can be used instead of rebuilding the kernel –Use sysctl –a to get a list of parameters –Can be used to modify /proc/sys parameters

3 CIS238/DL3 Installing a Linux Kernel binary Run rpm with the –i (not the –U) it is a new kernel not an upgrade Make sure the new kernel works before you remove the old kernel Remove the old kernel by removing the files that contain the release number from the /boot and from grub.conf and lilo.conf

4 CIS238/DL4 Source code Get a copy of the source code: –Check /usr/src/linux* for kernel source code –Download from kernel.org or Red Hat Install the source code –Use up2date kernel-source Read the documentation! –Read the documentation/README file OR –Locate the Linux Kernel-HOWTO

5 CIS238/DL5 Configuring and Compiling the kernel Clean the source tree –# make mrproper Configure the linux kernel –# make config –# LANG=C make menuconfig –# make xconfig

6 CIS238/DL6 The qconf window as displayed by make xconfig on Fedora

7 CIS238/DL7 The qconf Processor Type submenu

8 CIS238/DL8 ESTRAVERSION number Use to prevent overwriting of older/other kernel information Defaults to release number + custom

9 CIS238/DL9 Next Compile the new Kernel Clean the old files away # make clean Compile the kernel # make bzImage

10 CIS238/DL10 Using Loadable kernel modules # make modules # make modules_install depmod - module dependencies insmod – lists information about loaded modules lsmod – list loaded modules information modinfo – list module information modprobe – loads, unloads modules and dependencies rmmod – removes modules from kernel

11 CIS238/DL11 Installing the kernel Copy the compiled kernel and associated files to the appropriate directory (/ or /boot) Now execute: # make install grub – update grub.conf after binary is installed lilo – update lilo.conf and then run lilo command to activate and rewrite your mbr

12 CIS238/DL12 Rebooting and boot loaders grub – update grub.conf after binary is installed, Grand Unified Boot Loader. lilo – Linux loader, update lilo.conf and run lilo command to activate and rewrite your mbr loadlin: is a DOS based utility that will load Linux from DOS –See Loadlin+Win95/98/ME mini-HOWTO or –elserv.ffm.fgan.de/~lermen

13 CIS238/DL13 Use dmesg Use the dmesg utility to see if there are any problems with the installation If the install does not work then boot to rescue mode and change your lilo or grub configurations to point back to your old kernel Try again

14 CIS238/DL14 grub.conf # grub.conf generated by anaconda # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hda2 # initrd /initrd-version.img # boot=/dev/hda default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title Fedora Core (2.4.22-1.2199.nptl) root (hd0,0) kernel /vmlinuz-2.4.22-1.2199.nptl ro root=LABEL=/ rhgb initrd /initrd-2.4.22-1.2199.nptl.img title Fedora Core (2.4.22-1.2115.nptl) root (hd0,0) kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ rhgb initrd /initrd-2.4.22-1.2115.nptl.img

15 CIS238/DL15 Any Questions?


Download ppt "CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation."

Similar presentations


Ads by Google