View previous topic :: View next topic |
Author |
Message |
F_ Tux's lil' helper
Joined: 31 Dec 2006 Posts: 142
|
Posted: Mon Dec 29, 2008 5:28 am Post subject: Using genkernel properly |
|
|
Hi all. I use genkernel on a regular basis but there is just one thing that bugs me. I have no idea how to update to the next kernel version (i.e. gentoo-sources) properly.
What I mean to say is that I will normally emerge the latest genoo-sources, then run genkernel --menuconfig all, edit what I need and then everything is great. But when I emerge a newer version of gentoo-sources, for some reason (I think during emerge --depclean) it removes the previous .config file (aswell as other makefiles).
Is this supposed to happen?
One method I tried was to copy over the .config file before the --depclean, and then paste it to the new /usr/src/linux-version directory, and make oldconfig. The only problem with this is that I get asked a bunch of technical questions that I dont know the answer to and feel like I will probably ruin something if I continued any further.
How am I supposed to properly migrate from kernel version to kernel version using genkernel when my old .config keeps getting erased and I cant remember all the changes I made to it?
Thanks for your time. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54785 Location: 56N 3W
|
Posted: Mon Dec 29, 2008 11:46 am Post subject: |
|
|
F_
The technical questions are from genkernel running make oldconfig using your old .config and the new kernel.
It drops options that have been removed without asking you and asks about new options, introduced in the new kernel.
Read the help and decide how you should set these new options. Often, the response is N because you don't want them but there are menu structure changes too. You many well want them as options you do use can be moved onto a menu, where they were not before.
The right answer is to not use genkernel.
You do keep several old kernels on the boot menu, don't you? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Dec 29, 2008 12:13 pm Post subject: |
|
|
NeddySeagoon wrote: | The right answer is to not use genkernel. |
In fact, booting with your first kernel can be a long process, but not using at all Genkernel is a must if you want to understand how to make your hardware works. |
|
Back to top |
|
|
outermeasure Apprentice
Joined: 26 Nov 2008 Posts: 194 Location: ping6 ff02::1
|
Posted: Mon Dec 29, 2008 12:22 pm Post subject: |
|
|
d2_racing wrote: | NeddySeagoon wrote: | The right answer is to not use genkernel. |
In fact, booting with your first kernel can be a long process, but not using at all Genkernel is a must if you want to understand how to make your hardware works. |
Huh? Surely you can use kernel-config option and/or with menuconfig,gconfig,xconfig option of genkernel. I don't see why "not using at all genkernel" is a must. |
|
Back to top |
|
|
djinnZ Advocate
Joined: 02 Nov 2006 Posts: 4831 Location: somewhere in L.O.S.
|
Posted: Mon Dec 29, 2008 12:41 pm Post subject: |
|
|
The two cents of mine:
If you know what are you doing, force genkernel to reuse the configuration from another kernel is simple (i have do it just now): by example the old kernel is /usr/src/linux-2.6.26-hardened-r7 and the new linux-2.6.27-hardened-r3, you need only to run a Code: | cp /etc/kernels/kernel-config-x86-2.6.26-hardened-r7 /etc/kernels/kernel-config-x86-2.6.27-hardened-r3 ; genkernel --clean --mrproper --menuconfig all | and refine it. A more proper way is to run Code: | cd /usr/src ; cp /etc/kernels/kernel-config-x86-2.6.26-hardened-r7 ; make mrproper ; cp /etc/kernels/kernel-config-x86-2.6.26-hardened-r7 .config ; make oldconfig ; make menuconfig ; cp .config /etc//etc/kernels/kernel-config-x86-2.6.27-hardened-r3 ; genkernel all | but all depend on how you have configured genkernel.
caveat emptor: If the builded kernel not work due to conflict between some sets introduced with the new version is another question and the only way is to reconfigure it from zero, do a make oldconfig with a new kernel implies some risks, this is a fact but is not related with genkernel. _________________ scita et risus abundant in ore stultorum sed etiam semper severi insani sunt
mala tempora currunt...mater stultorum semper pregna est
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54785 Location: 56N 3W
|
Posted: Mon Dec 29, 2008 5:29 pm Post subject: |
|
|
djinnZ,
You shouldn't be using --mrproper at all if you want to migrate .configs.
The manual process is to copy the old config file to the new kernel and run make oldconfig in the new kernel tree, answering questions as you go, then review what you have in make menuconfig
I confess to being biased against genkernel as I was fluent in the manual process before I found Gentoo.
Left to its own devices, genkernel produces a very lean, fully modular kernel with a bloated initrd, in case it needs something to boot and an even more bloated /lib/modules/`uname -r`/ as it builds almost every module known to Linus. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
djinnZ Advocate
Joined: 02 Nov 2006 Posts: 4831 Location: somewhere in L.O.S.
|
Posted: Mon Dec 29, 2008 8:15 pm Post subject: |
|
|
If is set OLDCONFIG=no in genkernel.conf genkernel will do the make oldconfig with the saved configuration only with --clean --mrproper parameters; yes normally is redundant but because i not know how F_ has configured its system is better to use them.
I find useful genkernel only to not repeat all the steps to make the image, install modules etc. but i have never used the default supplied configuration. But is configured do not autamatically do clean mrproper or oldconfig (note than with OLDCONFIG=yes, genkernel will ever do a make oldconfig and this implies a complete kernel rebuild, with or without configuration modify) by default. _________________ scita et risus abundant in ore stultorum sed etiam semper severi insani sunt
mala tempora currunt...mater stultorum semper pregna est
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist |
|
Back to top |
|
|
|