* [gentoo-user] multiple kernel configs
@ 2005-08-20 0:15 John Dangler
2005-08-20 1:46 ` Marco Matthies
2005-08-20 11:34 ` Etaoin Shrdlu
0 siblings, 2 replies; 5+ messages in thread
From: John Dangler @ 2005-08-20 0:15 UTC (permalink / raw
To: gentoo-user
I changed some options to the menuconfig (trying to get that splash to
work), and saved the changes to an alternate config file.
I'd like to make a kernel with _that_ config file and keep it separate from
my default 2.6-r12 kernel, since, when the splash causes the panic, I have
some way to get back in.
How do I compile a new kernel that I can add to the grub.conf with the
alternate config ?
Thanks for the input
John D
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] multiple kernel configs
2005-08-20 0:15 [gentoo-user] multiple kernel configs John Dangler
@ 2005-08-20 1:46 ` Marco Matthies
2005-08-20 2:21 ` John Dangler
2005-08-20 11:34 ` Etaoin Shrdlu
1 sibling, 1 reply; 5+ messages in thread
From: Marco Matthies @ 2005-08-20 1:46 UTC (permalink / raw
To: gentoo-user
John Dangler wrote:
> I changed some options to the menuconfig (trying to get that splash to
> work), and saved the changes to an alternate config file.
> I'd like to make a kernel with _that_ config file and keep it separate from
> my default 2.6-r12 kernel, since, when the splash causes the panic, I have
> some way to get back in.
>
> How do I compile a new kernel that I can add to the grub.conf with the
> alternate config ?
The kernel config file used for compiling the kernel is called .config
So, to compile a kernel with that config file, just replace the .config
with your alternate file, saving the old .config of course if you want
to keep it:
mv .config my-old-config
mv my-new-config .config
(do this in the kernel source dir)
You might have to call 'make clean' before you compile your new
kernel, i'm not 100% sure on that -- it won't harm though.
You can add as many kernels to your grub config as you like -- you might
want to check with the install guide how to do that exactly:
http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?part=1&chap=10
Basically, your second kernel gets the same kind of entry just as your
first, but you will want to change the title and of course the kernel
(the root line should be the same as in the first block). Move your
kernel under the name you specified to the same location where your
other kernel is, using the name you specified in the config. (you will
probably have to mount your /boot partition to do all this naturally)
I.e. add an extra block something like this to your grub.conf:
title=Gentoo Linux 2.6.11-r11
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r11
Marco
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [gentoo-user] multiple kernel configs
2005-08-20 1:46 ` Marco Matthies
@ 2005-08-20 2:21 ` John Dangler
2005-08-20 2:46 ` Marco Matthies
0 siblings, 1 reply; 5+ messages in thread
From: John Dangler @ 2005-08-20 2:21 UTC (permalink / raw
To: gentoo-user
Does the moving of the config files have any effect on the already compiled
kernel? (I was under the impression that a .config _went with_ a specific
build) or is that a throwback to too much time in a m$ environment?
John D
-----Original Message-----
From: Marco Matthies [mailto:marco-ml@gmx.net]
Sent: Friday, August 19, 2005 9:46 PM
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] multiple kernel configs
John Dangler wrote:
> I changed some options to the menuconfig (trying to get that splash to
> work), and saved the changes to an alternate config file.
> I'd like to make a kernel with _that_ config file and keep it separate
from
> my default 2.6-r12 kernel, since, when the splash causes the panic, I have
> some way to get back in.
>
> How do I compile a new kernel that I can add to the grub.conf with the
> alternate config ?
The kernel config file used for compiling the kernel is called .config
So, to compile a kernel with that config file, just replace the .config
with your alternate file, saving the old .config of course if you want
to keep it:
mv .config my-old-config
mv my-new-config .config
(do this in the kernel source dir)
You might have to call 'make clean' before you compile your new
kernel, i'm not 100% sure on that -- it won't harm though.
You can add as many kernels to your grub config as you like -- you might
want to check with the install guide how to do that exactly:
http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?part=1&chap=10
Basically, your second kernel gets the same kind of entry just as your
first, but you will want to change the title and of course the kernel
(the root line should be the same as in the first block). Move your
kernel under the name you specified to the same location where your
other kernel is, using the name you specified in the config. (you will
probably have to mount your /boot partition to do all this naturally)
I.e. add an extra block something like this to your grub.conf:
title=Gentoo Linux 2.6.11-r11
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r11
Marco
--
gentoo-user@gentoo.org mailing list
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] multiple kernel configs
2005-08-20 2:21 ` John Dangler
@ 2005-08-20 2:46 ` Marco Matthies
0 siblings, 0 replies; 5+ messages in thread
From: Marco Matthies @ 2005-08-20 2:46 UTC (permalink / raw
To: gentoo-user
John Dangler wrote:
> Does the moving of the config files have any effect on the already compiled
> kernel? (I was under the impression that a .config _went with_ a specific
> build) or is that a throwback to too much time in a m$ environment?
the .config file determines how and especially which parts of the kernel
are built by the kernel build environment -- the .config has no effect
after the kernel has been built.
a windows kernel will probably be built similarly, though who knows what
happens in the kernel caverns of redmond... :)
Marco
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] multiple kernel configs
2005-08-20 0:15 [gentoo-user] multiple kernel configs John Dangler
2005-08-20 1:46 ` Marco Matthies
@ 2005-08-20 11:34 ` Etaoin Shrdlu
1 sibling, 0 replies; 5+ messages in thread
From: Etaoin Shrdlu @ 2005-08-20 11:34 UTC (permalink / raw
To: gentoo-user
John Dangler wrote:
> I changed some options to the menuconfig (trying to get that splash
> to work), and saved the changes to an alternate config file.
> I'd like to make a kernel with _that_ config file and keep it
> separate from my default 2.6-r12 kernel, since, when the splash
> causes the panic, I have some way to get back in.
>
> How do I compile a new kernel that I can add to the grub.conf with
> the alternate config ?
Just copy it in /boot with a different name, and add an entry in
grub.conf for that. For future reference, I also always save the
config files in a dedicated directory.
Example (with a lot of fantasy, I name kernels using their version
number, but that's of course just personal preference):
# ls /boot
2.6.11.11 Sytem.map-2.6.11.11
This is where I save the configs (again, you might want to do it
differently):
# ls /root/conf
2.6.11.11.conf
Relevant section of grub.conf:
title 2.6.11.11
root (hd-whatever,n)
kernel (hd-whatever,m)/2.6.11.11 root=/dev/hda3
Now suppose I want to do some tests with new features, so this is what
I do:
# cd /usr/src/linux
# make mrproper (I think this is not strictly required, I usually
do it)
# make menuconfig
(load the config file from /root/conf/2.6.11.11.conf, adjust what you
want to change, and save the config back to /root/conf but with a
different name to preserve the old one,
e.g. /root/conf/2.6.11.11-newfeatures.conf
Optionally you may also want to append an EXTRAVERSION to the kernel
version - something that will show up when you do "uname -a" - IIRC
there's now a dedicated menuconfig entry to do this, otherwise you
can just edit the Makefile after menuconfig)
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/2.6.11.11-newfeatures
(Optional, but I usually do this, expecially if I set the
extraversion)
# cp System.map /boot/System.map-2.6.11.11-newfeatures
Edit grub.conf, and add a line like this after the existing one:
title 2.6.11.11-newfeatures
root (hd-whatever,n)
kernel (hd-whatever,m)/2.6.11.11-newfeatures root=/dev/hda3
Reboot and you'll see both entries in the grub boot menu.
Hope this helps.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-20 11:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-20 0:15 [gentoo-user] multiple kernel configs John Dangler
2005-08-20 1:46 ` Marco Matthies
2005-08-20 2:21 ` John Dangler
2005-08-20 2:46 ` Marco Matthies
2005-08-20 11:34 ` Etaoin Shrdlu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox