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.
-- 
[email protected] mailing list

Reply via email to