From: johnrobertbanks@fastmail.fm
To: johnrobertbanks@fastmail.fm, "Ignatich" <ignatich@gmail.com>,
reiserfs-list@namesys.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: COMPILING AND CONFIGURING A NEW KERNEL.
Date: Sat, 07 Apr 2007 00:45:32 -0700 [thread overview]
Message-ID: <1175931932.27274.1183445262@webmail.messagingengine.com> (raw)
In-Reply-To: <1175909205.905.1183425104@webmail.messagingengine.com>
Just correcting some errors and typos.
Wouldn't want you to say that the linux kernel mailing list gave you
incorrect info.
COMPILING AND CONFIGURING A NEW KERNEL.
Download a recent kernel from http://www.kernel.org/
I will use the kernel linux-2.6.20.tar.bz2
You will have to change details of the following to suit your purposes.
Save it in /usr/src/
# mv linux-2.6.20.tar.bz2 /usr/src/
Unzip the kernel package
# tar -jxf linux-2.6.20.tar.bz2
Copy the original kernel configuration file (that came with your distro)
to .config
# cp /boot/config-2.6.13-15-default /usr/src/linux-2.6.20/.config
Change to the new kernel source directory
# cd /usr/src/linux-2.6.20/
Look at the available kernel building options
# make help
Run oldconfig to update the original kernel configuration to a current
configuration
# make oldconfig
Use menuconfig (or xconfig or gconfig) to make any further changes
# make menuconfig
YOU SHOULD compile all the drivers necessary to boot your system, into
the kernel (ie, such drivers should not be built as modules).
This way you will NOT need an initrd file.
Use rpm-pkg to create a Red Hat RPM kernel package.
# make rpm-pkg
When built, the RPM package is put in
/usr/src/packages/RPMS/*your*architecture*
# cd /usr/src/packages/RPMS/x86_64
Install the package (you may have to un-install previous installs)
# rpm -i kernel-2.6.20-1.x86_64.rpm
Use deb-pkg to create a Debian .deb kernel package.
# make deb-pkg
When built, the .deb package is put in /usr/src/
# cd /usr/src/
Install the package (you may have to un-install previous installs)
# dpkg --install linux-2.6.20_2.6.20_amd64.deb
If you were unable to determine which drivers you need (to boot), then
you will need an initrd file. To build it use the command
# mkinitrd -o /boot/initrd-2.6.20
IF YOU ARE CUSTOMIZING YOUR KERNEL, YOU SHOULD PUT IN THE EFFORT TO
BUILD A KERNEL THAT DOES NOT NEED AN INITRD FILE.
It is possible that deb-pkg and rpm-pkg take care of creating the initrd
automatically.
I have always compiled in the important drivers, so I do not know.
Does any caring person here know the answer to this question?
------------------------------------------------------
Now you need to configure your kernel. Using GRUB you need to change the
menu.lst file.
# emacs /boot/grub/menu.lst &
The grub entry that you presently boot with, will look something like:
###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 10.0
root (hd0,2)
kernel /boot/vmlinuz-2.6.13-15-default root=/dev/hda3
resume=/dev/hda5 vga=0x317 video=vesafb:nomtrr splash=silent
initrd /boot/initrd
Do NOT delete the old boot entry, so you can boot it, if things go wrong
with the new kernel.
Cut a copy of it and paste it above the original. Then adjust the copy
for the new kernel.
###Don't change this comment - YaST2 identifier: Original name: linux###
title MY NEW KERNEL
root (hd0,2)
kernel /boot/linux-2.6.20 root=/dev/hda3 resume=/dev/hda5 vga=0x317
video=vesafb:nomtrr splash=silent
Of course, you don't need a initrd entry as you have compiled in all the
vital drivers,... right?
If you could not determine the vital drivers and needed to build an
initrd file, then you need an entry, like
initrd /boot/initrd-2.6.20
------------------------------------------------------
If your new kernel is destined to have the same name as the old one, you
need to do something about it (unless you do not mind the old one being
overwritten).
Use your favorite text editor to change the top level Makefile
# emacs /usr/src/linux-2.6.20/Makefile &
change the line
EXTRAVERSION
to
EXTRAVERSION = something
This will change the name of the new kernel to linux-2.6.20-something
Your /boot/grub/menu.lst entry will now look something like:
###Don't change this comment - YaST2 identifier: Original name: linux###
title MY NEW KERNEL
root (hd0,2)
kernel /boot/linux-2.6.20-something root=/dev/hda3 resume=/dev/hda5
vga=0x317 video=vesafb:nomtrr splash=silent
and perhaps an entry
initrd /boot/initrd-2.6.20-something
------------------------------------------------------
Now reboot and choose the "MY NEW KERNEL" entry from the GRUB boot menu,
and see how you went.
--
johnrobertbanks@fastmail.fm
--
http://www.fastmail.fm - Send your email first class
next prev parent reply other threads:[~2007-04-07 7:45 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 22:42 REISER4: fix for reiser4_write_extent Ignatich
2007-04-06 0:05 ` Reiser4. BEST FILESYSTEM EVER? I need help johnrobertbanks
2007-04-06 0:23 ` H. Peter Anvin
2007-04-06 0:34 ` johnrobertbanks
2007-04-06 0:39 ` H. Peter Anvin
2007-04-06 1:34 ` Reiser4. BEST FILESYSTEM EVER johnrobertbanks
2007-04-06 3:12 ` Valdis.Kletnieks
2007-04-06 4:07 ` H. Peter Anvin
2007-04-06 4:32 ` johnrobertbanks
[not found] ` <20070406152119.GC4228@delft.aura.cs.cmu.edu>
2007-04-07 2:47 ` johnrobertbanks
2007-04-07 3:30 ` Jan Harkes
2007-04-07 5:58 ` johnrobertbanks
2007-04-07 7:15 ` Willy Tarreau
2007-04-07 13:47 ` johnrobertbanks
2007-04-07 14:11 ` Krzysztof Halasa
2007-04-07 15:07 ` johnrobertbanks
2007-04-07 16:05 ` Pekka Enberg
2007-04-07 17:10 ` Valdis.Kletnieks
2007-04-08 16:31 ` Adrian Bunk
2007-04-07 17:21 ` Valdis.Kletnieks
2007-04-08 0:41 ` Krzysztof Halasa
2007-04-07 17:39 ` Valdis.Kletnieks
2007-04-07 19:17 ` Lennart Sorensen
2007-04-08 0:44 ` johnrobertbanks
2007-04-08 1:27 ` Lennart Sorensen
2007-04-08 2:56 ` Theodore Tso
2007-04-08 4:13 ` johnrobertbanks
2007-04-08 12:48 ` Jose Celestino
2007-04-08 13:21 ` johnrobertbanks
2007-04-08 14:14 ` Willy Tarreau
2007-04-08 17:03 ` Theodore Tso
2007-04-08 18:18 ` Jeff Mahoney
2007-04-08 4:32 ` Christer Weinigel
2007-04-08 21:50 ` Reiser4. BEST FILESYSTEM EVER - Christer Weinigel johnrobertbanks
2007-04-08 22:58 ` Richard Knutsson
2007-04-09 5:14 ` johnrobertbanks
2007-04-09 7:07 ` Willy Tarreau
2007-04-09 16:10 ` Richard Knutsson
2007-04-09 18:35 ` Reiser4. BEST FILESYSTEM EVER Nate Diller
2007-04-07 1:26 ` COMPILING AND CONFIGURING A NEW KERNEL johnrobertbanks
2007-04-07 7:45 ` johnrobertbanks [this message]
2007-04-07 16:57 ` Valdis.Kletnieks
2007-04-08 1:11 ` johnrobertbanks
2007-04-07 16:42 ` Valdis.Kletnieks
2007-04-08 1:02 ` johnrobertbanks
2007-04-08 1:42 ` Lennart Sorensen
2007-04-07 12:51 ` REISER4: fix for reiser4_write_extent Laurent Riffard
2007-04-07 19:29 ` Edward Shishkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1175931932.27274.1183445262@webmail.messagingengine.com \
--to=johnrobertbanks@fastmail.fm \
--cc=ignatich@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox