My laptop would keep crashing and the network modules would fail for some reason. It was doing this daily and I got so tire of it that I decided that I would have to do the following things:
- Remove unneeded modules and options from the kernel.
- If it still gave me problems first look in the logs for messages
- Run strace & ktrace on the applications that I was using during the panic.
- If its still giving me problems rebuild the kernel again but this time with logging.
The Rebuild Process
First find out exactly what hardware I have by running the commands either one of these commands lspci, or lshw. I did not need to run lsusb to see the usb devices since either of the two latter commands will give you that. Then After I followed steps 2 - 2.5 of Howtoforge's fedora compilation guide. But during step 2.5 I would do the following;
As I was selecting options for each kernel subsystem the output of lswh -class
After I followed steps 2.6 - 2.7 I was able to reboot the laptop with the custom kernel on the first try. The fact that my compile and build went so smoothly tells you that Falko Timme wrote a good article on the kernel build process and I am not going to duplicate his instructions here.
Recompile's Impact
After I did that the have been no kernel panics and power management is working again. Before the kernel recompile if the laptop got disconnected for more than 5 seconds it would shut down. Even though it was supposed to go into hibernate mode it would not instead processes would die an ugly groody death, the disk would need to be fscked and I would get irritated about the cable being jostled.
Now the battery's power levels are detected again so I can run it for half an hour on the battery. There are no kernel panics and the apps are running better. Unlike the times when I used to rebuild my kernel for Slackware I did not have to go through separate steps to make sure that the sound & wifi cards were working. I'm guessing that at least for the wifi card since its built in and not using the PCMCIA slot it makes it easier for Linux-2.6.34.7 kernel to handle it.
Possible Project
Since it took me so long to get done with make menuconfig I think I will try and automate that step by generating a list of a machine's hardware then using that list of hardware components and desired services to turn on options in the kernel .config file.
That might cut down on the time I have to review the hardware. Then to take it to the next level actually have the kernel be built and installed on VM to see if it boots the machine. And if the build fails I can review why. But since the system is a lot more stable right now I will not be doing anymore troubleshooting of crashes since there have not been any mission critical failures in the past two weeks.
No comments:
Post a Comment