LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2009, 03:59 PM   #1
Kristian2
Member
 
Registered: May 2004
Location: Netherlands
Distribution: Slackware 13
Posts: 97

Rep: Reputation: 15
what is the best way to replace the generic modules when optimized kernel fails?


I spent almost two days configuring the new kernel in the menuconfig, read almost all helpfiles and checked the chipsets of my motherboard, Bios, Sata controller, cut out everything I don't need.. somewhat frustrating then when the kernel halted after reboot, I checked it again, discovered some errors in my configuration.. and then the same again. That's the kernel-building-learning-process.
I haven't tried for a third time yet (too late now), still found things I don't need, and I still wonder what I could have done wrong to make the kernel halt so soon.
Restoring the previous kernel and System map file is not the problem, but restoring the modules for the generic kernel is, at least what is the best way to do this?
I built the kernel on another partition (want to keep the root partition as clean as possible). I have built the generic object files as well as my optimized kernel objects in a separate directory.
So what is the best way to place the generic modules back in place?
Some clever line with a find, '|' and cp command to get the *.ko files from the generic build back to /lib/modules/kernel? Perhaps I missed a post on this? 12.2 works somewhat different compared to the previous versions on this.
(I will always keep the generic modules BTW because in case of a motherboard failure, that has happened before..)

Last edited by Kristian2; 02-24-2009 at 04:00 PM.
 
Old 02-24-2009, 04:07 PM   #2
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
You could just reinstall the "kernel-modules-smp" package from your Slackware disk.
 
Old 02-24-2009, 04:07 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,562

Rep: Reputation: Disabled
cd to slackware/a in your installation media then issue following command:
upgradepkg --install-new --reinstall kernel-modules-2.6.27.7-i486-1.tgz kernel-modules-smp-2.6.27.7_smp-i686-1.tgz

That should do the trick.
 
Old 02-24-2009, 04:36 PM   #4
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
cd to slackware/a in your installation media then issue following command:
upgradepkg --install-new --reinstall kernel-modules-2.6.27.7-i486-1.tgz kernel-modules-smp-2.6.27.7_smp-i686-1.tgz

That should do the trick.
And if one had to boot from the install media? where would slackware/a be located, and how does one issue the above command so that the proper filesystem is affected? In other words, if I had multiple bootable os partitions, how do I issue the upgradepkg command and tell it WHICH one to upgrade?

/newbie
 
Old 02-24-2009, 05:51 PM   #5
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
In the truest spirit of Linux, I read article after article, scoured forums, booted from a few different sources, then finally found the answer in the darned MAN file. ;-)

ROOT=/mnt/sda1 upgradepkg --install-new --reinstall kernel-modules-2.6.27.7-i486-1.tgz

installs/upgrades the package to the root partition of another disk (in this case sda1).
 
Old 02-24-2009, 05:53 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,562

Rep: Reputation: Disabled
Well, I'm not sure I understand your question.

You update a Linux system, not a (bootable or not) partition.

So, start the system you want to upgrade and issue the aforementioned command.

Do that for every system you need to update.

Still, you can issue a specific command while changing the root partition: it is the purpose of the chroot command. See "man chroot" or "info coreutils 'chroot invocation'" (do not type the double quotes).
 
Old 02-24-2009, 06:52 PM   #7
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
So, start the system you want to upgrade and issue the aforementioned command.
My question was simply "What if it won't start because you munged your kernel build?"

This happened to me today. I had to boot from a SLAX usb stick to get into the system to repair it.

Yes, I'm a newb, so what may seem obvious to you isn't to me yet.

Thanks for your reply.
 
Old 02-24-2009, 07:03 PM   #8
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by head_shot View Post
My question was simply "What if it won't start because you munged your kernel build?"

This happened to me today. I had to boot from a SLAX usb stick to get into the system to repair it.

Yes, I'm a newb, so what may seem obvious to you isn't to me yet.

Thanks for your reply.
You could also boot your system from the Slackware install disk.
Boot from the CD and type something like:
Code:
hugesmp.s root=/dev/sdax rdinit= ro
 
Old 02-24-2009, 07:42 PM   #9
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by piratesmack View Post
You could also boot your system from the Slackware install disk.
Boot from the CD and type something like:
Code:
hugesmp.s root=/dev/sdax rdinit= ro
I actually did try that and got the same fail on module load. Wish I had the exact error in front of me, but I think it was trying to load the modules that got munged off the hard drive, and that's where it was failing. I'm going to try your suggestions from the other post. Thanks!
 
Old 02-24-2009, 07:48 PM   #10
drumz
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ, USA
Distribution: Slackware
Posts: 293

Rep: Reputation: 137Reputation: 137
To the OP: I know it's too late now, but you can append a local version to your kernel build, so all of the /lib/modules/[kernel-version] directories will be unique, so nothing ever gets clobbered. For my own sanity, I also always name my build directory after the (custom) kernel version as well.

Using xconfig the custom version is set at General setup->Local version. I imagine menuconfig would be the same.
 
Old 02-24-2009, 08:25 PM   #11
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by head_shot View Post
I actually did try that and got the same fail on module load. Wish I had the exact error in front of me, but I think it was trying to load the modules that got munged off the hard drive, and that's where it was failing. I'm going to try your suggestions from the other post. Thanks!
Good luck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the best way to replace the generic modules when optimized kernel fails? Kristian2 Slackware 1 02-24-2009 04:16 PM
Installing linux-restricted-modules-2.6.22-14-generic Nis2k Linux - Newbie 1 01-09-2008 08:53 PM
Unresolved Symbols Kernel Modules Athlon Optimized terosaur Slackware 2 02-05-2007 07:46 PM
New kernel fails to boot: It can't find modules.dep though it's there lixy Linux - General 2 04-16-2005 08:23 AM
need printer config help...instmod: /lib/modules/kernel/drivers/scsi/scsi_mod.o fails krome Linux - Hardware 2 01-16-2004 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration