View previous topic :: View next topic |
Author |
Message |
serrix n00b
Joined: 23 Nov 2007 Posts: 23
|
Posted: Wed Nov 28, 2007 3:09 am Post subject: How can I get the running kernel's .config |
|
|
Hi there,
I oh so cleverly cleaned my /usr/src/linux/ dir, so I dont have my last built config.
I also don't have .config support enabled in the old kernel - how can i recompile my new kernel with the old config?
Thanks in advance,
Cheers,
Serrix |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Nov 28, 2007 3:41 am Post subject: |
|
|
I think that you cannot...sorry |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1507 Location: Earth
|
Posted: Wed Nov 28, 2007 3:46 am Post subject: Re: How can I get the running kernel's .config |
|
|
serrix wrote: | Hi there,
I oh so cleverly cleaned my /usr/src/linux/ dir, so I dont have my last built config.
I also don't have .config support enabled in the old kernel - how can i recompile my new kernel with the old config?
Thanks in advance,
Cheers,
Serrix |
hallo,
mount /dev/YOUR_BOOT_DEVICE /boot
and you see something like this ' config-2.6.22-gentoo-r10 '
just copy the ' config-2.6.22-gentoo-r10 ' to /usr/src/linux/.config
CooSee ' Ya _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Nov 28, 2007 3:48 am Post subject: |
|
|
Since he use make menuconfig, maybe he doesn't copy is .config in /boot.
This .config doesn't appear by magic in /boot for my concern when you compile your kernel. |
|
Back to top |
|
|
serrix n00b
Joined: 23 Nov 2007 Posts: 23
|
Posted: Wed Nov 28, 2007 3:57 am Post subject: |
|
|
Your right, all i have in /boot/ is the kernel (bzImage) itself...
Any other ideas? Thanks for the ones already given too. |
|
Back to top |
|
|
serrix n00b
Joined: 23 Nov 2007 Posts: 23
|
Posted: Wed Nov 28, 2007 4:08 am Post subject: |
|
|
hmmm, it SEEMS to have worked, just by loading the old kernel and doing a make oldconfig from /usr/src/linux.
Thanks for your help, i'll let you know if i'm wrong and it didn't work but so far it looks good |
|
Back to top |
|
|
serrix n00b
Joined: 23 Nov 2007 Posts: 23
|
Posted: Wed Nov 28, 2007 4:11 am Post subject: |
|
|
Yep, i was wrong |
|
Back to top |
|
|
serrix n00b
Joined: 23 Nov 2007 Posts: 23
|
Posted: Wed Nov 28, 2007 5:53 am Post subject: |
|
|
Thanks for your help, i've re-done my kernel manually.
Cheers,
Serrix |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Nov 28, 2007 11:53 am Post subject: |
|
|
And after doing it, you make a copy in /boot, like config-2.6.22-gentoo-r8.config
With that, you will have a copy of your .config. |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Wed Nov 28, 2007 4:38 pm Post subject: |
|
|
d2_racing wrote: | Since he use make menuconfig, maybe he doesn't copy is .config in /boot.
This .config doesn't appear by magic in /boot for my concern when you compile your kernel. |
It does if you use make install.
I find the best command to update the kernel is:
Code: | make && make modules_install install |
_________________ Be lucky,
Neil |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Nov 28, 2007 5:22 pm Post subject: |
|
|
the command :
Code: |
make && make modules_install install
|
Will create a generique bzImage I think...So for my concern, I prefer to use kernel-2.6.22-gentoo-r8 as the name for my bzImage for exemple.
Maybe I'm wrong... |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Wed Nov 28, 2007 5:25 pm Post subject: |
|
|
d2_racing wrote: | the command :
Code: |
make && make modules_install install
|
Will create a generique bzImage I think...So for my concern, I prefer to use kernel-2.6.22-gentoo-r8 as the name for my bzImage for exemple.
Maybe I'm wrong... |
You are wrong.
Just in case you still have doubts, here's my /boot:
Code: | file:///boot/dos
file:///boot/grub
file:///boot/lost+found
file:///boot/config
file:///boot/config-2.6.22-gentoo-r5
file:///boot/config-2.6.22-gentoo-r6
file:///boot/config-2.6.22-gentoo-r6.old
file:///boot/config-2.6.22-gentoo-r7
file:///boot/config-2.6.22-gentoo-r7.old
file:///boot/config-2.6.22-gentoo-r8
file:///boot/config-2.6.22-gentoo-r8.old
file:///boot/config-2.6.23-gentoo
file:///boot/config-2.6.23-gentoo-r1
file:///boot/config-2.6.23-gentoo-r1.old
file:///boot/config-2.6.23-gentoo-r2
file:///boot/config-2.6.23-gentoo-r3
file:///boot/config-2.6.24-rc3-zen3
file:///boot/config.old
file:///boot/fbsplash-emergence
file:///boot/fbsplash-livecd
file:///boot/System.map
file:///boot/System.map-2.6.22-gentoo-r5
file:///boot/System.map-2.6.22-gentoo-r6
file:///boot/System.map-2.6.22-gentoo-r6.old
file:///boot/System.map-2.6.22-gentoo-r7
file:///boot/System.map-2.6.22-gentoo-r7.old
file:///boot/System.map-2.6.22-gentoo-r8
file:///boot/System.map-2.6.22-gentoo-r8.old
file:///boot/System.map-2.6.23-gentoo
file:///boot/System.map-2.6.23-gentoo-r1
file:///boot/System.map-2.6.23-gentoo-r1.old
file:///boot/System.map-2.6.23-gentoo-r2
file:///boot/System.map-2.6.23-gentoo-r3
file:///boot/System.map-2.6.24-rc3-zen3
file:///boot/System.map.old
file:///boot/vmlinuz
file:///boot/vmlinuz-2.6.22-gentoo-r5
file:///boot/vmlinuz-2.6.22-gentoo-r6
file:///boot/vmlinuz-2.6.22-gentoo-r6.old
file:///boot/vmlinuz-2.6.22-gentoo-r7
file:///boot/vmlinuz-2.6.22-gentoo-r7.old
file:///boot/vmlinuz-2.6.22-gentoo-r8
file:///boot/vmlinuz-2.6.22-gentoo-r8.old
file:///boot/vmlinuz-2.6.23-gentoo
file:///boot/vmlinuz-2.6.23-gentoo-r1
file:///boot/vmlinuz-2.6.23-gentoo-r1.old
file:///boot/vmlinuz-2.6.23-gentoo-r2
file:///boot/vmlinuz-2.6.23-gentoo-r3
file:///boot/vmlinuz-2.6.24-rc3-zen3
file:///boot/vmlinuz.old
|
The "vmlinuz" and "vmlinuz.old" are symlinks to the current and previous kernels. _________________ Be lucky,
Neil |
|
Back to top |
|
|
your_WooDness Tux's lil' helper
Joined: 25 Oct 2007 Posts: 77
|
Posted: Wed Nov 28, 2007 5:34 pm Post subject: |
|
|
Hi,
you can also use the file /proc/config.gz. This should be your running kernel's config. gunzip it, alter the access rights if needed and copy it to /usr/src/linux/ |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1507 Location: Earth
|
Posted: Wed Nov 28, 2007 9:24 pm Post subject: |
|
|
hallo,
i always do :
make && make modules_install && cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.22-gentoo-r10-2 && cp .config /boot/config-2.6.22-gentoo-r10-2
when compile the kernel
CooSee ' Ya _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Wed Nov 28, 2007 11:12 pm Post subject: |
|
|
CooSee wrote: | hallo,
i always do :
make && make modules_install && cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.22-gentoo-r10-2 && cp .config /boot/config-2.6.22-gentoo-r10-2
when compile the kernel
CooSee ' Ya |
Why when you have to change that for every different kernel AND edit /boot/grub/grub.conf.? Also, your old kernel gets overwritten if you are simply modifying the existing kernel - which can be a real pain if it fails to boot. Give me make install anyday. It handles the lot for you. _________________ Be lucky,
Neil |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1507 Location: Earth
|
Posted: Wed Nov 28, 2007 11:21 pm Post subject: |
|
|
neiljw wrote: | CooSee wrote: | hallo,
i always do :
make && make modules_install && cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.22-gentoo-r10-2 && cp .config /boot/config-2.6.22-gentoo-r10-2
when compile the kernel
CooSee ' Ya |
Why when you have to change that for every different kernel AND edit /boot/grub/grub.conf.? Also, your old kernel gets overwritten if you are simply modifying the existing kernel - which can be a real pain if it fails to boot. Give me make install anyday. It handles the lot for you. |
hallo,
i forgot to write, that i always took different names for the kernel that i compile ( in the Makefile too ), like ' 2.6.22-gentoo-r10 ' ,
' 2.6.22-gentoo-r10-1 ' and so on...
thats because i try different Kernel, like ' zen-sources ' and many others
sorry for my bad english
CooSee ' Ya _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Wed Nov 28, 2007 11:59 pm Post subject: |
|
|
CooSee wrote: | i forgot to write, that i always took different names for the kernel that i compile ( in the Makefile too ), like ' 2.6.22-gentoo-r10 ' ,
' 2.6.22-gentoo-r10-1 ' and so on... |
Precisely the reason to let "make install" do it and save yourself a lot of typing and possible typos.
Quote: | thats because i try different Kernel, like ' zen-sources ' and many others |
Take another look at my /boot listing above. Apart from frequent updates to gentoo-sources, you will see zen-sources in there too. (Ouch, I didn't want to remember zen-sources - they broke my computer. )
Quote: | sorry for my bad english |
There is plenty of worse English around and some of it from native English speakers. _________________ Be lucky,
Neil |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Nov 29, 2007 1:57 am Post subject: |
|
|
Yeah Neiljw, you are right.
When I compile my box I use this :
Code: |
cp arch/i386/boot/bzImage /boot/kernel-2.6.xx-gentoo-rx && cp .config /boot/config-2.6.xx-gentoo-rx-.config && cp System.map /boot
Add an entry in /boot/grub/grub.conf to test something and after that I make some clean up.
|
|
|
Back to top |
|
|
Anarcho Advocate
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Fri Nov 30, 2007 1:33 pm Post subject: |
|
|
Code: | zcat /proc/config.gz > /usr/src/linux/.config |
_________________ ...it's only Rock'n'Roll, but I like it! |
|
Back to top |
|
|
Mantaar Apprentice
Joined: 17 May 2007 Posts: 219
|
Posted: Fri Nov 30, 2007 1:49 pm Post subject: |
|
|
Anarcho wrote: | Code: | zcat /proc/config.gz > /usr/src/linux/.config |
|
That will only work if you have kernel-config file support compiled into the kernel itself. The option is
Code: |
│ Symbol: IKCONFIG [=y]
│ Prompt: Kernel .config support
│ Defined at init/Kconfig:237
│ Location:
│ -> General setup
|
You should generally say 'yes' here as it does not cost too much and it will probably save you a hell of a lot of time in case you loose your original .config _________________ Error compiling committee.c: too many arguments to function. |
|
Back to top |
|
|
|