Where are the current kernel configs?
I need to recompile my kernel and I want to start with the existing options. Where can I find the current kernel config (SuSE 8.0 Personal BTW)? This has got to be a common question, but I've been unable to find the answer. Sorry to have to ask. Yippee38 __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
On Thu, May 02, 2002 at 07:29:08PM -0700, Yippee Three-eight wrote:
I need to recompile my kernel and I want to start with the existing options. Where can I find the current kernel config (SuSE 8.0 Personal BTW)?
This has got to be a common question, but I've been unable to find the answer. Sorry to have to ask.
After you install the kernel source, you'll find the config in file in /usr/src/linux/.config. There is also a copy in /boot/vmlinuz.config. These two files are identical on my 8.0 pro box. Best Regards, Keith -- LPIC-2, MCSE, N+ Got spam? Get spastic http://spastic.sourceforge.net
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 . Oddly though, by default linux points to linux-2.4.18 . When compiling the VMware modules I was informed that these are SMP headers. When I pointed linux to linux-2.4.18.SuSE , VMware would then compile. Seems like Suse did this in 7.2 as well. So, who will attack me first for heresy again? On Thursday 02 May 2002 21:34, Keith Winston wrote:
On Thu, May 02, 2002 at 07:29:08PM -0700, Yippee Three-eight wrote:
I need to recompile my kernel and I want to start with the existing options. Where can I find the current kernel config (SuSE 8.0 Personal BTW)?
This has got to be a common question, but I've been unable to find the answer. Sorry to have to ask.
After you install the kernel source, you'll find the config in file in /usr/src/linux/.config. There is also a copy in /boot/vmlinuz.config. These two files are identical on my 8.0 pro box.
Best Regards, Keith -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE80ft9nQ18+PFcZJsRAuIqAJwKUc69PA46EUoTGjRzP5x6jDDGDACeM5BS cDxkdUuEVyyGwnhH0WE6C6U= =vyFz -----END PGP SIGNATURE-----
On Friday 03 May 2002 04:29, Yippee Three-eight wrote:
I need to recompile my kernel and I want to start with the existing options. Where can I find the current kernel config (SuSE 8.0 Personal BTW)?
This has got to be a common question, but I've been unable to find the answer. Sorry to have to ask.
make mrproper make cloneconfig Will get you the configuration of the running kernel, so you can make xconfig and make your changes This is provided you're using a SuSE kernel source. zcat /proc/config.gz > .config also works, but note that there are options in the suse kernels that are not present in a "vanilla" kernel, if that's what you're going to compile. regards Anders
I am a SuSe newbie and I need to recompile my kernel for ADSL. I found some basic instructions (which I am including below) which state that I should cd into /usr/src/linux and do make `menuconfig` However on my SuSE 8.0 PRO installation there is no linux directory. Anyone help me out or get me started. Any pointers would be greatly appreciated... TIA James Pearson E mail (mai) : james.pearson@wanadoo.fr E mail (bur) : james.pearson@wanadoo.com Web page: http://perso.wanadoo.fr/j.pearson/ What you make of your life is up to you. You have all the tools and resources you need. /******************************************************************** More on Custom Kernels by Subhasish Ghosh Tuesday July 3rd, 2001 ********************************************************************/ This article provides you with a detailed step-by-step process describing how to Compile, Configure and then install a basic Custom Kernel 2.4. As we all know, a Customized Kernel is required for many reasons, and I will not go into those details: I will only show how to do it, not why you would want to. This article is a follow up to my previous article on compiling a basic Kernel. Today we will go into a little more depth on some important steps. Please note that I have performed all the steps mentioned below on a computer system with the following configurations: Compaq Presario 4010 Series computer 15.5 GB Hard Disk Space 96 MB RAM 400 MHz Intel Celeron Processor Red Hat Linux 7.1 Distribution Releas Kernel: 2.4.2-2 The steps to be followed are as follows: Step 1: Login as "root" and then perform these steps. Step 2: At the command prompt, type in: rpm -q kernel-headers kernel-source make dev86 Step 3: If these RPMs are already installed, then proceed to step 4. Otherwise, mount the Red Hat Linux 7.1 CD-ROM and then perform a rpm -Uvh for installing these RPMs. Step 4: If you have a fully working X Window System, then type in "startx" at the command prompt. In case you don't have an X Window System configured, then proceed to Step 5. Please note: When I have X configured, I use 'xconfig', but using 'menuconfig' from the Command line is fine too. Step 5: At the prompt type: cd /usr/src/linux-2.4.2 and press enter. Please note this step. Earlier, while compiling the 2.2 Kernel, the path used to be /usr/src/linux, it's now at /usr/src/linux-2.4.2 Step 6: From within /usr/src/linux-2.4.2, type in "make menuconfig". Step 7: This provides you with the various options you have for obtaining a Customized Kernel. Kernel 2.4 provides exactly 29 sections that you can try for building your own Customized Kernel. They are as follows: Code maturity level options Loadable module support Processor type and features General setup Memory Technology Devices(MTD) Parallel port support Plug and Play configuration Block devices Multi-device support(RAID and LVM) Networking options Telephony support ATA/IDE/MEM/RLL support SCSI support Fusion MPT device support IEEE 1394 (Firewire support) I2O device support Network device support Amateur Radio support IrDA (infrared) support ISDN subsystem Old CD-ROM drivers Input Core support Character devices Multimedia devices File systems Console drivers Sound USB support Kernel hacking Step 8: Now, I would really suggest you leave most of the default options just as they are. Just don't try to fiddle around right here because most of the options are sensitive and require expert handling. You can always come back later when you have something specific you want to compile. At this point though, just make the following changes: Code maturity level options: Select the option "Prompt for development and/or incomplete code/drivers" [*] Prompt for development and/or incomplete code/drivers For testing and/or developing a driver that is currently in "Alpha-test" phase, you should select this option, otherwise don't. If you do select this option, drivers/features currently in the "Alpha-test" would be available for use. Loadable module support: [*] Enable loadable module support Modules (device drivers, file systems etc.) are to be used with this Kernel in the future. [*] Set version information on all module symbols For a vailability of same modules even after compiling a new Custom Kernel. Make sure you have the program 'genksyms', otherwise Kernel compilation would fail. [*] Kernel module loader The Kernel loads the required modules by running modprobe with appropriate arguments. Processor type and features: Choose the correct Processor type depending on whether you are working on a Pentium 2 , 3, or Intel Celeron like me. Kernel 2.4 provides you with a wide range of choices. They are as follows: ( )386 -> AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI, 486DLC/DLC2, UMC 486SX-S and NetGen Nx586 ( )486 -> MD/Cyrix/IBM/Intel 486DX/DX2/DX4 or SL/SLC/SLC2/SLC3/SX/SX2 ( )586/K5/5x86/6x86//6x86MX -> Generic Pentium ( )Pentium-Classic ( )Pentium-MMX -> Intel Pentium/Pentium MMX, AMD K5,K6 and K63D ( )Pentium-Pro/Celeron/Pentium-II -> Cyrix/IBM/National Semiconductor 6x86MX, MII and Intel Pentium II/Pentium Pro ( )Pentium III -> Intel Pentium III ( )Pentium 4 -> Intel Pentium 4 ( )K6/K6-II/K6-III -> AMD K6, K6-II and K6-III ( )Athlon/Duron/K7 -> AMD Athlon ( )Crusoe -> Self-modifying low-power CPU from Transmeta Corp. ( )Winchip-C6 -> IDT Winchip ( )Winchip-2 -> IDT Winchip2 ( )Winchip-2A/Winchip-3 -> IDT Winchips with 3dNow Kernel 2.4 provides you with these above-mentioned choices from which you can select your processor type. Make sure this selection is correct, cause Kernel compilation depends a lot on these factors. I am using an Intel Celeron processor, for that reason, I chose the option: ( )Pentium-Pro/Celeron/Pentium-II (X)Pentium-Pro/Celeron/Pentium-II Make sure you leave the other options as they are. Now, let's take a look at the other significant options that we need to change or alter within "Processor type and features". Move a little down and you can see an option that reads: ( )High Memory Support Press enter, and you are provided with 3 options further: ( )off ( )4GB ( )64GB Linux will support up to 64 gigabytes of RAM, but this support must invoke Intel Physical Address Extensions (PAE) to use the memory above the 4GB limit. All Intel Pentium series CPUs including the new ia64 support PAE, but enabling this option will crash on CPUs that do not support PAE. For systems requiring between 1GB and 4GB RAM, the 4GB option will split memory into a 3GB space useable by applications and a 1GB portion for internal use by the Linux Kernel. If you are compiling a Kernel that will never run on a machine with more than 1 GB total Physical RAM, select "off". This is the choice for most users. Selecting ( )off, will result in the following: (off)High Memory Support Next, set the option ( )Maximum Virtual Memory. Highlight it and press enter. You are provided with the following options: ( )3GB ( )2GB ( )1GB I selected the option ( )1GB, so make sure it looks like this: (X)1GB Next we come to the option: [ ]Math Emulation This was the center of much debate in my last article "Compiling, configuring and installing a Kernel", published at this very site on June 20th 2001. Please note, according to the "Help" included with the Red Hat Linux 7.1 Distribution Release, underlying Kernel 2.4.2.-2 regarding whether one should answer Yes or No here, this makes no difference at all for processors that already have a "math coprocessor" built in. 486SX and 386 processors do not have a "math coprocessor", while Pentium processors do have. As I am using a Celeron processor, I don't require this option, but if you have "cross-platform portability" in mind, the best option would be to select this option and include it for a safe Kernel compilation. If you are not sure, the best option is to say "Yes": apart from a bigger Kernel by 66KB, it wouldn't hurt much. I like playing safe, so I selected "Yes". If you want, you can do otherwise. Next comes the option: [ ]MTRR(Memory Type Range Register) support X Server needs this for performance. Ought to be selected: [X]MTRR(Memory Type Range Register) support Next we come to the choice that reads: Multi-device support(RAID and LVM) If you need RAID(Redundant Arrays of Inexpensive Disks) support in your new Kernel, make sure you spend some time with the options provided below, otherwise simply leave them out. I needed to do some R&D with RAID support in Kernel 2.4, so I selected the options outlined below: [*]Multiple devices driver support(RAID and LVM) <*>RAID Support <*>Linear(append) mode <*>RAID-0(striping) mode <*>RAID-1(mirroring) mode <*>RAID-4/RAID-5 mode <*>Multipath I/O support (A multipath RAID device costs of a disk with several different IO routes configured to this disk. For selecting RAID-1 set, this must be selected also.) <*>Logical Volume Manager(LVM) support (This driver lets you combine several hard disks, hard disk partitions, multiple devices or even loop devices (for evaluation purposes) into a volume group like a Virtual disk.) Next we need to look at the option: File systems. For the support of different file systems I need to re-compile my Linux Kernel from time to time and increase the read-write and accessibility performance by a considerable margin. The choices that I have had selected are as follows: [*]Quota support <*>Kernel automounter support <*>Kernel automounter version 4 support(also supports v3) <*>DOS FAT fs support <*>MSDOS fs support <*>UMSDOS <*>VFAT(Windows-95) fs support <*>NTFS filesystem support(read-only) If you are like me and also in love with FreeBSD, and need to access the FreeBSD partitions from within Linux, you have to include the FreeBSD filesystem support also. For that purpose, do the following: Move to the bottom of the 'File systems' screen, and then select the option that reads: < >UFS filesystem support(read-only) Should be selected: <*>UFS filesystem support(read-only). Next, move to the option that reads "Partition types", highlight it, and then press enter. On the next screen, the following options should be selected: [*]Advanced partition selection [*]PC BIOS (MSDOS partition tables) support would be selected by default. Don't change. [*]BSD disklabel (FreeBSD partition tables) support (Choosing this option ensures that FreeBSD disklabels are visible from the Linux environment, in addition you can also mount FreeBSD partitions from within Linux.) Note: An important point to remember is that < >UFS filesystem support(read-only) This option must be selected, otherwise, Kernel compilation will fail. The Kernel 2.4 provides a lot of Networking Options. I included the following for a basic setup: <*>Packet socket [*]Kernel/User netlink socket [*]Routing messages [*]Network packet filtering(replaces ipchains) <*>Unix domain sockets [*]TCP/IP networking [*]IP:multicasting (i) Packet socket: The packet protocol is used by applications that communicate directly with network devices without an intermediate network protocol implemented in the Kernel. (ii) Kernel/User netlink socket: Allows a two-way communication between the Kernel and user processes. If you want to use arpd, a daemon that keeps the internal ARP cache, which is the mapping between IP addresses and hardware addresses on the local network, small, then this option should be selected. (iii) Routing messages: If selected, user space programs can receive some network related routing information over the netlink. (iv) Network packet filtering (replaces ipchains): Select if you intend using your Linux system as the gateway to the Internet using "masquerading". Select this option if you want to run your Red Hat Linux system as a Router. In other words, for creating a "routing enabled kernel". After you have made these changes, please make sure you haven't changed the others in the process. All these above-mentioned changes are quite harmless and won't cause any harm to your existing Linux Kernel. Save and Exit from the Main dialog. Step 9: Perform a "ls -al" from within the path: /usr/src/linux-2.4.2 Step 10: You will see a file called: "Makefile". Makefile is an extremely important file for this entire Compilation process. So, make sure you create a backup of this file, by using: cp Makefile Makefile.bak Step 11: Now, do: (from within /usr/src/linux-2.4.2) vi Makefile Step 12: Go to line EXTRAVERSION and change it to something you like. For example, I changed EXTRAVERSION=-2, to EXTRAVERSION= "-2ghosh". You are free to name it any way you wish. Step 13: Save and exit the file. Step 14: All the following steps should be done from within: /usr/src/linux-2.4.2. Type in: "make dep clean", and press enter. Step 15: Then type in: "make bzImage modules" for creating the file bzImage. This could take some time, go and have a drink while it compiles all the necessary files. Or you can check out the new game "XBill" on another machine if you want to! Step 16: After this step is over, a "bzImage" file would be created in the directory /usr/src/linux-2.4.2/arch/i386/boot, just go to this directory and check whether a file called "bzImage" has been produced or not. IF AND ONLY IF all the compilation steps have been executed correctly and all the options that we have had chosen in "make menuconfig" are correct, this file would be produced. If you can find this file, which I am sure you will be able to, well, you can start enjoying life already, cause you have won 75% of the battle. If you can't see this file, I am sorry, but you must have had made a mistake somewhere: Take a break and carry out all the steps again from the start. I am sure you will eventually succeed. Note: Your build process successfully creates System.map, bzImage and modules. Step 17: After bzImage is successful, copy the kernel image to /boot directory. If not done, the new Kernel MAY NOT boot. From within /usr/src/linux-2.4.2 type: cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.4.2-2ghosh and press enter. Step 18: Then type in: cp System.map /boot/System.map-2.4.2-2ghosh Step 19: Then type: "make modules_install" and press enter. You would see all the modules being installed in a new customized directory. Step 20: Now type in: mkinitrd /boot/initrd-2.4.2-2ghosh.img 2.4.2-2ghosh and press enter. This creates the Initial RAM-disk Image for our newly created customized Kernel. Step 21: Then, type in: vi /etc/lilo.conf and then add the following entry: image=/boot/vmlinuz-2.4.2-2ghosh label=GhoshKernel initrd=/boot/initrd-2.4.2-2ghosh.img root=/dev/hdc5 read-only Step 22: Save and exit. Please note that you can also change the entries in the lilo.conf file as you desire, and the root should be the root in your system: in my machine, it's at /dev/hdc5. Insert the correct info from your system. Step 23: Type in: /sbin/lilo -v -v Step 24: Read all the info on the screen. If there are no errors, well, the job's all done. Congratulations! Step 25: Reboot the system by typing in: /sbin/reboot or /sbin/shutdown -r now. Step 26: In the start-up screen, press Tab (or Control-X, if you have the LILO start-up screen), and you can see the entry: GhoshKernel along with the other pre-existing entries. Step 27: Type in: GhoshKernel and press enter. The fully working Customized Kernel will boot your system. So, you have a fully working Customized Kernel working on your system. After logging in as "root", type in: uname -r and press Enter. You can see the following entry on the screen: 2.4.2-2ghosh that proves that you are running a Customized Kernel. That's all. Also remember, that you can have as many Kernel versions as you like. That's all there is to it. In case this doesn't work out or you guys and gals face problems, make sure you e-mail me at: auspicious_blessingsindia@hotmail.com for questions and suggestions. I would really like to hear from you and help you and I hope this article helps everyone out there who wants to run a fully working Customized Kernel. Please note: This article is NOT by any means exhaustive and it does not cover all the options that one can take into consideration while compiling Kernel 2.4. The Kernel 2.4 provides 29 options in "menuconfig", and one needs to check out the others that I haven't covered here for any special requirements. This article provides one with the basic steps required for compiling and installing a customized 2.4 Red Hat Linux Kernel. Your Comments initrd=redhat kludge Comment by dave - 2001-07-04 09:03:41 as i've discovered whilst on stage, red hat is full of weird kludges such as this one. I've never had to make a ramdisk image to boot my kernel and this goes back to the days of .99pl3 kernels. when I first got into linux :d [ reply to comment ] Order of Operations... Comment by sandalle - 2001-07-03 14:33:02 Is it important whether or not you cp bzImage and System.map _before_ "make modules_install"? Also, I've never used mkinitrd (don't even have it installed on my Debian 2.2r2 (Woody) system), is this bad? My computers all work fine doing the "make modules_install" before cp, and never using mkinitrd, so am I missing something, or is this just a fluke?
* jpearson;
I am a SuSe newbie and I need to recompile my kernel for ADSL. I found some basic instructions (which I am including below) which state that I should cd into Anyone help me out or get me started. Any pointers would be greatly appreciated..
have you got the kernel sources rpm installed ? -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
On Fri, May 17, 2002 at 07:56:47AM +0200, jpearson1@wanadoo.fr wrote:
I am a SuSe newbie and I need to recompile my kernel for ADSL. I found some basic instructions (which I am including below) which state that I should cd into /usr/src/linux and do make `menuconfig`
However on my SuSE 8.0 PRO installation there is no linux directory.
Anyone help me out or get me started. Any pointers would be greatly appreciated...
Have you installed the kernel sources (from the 'd' series, package name appears to be "kernel-source" according to the SuSE website)? You might like to do 'make cloneconfig' before 'make menuconfig'. [snip] No need to quote all that... :-) HTH... -- David Smith Work Email: Dave.Smith@st.com STMicroelectronics Home Email: David.Smith@ds-electronics.co.uk Bristol, England
Hi James,
first of all, please do not use reply when you open a new thread.
Otherwise your mail will be part of a thread with totally different
subject any many people might miss your mail.
"jpearson"
I am a SuSe newbie and I need to recompile my kernel for ADSL.
Why do you think you need to recompile your kernel for ADSL? There are only very few reasons, so I do wonder.
However on my SuSE 8.0 PRO installation there is no linux directory.
Anyone help me out or get me started. Any pointers would be greatly appreciated...
The kernel sources are in the package kernel-source. You also need gcc and make. If everything is present, change to /usr/src/linux and do 'make cloneconfig'. This will duplicate the configuration of the running kernel. After that you may call 'make menuconfig' to configure the kernel. After you've configured the kernel, do - make dep - make bzlilo - make modules - make modules_install - initrd - lilo Philipp
On Thu, 02 May 2002, Yippee Three-eight wrote:
I need to recompile my kernel and I want to start with the existing options.
Before starting to compile you own kernel i would try 1 read the complete documentation 2 try to find out if your actual kernel won't suffer your claims
Where can I find the current kernel config (SuSE 8.0 Personal BTW)?
The current config/actual kernel configuration file can be found in the /boot-directory with 'vmlinuz-config' ... after you choosed to install the kernel packages (be sure to choose the right kernel-type for your maschine) simply copy the actual config in your linux directory: cp /boot/vmlinuz.config /usr/src/linux ... change in the linux directory and run make menuconfig: 'cd /usr/src/linux' and run 'make menuconfig' ... scroll down at startup-screen to 'Load Alternativ Config' and type in vmlinuz.config ... thæn read the documentation how to compile your kernel/modules
This has got to be a common question, but I've been unable to find the answer. Sorry to have to ask.
Hope you succeed Oliver -- ... don't touch the bang-bang fruit ...
Thanks for the info. I've compiled the kernel before,
but with ReiserFS, I just wanted to make sure I got
that part right. I was only recompiling the kernel I
have (for my Athlon processor).
I did run into a strange problem though. When I
rebooted I got a kernel panic because it was unable to
mount the FS. When I rebooted, I noticed some errors
that said something to the effect of "unable to load
modules xxxxxxxx" (one of which was for the Reiser
FS). The explanation was "module not found". I
double-checked and the modules were compiled in there
corretly. Finally, I just set it up to include the
modules in question fully instead of as modules. It
works now, but I still get those errors. It is very
strange.
The modules that were erroring are:
ATARAID
REISERFS
IDE-SCSI
USBCORE
USB-UHCI
Does anybody know why it is still looking for modules?
Yippee38
--- Oliver Fuchs
On Thu, 02 May 2002, Yippee Three-eight wrote:
I need to recompile my kernel and I want to start with the existing options.
Before starting to compile you own kernel i would try 1 read the complete documentation 2 try to find out if your actual kernel won't suffer your claims
Where can I find the current kernel config (SuSE 8.0 Personal BTW)?
The current config/actual kernel configuration file can be found in the /boot-directory with 'vmlinuz-config' ... after you choosed to install the kernel packages (be sure to choose the right kernel-type for your maschine) simply copy the actual config in your linux directory: cp /boot/vmlinuz.config /usr/src/linux ... change in the linux directory and run make menuconfig: 'cd /usr/src/linux' and run 'make menuconfig' ... scroll down at startup-screen to 'Load Alternativ Config' and type in vmlinuz.config ... th�n read the documentation how to compile your kernel/modules
Oliver -- ... don't touch the bang-bang fruit ...
__________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
On Sun, 19 May 2002, Yippee Three-eight wrote:
I did run into a strange problem though. When I rebooted I got a kernel panic because it was unable to mount the FS. When I rebooted, I noticed some errors that said something to the effect of "unable to load modules xxxxxxxx" (one of which was for the Reiser FS). The explanation was "module not found". I double-checked and the modules were compiled in there corretly. Finally, I just set it up to include the modules in question fully instead of as modules. It works now, but I still get those errors. It is very strange.
So you did the compilation with: make menuconfig make dep make clean make bzImage make dep clean bzImage make modules make bzlilo make modules_install ... in your /lib/modules/ you may have modules that are in your actuall kernel configuration no longer compiled as modules ... but the modules are still there ... so delete them or move them out of this folder ... by the way ... if you think your self-kernel is not working install the SuSE-kernel with yast again ... so you get the default kernel ... and try to find out if your kernel really does not fit your demands ... maybe there is another way to get your things working Oliver -- ... don't touch the bang-bang fruit ...
just put reiserfs support as Y instead of M in Yr menuconfig.
participants (10)
-
Anders Johansson
-
AnonymousCoward
-
Dave Smith
-
jpearson
-
Keith Winston
-
Oliver Fuchs
-
Philipp Thomas
-
Togan Muftuoglu
-
usb
-
Yippee Three-eight