[opensuse] kernel building and make xconfig
I was just reading in the SuSE Admin Guide for 9.1 about the kernel compiling procedure. I read something that caught my attention because I didn't notice it before and I don't understand it. In section 10.3.3 it says "As the configuration with make xconfig is not as well maintained as the other configuration possibilites, run the command make oldconfig after using this configuration method." Can anyone explain this? What is missing from xconfig and what does the make oldconfig do to correct this? I tried to find a more recent manual or howto that covers kernel building but I don't find any at http://www.opensuse.org. Can anyone please tell me where I can find some current instruction on kernel building? I also noticed in my 9.1 book, the method to use before configuring the kernel is zcat /proc/config.gz > .config make oldconfig I noticed that make cloneconfig from earlier instructions still works but it is not mentioned in the 9.1 instructions. Are the results different? Damon Register -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Damon Register wrote:
I was just reading in the SuSE Admin Guide for 9.1 about the kernel compiling procedure. I read something that caught my attention because I didn't notice it before and I don't understand it. In section 10.3.3 it says "As the configuration with make xconfig is not as well maintained as the other configuration possibilites, run the command make oldconfig after using this configuration method."
Can anyone explain this? What is missing from xconfig and what does the make oldconfig do to correct this?
I think SuSE 9.1 was the first SuSE distribution which came with kernel 2.6. Due to the change of the kernel build system (kernel 2.4 used a different way to configure and compile the kernel), the "make xconfig" part of the kernel build system was not very well maintained in early 2.6 kernels. As far as I know, developers had focussed on the "make config" or "make menuconfig" part. It could be that above mentioned comment in the Admin Guide is related to these circumstances. However, I do not recall any details - SuSE 9.1, that's a long time ago ;-)
I tried to find a more recent manual or howto that covers kernel building but I don't find any at http://www.opensuse.org. Can anyone please tell me where I can find some current instruction on kernel building?
http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html This Howto replaced the old "The Linux Kernel Howto". It's not SuSE specific. I wrote a SuSE-specific Kernel Howto, but it's only available in German at the moment, see http://lists.opensuse.org/opensuse/2007-03/msg01324.html for details. There's also an official SuSE guide written by Andreas Gruenbacher, see http://www.suse.de/~agruen/kernel-doc/ for details (this document is also part of the SuSE kernel sources).
I also noticed in my 9.1 book, the method to use before configuring the kernel is
zcat /proc/config.gz > .config make oldconfig
I noticed that make cloneconfig from earlier instructions still works but it is not mentioned in the 9.1 instructions. Are the results different?
No, the results should be the same. However, "make cloneconfig" is only available with SuSE kernel sources. The Makefile of the Vanilla kernel sources does not know about this target. HTH, Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thomas Hertweck wrote:
I think SuSE 9.1 was the first SuSE distribution which came with kernel I think that was one reason I decided to buy it back then
http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html Thanks. I bookmarked it
specific. I wrote a SuSE-specific Kernel Howto, but it's only available in German at the moment, see Interested in translating some day?
http://lists.opensuse.org/opensuse/2007-03/msg01324.html for details. that's embarrassing. I found that right next to my current post. I see you provided enough info in response to answer my questions too.
There's also an official SuSE guide written by Andreas Gruenbacher, see http://www.suse.de/~agruen/kernel-doc/ for details (this document is I started reading it. I see it answered my question about what cloneconfig does.
The only thing I haven't figured out at this point is why the previous discussion talked about make modules and make modules_install but didn't seem to cover building the kernel. Did I miss something there? Was Randall intending to build only the modules? Damon Register -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Damon Register wrote:
[...] Interested in translating some day?
Well, writing this howto in German was intentional. Usually, you find quite a lot of information about the kernel in English but only few "readable"[*] documentation in German. Many people on the German suse-linux list complained about this fact, so I decided in 2002 to write an up-to-date kernel howto in German. In principle, I could translate it but, well, it's a lot of work and I am not sure whether it's worth doing. As mentioned above, there is quite a lot of stuff available in English - it's maybe not SuSE-specific. However, for the SuSE-specific part you can always refer to Andreas Gruenbacher's documentation which is included in the SuSE kernel sources.
[...] The only thing I haven't figured out at this point is why the previous discussion talked about make modules and make modules_install but didn't seem to cover building the kernel. Did I miss something there? Was Randall intending to build only the modules?
Yes, the discussion was about re-enabling USB_DEVICEFS which had been disabled in the SuSE 10.2 standard kernel at that time. USB_DEVICEFS can be enabled by recompiling the usbcore module, so we focused on modules, not on building a complete kernel. Regards, Th. [*]"readable" in this context means: the documentation is not simplistic but also not too complex and technical; it should focus on the practical aspects a user is interested in... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thomas Hertweck wrote: > suse-linux list complained about this fact, so I decided in 2002 to > write an up-to-date kernel howto in German. In principle, I could Oh, now I see > it's worth doing. As mentioned above, there is quite a lot of stuff > available in English - it's maybe not SuSE-specific. However, for the I have been looking at those items from your earlier post as well as one mentioned by Randall. The problem is that being a non-expert, I have a difficult time applying some of that to SuSE. > SuSE-specific part you can always refer to Andreas Gruenbacher's > documentation which is included in the SuSE kernel sources. I have and it is helping me. I tinkered a little more last night but still have some questions. Of the three listed docs: 1. http://www.suse.de/~agruen/kernel-doc/ 2. http://www.howtoforge.com/kernel_compilation_suse_p3 3. http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html docs 2 and 3 cover the idea of keeping the old kernel along with the new one in case the new one doesn't work but it isn't very clear for me. Doc 1 has a really nice summary of the steps for building but doesn't mention keeping the old kernel. Is there some really easy way to keep the old? I vaguely remember something about copying /boot/vmlinuz. Do I copy that and the /boot/initrd-x.img files then tamper with /boot/grub/menu.lst to include the old one? Am I understanding the process correctly if I modify doc 1 instructions like this (1) Install kernel-source.$ARCH.rpm. Change to the /usr/src/linux directory. (2) Configure the kernel (for example, ``make oldconfig'' or ``make cloneconfig'', see HOW TO CONFIGURE THE KERNEL SOURCES). (3) Copy /boot/vmlinuz and /boot/initrd-x.img (4) Build the kernel and all its modules (``make''). (5) Install the kernel and the modules (``make modules_install'', followed by ``make install''). This will automatically create an initrd for the new kernel as well (see ``mkinitrd -h''). (6) Add the kernel to the boot manager. When using lilo, run ``lilo'' to update the boot map. Doesn't the new kernel already get put into grub by the make install? could step 6 be changed to something like this (6) Add the old kernel copied in step 3 to the boot manager. When using lilo, run ``lilo'' to update the boot map. Damon Register -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Damon Register wrote:
[...] docs 2 and 3 cover the idea of keeping the old kernel along with the new one in case the new one doesn't work but it isn't very clear for me.
Yes, I recommend this as well. When you compile your own kernel, it's very easy to do that. All you have to do is follow some simple rules.
[...] Is there some really easy way to keep the old? I vaguely remember something about copying /boot/vmlinuz. Do I copy that and the /boot/initrd-x.img files then tamper with /boot/grub/menu.lst to include the old one? [...] (5) Install the kernel and the modules (``make modules_install'', followed by ``make install'').
I would not recommend using "make install" for various reasons (I made some bad experiences with this command). It's really simple to do it by hand: first of all, you have to make sure that the kernel you are going to compile has a unique kernel version. With SuSE kernel sources, you can do that at configuration time, you don't have to change the kernel Makefile. Simply add a "local version" string under "general setup" (I hope this is still the correct way to do it, I have no 10.2 here, only a SuSE 10.0 system). Then compile the kernel and the modules. All of this can be done as normal user. To install the modules and the kernel, you have to become root. As root, use "make modules_install" to install the kernel modules. This will create a directory under /lib/modules, e.g. "2.6.20.2-local" (here, you can see the string that has been added as mentioned above to avoid a clash with any default SuSE kernel or any other kernel on the system). Then you have to copy the kernel image and System.map, here an example for i386 architecture (you're in the top-level directory of the kernel sources or in the build directory if you used one for the kernel compilation): $> cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.6.20.2-local $> cp ./System.map /boot/System.map-2.6.20.2-local Finally, you have to create an initial ramdisk. The actual command to do that will vary depending on whether you want a bootsplash etc., see the mkinitrd help for details. $> cd /boot $> mkinitrd -k vmlinuz-2.6.20.2-local -i initrd-2.6.20.2-local And last but not least, you have to add the new kernel to your bootloader config. If you have an existing section in grub's menu.lst like title linux root (hd0,5) kernel /boot/vmlinuz root=/dev/hda6 vga=0x342 resume=/dev/hda7 initrd /boot/initrd then just copy that and make the necessary changes: title linux.new root (hd0,5) kernel /boot/vmlinuz-2.6.20.2-local root=/dev/hda6 vga=0x342 resume=/dev/hda7 <== this should be at the end of the previous line initrd /boot/initrd-2.6.20.2-local Of course, this here is only an example which will most likely not work on your system. That's all. Now you should reboot and select the new kernel in the grub menu. If you configured your kernel correctly and if there are no other problems (you've installed the kernel correctly and you made all necessary changes to menu.lst, etc.) then the new kernel should boot successfully. If you used any third-party closed-source kernel modules with the old kernel, then you have to recompile those modules for the new kernel. If one of those modules is required to boot the system, then you have to do that before rebooting the system and add it to initrd; otherwise booting the new kernel will end with a kernel panic. However, if you followed the steps mentioned above, you would then be able to boot the old kernel again to solve the problems... ;-) HTH, Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is a new article about that topic in LfL: http://forgeftp.novell.com/lfl/.html/building-kernel.html -- -Alexey Eremenko "Technologov" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu 28 June 2007 21:40:47 Alexey Eremenko wrote:
There is a new article about that topic in LfL: http://forgeftp.novell.com/lfl/.html/building-kernel.html
Thanks - that is very useful. -- Pob hwyl / Best wishes Kevin Donnelly www.kyfieithu.co.uk - KDE yn Gymraeg www.klebran.org.uk - Gwirydd gramadeg rhydd i'r Gymraeg www.eurfa.org.uk - Geiriadur rhydd i'r Gymraeg www.rhedadur.org.uk - Rhedeg berfau Cymraeg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 26 June 2007 19:28, Damon Register wrote:
Thomas Hertweck wrote:
I think SuSE 9.1 was the first SuSE distribution which came with kernel
I think that was one reason I decided to buy it back then
Thanks. I bookmarked it
specific. I wrote a SuSE-specific Kernel Howto, but it's only available in German at the moment, see
Interested in translating some day?
http://lists.opensuse.org/opensuse/2007-03/msg01324.html for details.
...
The only thing I haven't figured out at this point is why the previous discussion talked about make modules and make modules_install but didn't seem to cover building the kernel. Did I miss something there? Was Randall intending to build only the modules?
I guess this refers to me. I did start the thread in which 2007-03/msg01324 appeares. My interest (actually that of a friend who does not have my level of Linux knowledge and expertise whom I'd persuaded to switch from Windows) was in getting a 10.2-compatible kernel that had the USBDEVFS enabled. That's not possible as a loadable module, you have to configure the kernel to have it in the resident kernel code. Which reminds me... We were told that an updated kernel with the USB device filesystem reenabled would be made available through the usual update mechanisms. Has that happened?
Damon Register
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday June 27 2007 1:29:24 pm Randall R Schulz wrote:
Which reminds me...
We were told that an updated kernel with the USB device filesystem reenabled would be made available through the usual update mechanisms. Has that happened?
Yes. 2.6.18.8-0.3 has it re-enabled. Works fine.
Randall Schulz -- Stan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 27 June 2007 17:03, S Glasoe wrote:
On Wednesday June 27 2007 1:29:24 pm Randall R Schulz wrote:
Which reminds me...
We were told that an updated kernel with the USB device filesystem reenabled would be made available through the usual update mechanisms. Has that happened?
Yes. 2.6.18.8-0.3 has it re-enabled. Works fine.
Great, thanks. I'll tell my friend to update. He's been waiting to use his PDA under Windows via VMware Server.
Stan
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Alexey Eremenko
-
Damon Register
-
Damon Register
-
Kevin Donnelly
-
Randall R Schulz
-
S Glasoe
-
Thomas Hertweck