mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
a17f0e6c09
commit
94664b35cb
|
@ -6,7 +6,7 @@
|
|||
|
||||
<title>The Linux Kernel HOWTO
|
||||
<author>Brian Ward, <tt>bri@cs.uchicago.edu</tt>
|
||||
<date>v1.0, 5 June 1999
|
||||
<date>v2.0, 03 Jan 2001
|
||||
|
||||
<abstract>
|
||||
This is a detailed guide to kernel configuration, compilation, upgrades,
|
||||
|
@ -77,7 +77,143 @@ it outside the quotation marks in such cases. In other words, when
|
|||
indicating that you should type ``<tt>make config</tt>'' I would write
|
||||
`<tt>make config</tt>', not `<tt>make config</tt>.'
|
||||
<p>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
<chapt change> Quick Install Steps
|
||||
-->
|
||||
<sect> Quick Steps - Kernel Compile
|
||||
<p>
|
||||
This section is written by
|
||||
<htmlurl url="mailto:alavoor@yahoo.com"
|
||||
name="Al Dev">
|
||||
|
||||
The latest version of this section is at <url url="http://www.aldev.8m.com"> and click on "
|
||||
<url name="Quick Steps to recompile linux kernel" url="http://www.aldev.8m.com/kernelcompile.html">
|
||||
". Mirror site is at <url url="http://aldev.webjump.com">.
|
||||
|
||||
A copy of the above web-site is reproduced here -
|
||||
|
||||
Kernel re-compile is required in order to make the kernel very lean
|
||||
and which will result in FASTER operating system . It is also
|
||||
required to support any new devices.
|
||||
|
||||
<enum>
|
||||
<item> Login in as 'root' throughout all these steps. Mount Redhat linux cdrom and install the linux kernel source rpm
|
||||
<code>
|
||||
cd /mnt/cdrom/RedHat/RPMS
|
||||
rpm -i kernel-headers*.rpm
|
||||
rpm -i kernel-sources*.rpm
|
||||
rpm -i bin86*.rpm
|
||||
</code>
|
||||
(This is required only for OLDER Linux systems like redhat 5.x.
|
||||
Install the Intel assembler 'as86' command. Get from
|
||||
<url url="http://rpmfind.net/linux/RPM/mandrake/7.1/Mandrake/RPMS/bin86-0.4-12mdk.i586.html">)
|
||||
or at <url url="http://rpmfind.net/linux/RPM/kondara/jirai/i586/bin86-0.4-8k.i586.html">
|
||||
|
||||
<item> Start X-windows with 'startx'.
|
||||
<code>
|
||||
cd /usr/src/linux
|
||||
make xconfig
|
||||
</code>
|
||||
The <bf>"make xconfig"</bf> brings up a user friendly GUI interface! DO NOT
|
||||
use 'make config' which is a command-line option (
|
||||
use this only if you CANNOT bring up X-window). You load
|
||||
the configuration file from <it>/usr/src/linux/arch/i386/config.in </it>
|
||||
|
||||
<item> Enable the Loadable kernel modules support! See these man pages
|
||||
man lsmod; man insmod; man rmmod; man depmod;
|
||||
With this option you can load/unload the device drivers
|
||||
dynamically on running linux system on the fly.
|
||||
|
||||
<item> Save and Exit "make xconfig". And now, do -
|
||||
<code>
|
||||
make dep
|
||||
make clean
|
||||
</code>
|
||||
|
||||
<item> Read the following file (to gain some knowledge about kernel building...) -
|
||||
<code>
|
||||
man less
|
||||
less /usr/src/linux/arch/i386/config.in
|
||||
</code>
|
||||
Type 'h' for help and to navigate press i, j, k, l, h or arrow, page up/down keys.
|
||||
|
||||
<item> Now, give the make command -
|
||||
<code>
|
||||
cd /usr/src/linux
|
||||
man nohup
|
||||
nohup make bzImage &
|
||||
tail nohup.out (.... to monitor the progress)
|
||||
This will put the kernel in /usr/src/linux/arch/i386/boot/bzImage
|
||||
man tail
|
||||
</code>
|
||||
|
||||
<item> After bzImage is successful, copy the kernel image to /boot directory -
|
||||
<code>
|
||||
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker
|
||||
</code>
|
||||
You must copy the new kernel image to /boot directory, otherwise the new kernel may not boot. And then read the manual page on lilo -
|
||||
<code>
|
||||
man lilo; man lilo.conf;
|
||||
And edit /etc/lilo.conf file and put these lines -
|
||||
image=/boot/bzImage.myker
|
||||
label=myker
|
||||
root=/dev/hda1
|
||||
read-only
|
||||
You can check device name for 'root=' with the command -
|
||||
df /boot
|
||||
</code>
|
||||
|
||||
<item> Now give
|
||||
<code>
|
||||
lilo ;
|
||||
lilo -q ;
|
||||
</code>
|
||||
You must re-run lilo even if entry 'myker' exists, everytime you create a new bzImage.
|
||||
|
||||
<item> Reboot the machine and at lilo press tab key and
|
||||
type 'myker' If it boots then you did a good job! Otherwise at lilo
|
||||
select your old kernel, boot and re-try all over again. Your old kernel
|
||||
is still intact at say '/boot/vmlinuz-2.0.34-0.6'
|
||||
|
||||
<item> Loadable Modules: Boot new kernel and install the loadable modules from RedHat Linux cdrom
|
||||
<code>
|
||||
rpm -i /mnt/cdrom/contrib/kernel-modules*.rpm ....(For old linux systems which do not have
|
||||
insmod pre-installed)
|
||||
man insmod
|
||||
insmod
|
||||
</code>
|
||||
|
||||
<item> If your linux is already had loadable module enabled, then check
|
||||
for files in /lib/modules. The step given below may not be
|
||||
needed. Build modules by installing kernel-source*.rpm and kernel-headers*.rpm.
|
||||
<code>
|
||||
cd /usr/src/linux
|
||||
make modules
|
||||
make install_modules
|
||||
</code>
|
||||
|
||||
<item> Since the new kernel 'myker' boots, you can create the boot disk. Insert a blank floppy into floppy drive and -
|
||||
<code>
|
||||
cd /usr/src/linux
|
||||
make bzdisk
|
||||
</code>
|
||||
</enum>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
-->
|
||||
<sect>Important questions and their answers <p>
|
||||
|
||||
<sect1>What does the kernel do, anyway? <p>
|
||||
|
|
Loading…
Reference in New Issue