Page 1 of 2

How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 00:09
by ehfortin
Hi,

Well, I've done some search around this and I don't seems to find a way to get the .config that was used to generate the kernel that is on a specific CD. I was thinking at the source repository but I don't get the way it is stored. I'm assuming these .config are generated by some tools/scripts so that may be why I'm not seeing them directly.

Is there a relatively easy way of getting those? I've tried to do a make oldconfig and then make menuconfig but... doing this is giving me a config that, once compiled, is not booting on my machine. So, as the one on the CD work well, I would like to start from this one as the base point.

I'm sure this is an easy one but I just seems unable to figure it.

Thank you.

ehfortin

Re: How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 00:28
by rhadamanthys
You should find the config of your current installed kernel in /boot

Re: How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 01:04
by ehfortin
:oops:

That was too easy. I can see the config from what I've installed. However, if I boot from the CD, I don't seems to see the config file. Actually, I see nothing in /boot (it is a link to /mnt/boot). Is it hidden somewhere else?

Thank you for this quick answer.

ehfortin

Re: How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 02:13
by rhadamanthys
ah, ok,

booting from cd is normaly done with isolinux. so when you just mount your cd, there should be a directory called /isolinux with a file called isolinux.cfg. in this file you can see which kernel is loaded.(and from where). Maybe /kernels/..
Where and if this directory gets mounted when you boot from the cd, i don't know. A developer can awnser that ( or you extract the initrd and walk thru the init process).

Re: How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 06:52
by gapan

Code: Select all

less /proc/config.gz

Re: How/Where to find .config that were used for kernel on CD?

Posted: 28. Sep 2010, 07:12
by damNageHack
gapan wrote:

Code: Select all

less /proc/config.gz
Thanks for the hint. I've not known till now that less can uncompress by itself.
Debian used "lesspipe" (in the very old past I was using it, i think it was the etch edition) to uncompress and some usage of a pipe for the result, so you had to combine lesspipe with less or grep in some weird way.
{edited some bad typos}

Re: How/Where to find .config that were used for kernel on CD?

Posted: 30. Sep 2010, 14:36
by ehfortin
Hi,
gapan wrote:

Code: Select all

less /proc/config.gz
I've booted Salix 13.1.1 from the CD and tried this command without success. I'm getting the binary stuff from the config.gz instead of the content. So I guess the command "less" provided on the CD (busybox) is not able to uncompress the file by itself. I've not looked at alternative yet but I already noticed that gunzip is not available (there is not much available under busybox).

However, I can confirm that the file config.gz is present so I should be able to get the config from there once I uncompress it.

Thank you.

ehfortin

Re: How/Where to find .config that were used for kernel on CD?

Posted: 30. Sep 2010, 14:43
by gapan
Oh, I thought you were using the liveCD. If you're using the standard installation CD run:

Code: Select all

cat /proc/config.gz | gzip -d

Re: How/Where to find .config that were used for kernel on CD?

Posted: 30. Sep 2010, 15:08
by ehfortin
That made it. Very cool.

I thought it could be different with the LiveCD but... I had none in hand so I've tried with what I had :)

Thanks.

ehfortin

Re: How/Where to find .config that were used for kernel on CD?

Posted: 30. Sep 2010, 17:18
by thenktor
gapan wrote:

Code: Select all

cat /proc/config.gz | gzip -d
Is zcat not on the install cd?