Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

Recommended Posts

Hello guys!!!

 

I'm having a lot of trouble with kernel panic on my funtoo system.

I've tried to use the syslog-ng to get some log in order to debug, but it didn't work.

 

So, I'm here to ask you, how can I debug a kernel panic?

 

I think that I'm missing some configuration in the kernel, but don't know for sure.

 

Later, when I got home I'll post here some for details about the my kernel e gcc options.

 

In the meanwhile could anybody give me some tips about how to debug?

 

Thanks!

 

Link to comment
Share on other sites

Rather than trying to decipher the meaning of some cryptic kernel panic message (good luck with that!) I would suggest starting with a major known working kernel like debian, and then modifying from there.  Of course, doing a bunch of reading at places like pappy's kernel seeds is good too.

That way you have something that works right away, and when you are done modifying, it's still completely YOUR own custom kernel.  Make small changes, compile, boot.  If it doesn't boot you know what small changes you just made, easy to fix.

You can just emerge debian-sources, zcat /proc/config.gz > /<somewhere>/.config.  Now you have the exact config they are using and can start from there.

Good to make a listing of lspci output too, then you know exactly what devices are on your box, you can start cutting out the extra junk you don't need.  Like if you're running Intel, you can get rid of anything that starts with AMD.  Etc.

Although I make my kernels very lean, I don't really believe it makes much difference having a bunch of unused drivers, other than increasing the size somewhat, speed, I think it makes little to no difference these days.

Link to comment
Share on other sites

I've started with a major kernel, I'm using gentoo-sources.

Instead of merge debian-souces, Can't I do this with gentoo-sources?

 

I was thinking about booting with funtoo cd and chroot the environment then create a .config and use that to my kernel.

 

It's a good idea?!

 

Thanks!

Link to comment
Share on other sites

Instead of merge debian-souces, Can't I do this with gentoo-sources?

[...]

I was thinking about booting with funtoo cd and chroot the environment then create a .config and use that to my kernel.

You can keep using gentoo-sources if you like. AFAIK the difference in kernel source packages is simply the patches applied to them (somewhat distribution specifc fixes)

 

In any case, you can definitely boot into either a Funtoo CD or any live CD and copy its configuration to your own /usr/src/linux directory.

Personally, I've based my kernel on a Ubuntu 12.04 config. It provided everything and more. I then started removing stuff that I didn't want. I also configured some drivers such as SATA ones to be built into the kernel instead of as a module. This way I don't have to use initramfs.

 

You can get the live CD config either from something like /boot/, or more likely, as sputnik pointed out, from /proc/config. Simply copy it in /usr/src/linux, chroot and make.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...