Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm currently using Fedora 12 with kernel 2.6.31.9 and I was trying to upgrade to 2.6.32.2. These are the steps I followed. After rebooting and choosing this kernel from the Grub menu, I'm just greeted with a black screen with a blinking cursor and it won't proceed beyond that.
These are the commands I issued. I received an error on the first make modules about the mismatch. I then ran CONFIG_DEBUG_SECTION_MISMATCH=y and once finished I ran make modules again and it completed successfully.
Code:
Downloaded kernel package 2.6.32.2 from www.kernel.org
untar archive
make menuconfig (no changes made, saved config file)
make
make modules (received following error)
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y
make CONFIG_DEBUG_SECTION_MISMATCH=y
make modules
make modules_install
make install
cd /boot
mkinitrd -o initrd.img-2.6.32.2 1.6.32.2
Grub.conf
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_ozzylinux-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.32.2)
root (hd0,2)
kernel /vmlinuz-2.6.32.2 ro root=/dev/mapper/vg_ozzylinux-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.32.2.img
title Fedora (2.6.31.9-174.fc12.i686)
root (hd0,2)
kernel /vmlinuz-2.6.31.9-174.fc12.i686 ro root=/dev/mapper/vg_ozzylinux-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.31.9-174.fc12.i686.img
title Windows 7 Home Premium
rootnoverify (hd0,0)
chainloader +1
Let me know if there's other info I can provide that would be useful.
Did you read though the menuconfig to see if you needed to make changes?
If not then it is certain that you you not have the right options to boot your system.
The first time you do this it takes all day, and then another day, because there is a lot of reading to do. Each option has a help file. Most important is to compile in the modules you expect to need at boot time. Everything else can be a loadable module.
You won't get it right first time.
After a while you will be familiar with the layout and you will have old config files around as a shortcut.
hmm no actually I just looked through it but wasn't sure on a lot of the options so I didn't change it. I guess that makes sense, but I guess I figured during the compile it would do a lot of that automatically. A second question though, how long would it be before fedora releases this kernel through yum update?
Thanks for the help though, I'll be sure to read through the link you posted.
You have seen that compiling a new kernel is not normally done lightly. You do it if you happen to know there is some functionality in the new kernel not available in your current one. (Or if you want to learn to compile a kernel - maybe you want to be a kernel hacker?) Some people do it to tight-fit their kernel to their system
Distro kernels are usually patched so you seldom miss out on anything.
A shortcut is to recompile your distro kernel, making a config file from your existing install, then using that to jump-start your vanilla kernel compile. You'll find make gconfig or make xconfig better for this ... gui.
fedora will release the kernel update when it is done - basically. It usually takes less than a month. A specific feature may take longer to arrive in the package. If there is a bug report associated with the feature you want, you'll also find out if the next update will have a fix.
everything from above
and adding WHY build it ???
if doing this for FUN fedora might NOT be the best to do this on .There are kernel updates -- almost every week .
think about learning kernel building using CentOS , this would be a bit less stressful .
if for a very specific function then what it that .
I'm building it from where I read my broadcom wireless adapter will have b43 driver support in this new kernel version.
Also, yes a little bit of learning experience. This isn't a corporate firewall or file server I'm playing on. It's just my laptop that is dual booting Win 7. If I happen to brick it, a reinstall is only moments away.
Right - so if you use gnome, do make gconfig, if you use xde, do make xconfig. This will provide a gui with buttons and a tree view and so on. It is easier to see what is going on. You will certainly have to find the b43x driver in the tree and compile it as a module (m) - unless you need some sort of network boot through this device: I'm guessing not.
I'd recommend getting the source for a kernel you have already and examining its settings as a quick way to familiarise yourself. You want to pay special attention to which modules get compiled in to the kernel - that will be a short list, usually including the file system driver. It is not unusual for a first compile to add every other driver as a module rather than learn the exact set you need - this will make it feel a little bloated but it will work.
You may be wondering: if the installers do autodetection and stuff why cannot there be an autodetect method for kernel compile?
There sort-of is - if you use a distro like gentoo - however the kernel devs have no way of anticipating what a particular person wants to compile a kernel for or in what environment: a phone kernel is unlikely to be compiled on the device it is intended for. A distro kernel usually comes with restrictions on the environment it can be used in, making autodetection of the environment economic. Even so, you will see that it is not always successful. The most common install problems come from an installer misreading the hardware.
Right - so if you use gnome, do make gconfig, if you use xde, do make xconfig. This will provide a gui with buttons and a tree view and so on. It is easier to see what is going on. You will certainly have to find the b43x driver in the tree and compile it as a module (m) - unless you need some sort of network boot through this device: I'm guessing not.
I'd recommend getting the source for a kernel you have already and examining its settings as a quick way to familiarise yourself. You want to pay special attention to which modules get compiled in to the kernel - that will be a short list, usually including the file system driver. It is not unusual for a first compile to add every other driver as a module rather than learn the exact set you need - this will make it feel a little bloated but it will work.
You may be wondering: if the installers do autodetection and stuff why cannot there be an autodetect method for kernel compile?
There sort-of is - if you use a distro like gentoo - however the kernel devs have no way of anticipating what a particular person wants to compile a kernel for or in what environment: a phone kernel is unlikely to be compiled on the device it is intended for. A distro kernel usually comes with restrictions on the environment it can be used in, making autodetection of the environment economic. Even so, you will see that it is not always successful. The most common install problems come from an installer misreading the hardware.
Thank you, well said.
And yes, I was actually curious about the installers doing autodetection but then when compiling the kernel it doesn't. I went ahead and tried to recompile using the config file from my current kernel version but I still received the same problem - blinking cursor when choosing to load that kernel. Must be something I'm not doing correctly. I'm ready to leave it be for a while until I can learn a bit more - I'm sure I'll get the new kernel version through yum update soon enough.
There IS the make localmodconfig, which will look at your currently loaded modules and leave out the modules that you aren't using presently from the kernel build conifguration. I tried it out on 2.6.32.2 and it worked reasonably well. There are some caveats and landmines to sidestep which are discussed in a good thread on LQ. It's probably a good idea to make gconfig/menuconfig afterwards for proofreading so there aren't any surprises.
I am not sure your blinking cursor problem is your configuration. I just installed Ubuntu 10.04 which features the 2.6.32-23 and the 2.6.32.2 kernel in its official released distro. When I try to boot the .2 kernel I get exactly the same behavior you describe. My guess is it's not configuration of your custom kernel but some bug in some driver.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.