Gentoo Archives: gentoo-user

From: Etaoin Shrdlu <shrdlu@×××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] multiple kernel configs
Date: Sat, 20 Aug 2005 11:17:19
Message-Id: 200508201334.30867.shrdlu@unlimitedmail.org
In Reply to: [gentoo-user] multiple kernel configs by John Dangler
1 John Dangler wrote:
2
3 > I changed some options to the menuconfig (trying to get that splash
4 > to work), and saved the changes to an alternate config file.
5 > I'd like to make a kernel with _that_ config file and keep it
6 > separate from my default 2.6-r12 kernel, since, when the splash
7 > causes the panic, I have some way to get back in.
8 >
9 > How do I compile a new kernel that I can add to the grub.conf with
10 > the alternate config ?
11
12 Just copy it in /boot with a different name, and add an entry in
13 grub.conf for that. For future reference, I also always save the
14 config files in a dedicated directory.
15
16 Example (with a lot of fantasy, I name kernels using their version
17 number, but that's of course just personal preference):
18
19 # ls /boot
20 2.6.11.11 Sytem.map-2.6.11.11
21
22 This is where I save the configs (again, you might want to do it
23 differently):
24
25 # ls /root/conf
26 2.6.11.11.conf
27
28 Relevant section of grub.conf:
29
30 title 2.6.11.11
31 root (hd-whatever,n)
32 kernel (hd-whatever,m)/2.6.11.11 root=/dev/hda3
33
34 Now suppose I want to do some tests with new features, so this is what
35 I do:
36
37 # cd /usr/src/linux
38 # make mrproper (I think this is not strictly required, I usually
39 do it)
40 # make menuconfig
41
42 (load the config file from /root/conf/2.6.11.11.conf, adjust what you
43 want to change, and save the config back to /root/conf but with a
44 different name to preserve the old one,
45 e.g. /root/conf/2.6.11.11-newfeatures.conf
46
47 Optionally you may also want to append an EXTRAVERSION to the kernel
48 version - something that will show up when you do "uname -a" - IIRC
49 there's now a dedicated menuconfig entry to do this, otherwise you
50 can just edit the Makefile after menuconfig)
51
52 # make && make modules_install
53 # cp arch/i386/boot/bzImage /boot/2.6.11.11-newfeatures
54
55 (Optional, but I usually do this, expecially if I set the
56 extraversion)
57 # cp System.map /boot/System.map-2.6.11.11-newfeatures
58
59 Edit grub.conf, and add a line like this after the existing one:
60
61 title 2.6.11.11-newfeatures
62 root (hd-whatever,n)
63 kernel (hd-whatever,m)/2.6.11.11-newfeatures root=/dev/hda3
64
65 Reboot and you'll see both entries in the grub boot menu.
66
67 Hope this helps.
68 --
69 gentoo-user@g.o mailing list