compiling the kernel-source


Recommended Posts

Hello all. I'm trying to get my brain around how all this linux stuff works. Decided I'd start a new thread too, as the other one was getting off topic.

I'm using Mandrake 9.2, and I got the linux kernel-source for 2.4.22-10mdk (as was instructed to me from the #mandrake chatroom on efnet). I've been playing with different ways of configuring the kernel, trying to get a build that I think is best for my system. Currently I think I screwed something up under "Console adapter" options, because whenever I try to boot into that kernel I can't see anything that's going on on my screen (garble video mode), and it never gets anywhere, just stops in error (my lights on my keyboard start flashing). What error?, I'm not sure...can't read it. But then when i try to go back into the kernel that mandrake came with, i get a "Failed init" error message. I can only boot into failsafe mode. From failsafe mode i can recompile my kernel, so I figure i can probably resolve the issue.

Here are my questions:

1. Is there anyway to reset all the configuration options in the (for lack of a better word) "make menuconfig" to the stock options?

2. How do different kernels keep track of different installed modules? Can they? Can I accidently uninstall a module that Kernel A needed while setting up and compiling Kernel B?

3. How do I get the nice boot screen that comes with the stock mandrake kernel usable in my kernels? How do I get the same video mode as the "failsafe" kernel uses for boot/nongui interface? That looks the best on my monitor, and some of the other ones don't seem to play nice with my video adapter or monitor or something, 'cause the first 10 to 15 characters from the left are truncated off the screen. Nothing I do to my monitor fixes it. When I get into a gui i'm good, but until then it is really hard to figure out whats going on.

Thanks for all the help guys. I'm learning a lot, and enjoying it. I feel like i'm a few hairs from having a really nice linux system.

-Nic

Link to comment
Share on other sites

1. You can use your old .config file... although if that's giving you "failed init" errors, there may be something wrong with your system files (or maybe not, just a guess :) ). Use the cp command to copy the .config file in /usr/src/linux-<your old kernel> to /usr/src/linux-2.4.22-10mdk (or /usr/src/linux, if you've symlinked it correctly). Then, in /usr/src/linux-2.4.22-10mdk, type 'make oldconfig'. It will read the options in your old configuration file, and prompt you only for new options that have come up in the 2.4.22 release.

2. They generally keep the modules in a directory corresponding to their own kernel name - eg. /lib/modules/2.4.22-10mdk . So therefore, I'd have to say, no... the modules from Kernel A won't be overwritten when installing Kernel B.

3. Not sure on this one, sorry. I've never used Mandrake.

Link to comment
Share on other sites

Thanks for the info, but I really just need to know how to set stock options are for that kernel, not options are for another kernel. I only have one kernel-source installed. I had to download it because mandrake didn't come with the kernel-source. I had a working kernel based off the stock options with some adjustments, then I screwed something up. Everything works fine in failsafe mode, only its weird..in failsafe mode if i do "shutdown now" it brings me back to a console, if i do "shutdown now" again it then puts me into xFree86 :wacko:

Link to comment
Share on other sites

Everything works fine in failsafe mode, only its weird..in failsafe mode if i do "shutdown now" it brings me back to a console, if i do "shutdown now" again it then puts me into xFree86 :wacko:

I think that either executing another shutdown command will shut it down at this point, or an exit command. It's been a while since I have been in safemode.

I don't know the answers to your other questions, sorry.. :(

Link to comment
Share on other sites

Ok, the only way I can figure out how to get my stock options back for my kernel-source is to uninstall/reinstall the source. So that is what I did. I recompiled my kernel with very little done to the stock settings (except a few adjustments that should have been fine..they worked before anyway). But I'm still not getting through the boot. But at least now I can read what my error message is:

"swsusp 1.0.3: Missing or invalid swap partition location(resume=parameter). Disabled

Kernel Panic: VFS: Unable to mount root fs on 03:01"

not really sure what to do from here. I guess I'll get into harddrak from failsafe mode and take a closer look at my swap partition.

----HELP :( ---

-Nic

Link to comment
Share on other sites

Ok, the only way I can figure out how to get my stock options back for my kernel-source is to uninstall/reinstall the source. So that is what I did. I recompiled my kernel with very little done to the stock settings (except a few adjustments that should have been fine..they worked before anyway). But I'm still not getting through the boot. But at least now I can read what my error message is:

"swsusp 1.0.3: Missing or invalid swap partition location(resume=parameter). Disabled

Kernel Panic: VFS: Unable to mount root fs on 03:01"

not really sure what to do from here. I guess I'll get into harddrak from failsafe mode and take a closer look at my swap partition.

----HELP :( ---

-Nic

Ah you should get rid off initrd or generate it and add to your grub (storngly suggest using it to lilo)/lilo config.

To get rid tune your source this way:

select ext2 , ext3 , reiserfs as compiled inito kernel (Y; not M) (from filesystems)

optionally remove initrd suppurt

recompile

reboot

ps redhat kernel will certainly WORK under mandrake and all recent linux boxes. Just install the rpm with rpm -i or open archive with mc and extract manually. Hope you know how to use grub (see: man grub)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.