LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-11-2007, 07:51 AM   #1
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
Kernel Panic vanquished!


Howdy All,

I have just successfully solved another kernel panic. Here's my story:

Yesterday afternoon, I decided it's finally time to install Wine so I can use the Win$tink applications I tried to leave behind on my workplace box (EndNote and 4D Client). After the 35:00 compile -- wait, after three 35:00 compiles of Wine, I kept getting the same error messages about "your kernel's not good enough." It mentioned something about upgrading glibc -- so I downloaded the source and read page after page of "If you do this wrong, you will trash your system." Instead, the Wine FAQ specifically mentions that Slackware needs a 2.6 kernel to run, so that should solve the problem. I had previously installed a 2.4 kernel because when I installed the huge26.s kernel the ethernet card was not detected.

So, things were going along swimmingly until Amarok started crashing regularly saying

"xine could not initialize any sound drivers"

This was entirely expected since I was getting a message on boot saying that no sound device was found. I knew something had gone wrong when I installed the new kernel, but I didn't really feel like mucking about with the kernel any more, since I had work to do.

Of course, my wife is still back in Colorado with the baby, so I have no one to go home to except frozen pizza. So, I decided to have freshly made (relatively more freshly made) pizza from the hospital cafeteria and stay until I figured this out.

So, I read all about it on Slackware.com, LQ (us), and everywhere else, and figured out that I need an initrd. I'd never made one myself, but this seemed like a perfect time. Following the advice I got in another thread about the most sensible way to install a kernel, I downloaded

kernel-generic-2.6.17.13-i486-1.tgz
kernel-modules-2.6.17.13-i486-1.tgz
kernel-source-2.6.17.13-noarch-1.tgz

and

mkinitrd...tgz

Then I installed the kernel with
Code:
installpkg kernel-generic-2.6.17.13-i486-1.tgz
installpkg kernel-modules-2.6.17.13-i486-1.tgz
installpkg kernel-source-2.6.17.13-noarch-1.tgz
installpkg mkinitrd...tgz (the latest one)
So, I read Pat's manpage in README.initrd and it sounded easy, so I went ahead and ran
Code:
mkinitrd -c -k 2.6.17.13 -m reiserfs
I got a weird error about no loop device and thought "hmmm...better check this out..."

So I did it again running
Code:
mkinitrd -c -k 2.6.17.13 -m reiserfs -f reiserfs -r /dev/hda1
Where -k is the kernel, -m is a module for reiserfs, -f is the filesystem of the root device and -r is the root device itself. These options simply copy your entries into initrd-tree files called "rootfs" and "rootdev" that get catted out in the process of making the initrd. I got the same errors, but they looked fairly innocuous.

I added the appropriate entries to /etc/lilo.conf (this is all in README.initrd) and I got that excited "new kernel" feeling and rebooted.

My beloved framebuffer returned, so that problem was solved...but then...

...then...!
Code:
VFS: Mounted root (ext2 filesystem)
No filesystem could mount root, tried: ext2
kernel panic: VFS could not mount root on unknown block (3,1)
I knew this was BS because the root device is reiserfs, not ext2, and if it tried, it didn't try very hard.

So, I booted the old 2.4 kernel, went into fluxbox and looked all over the web. I estimated that there are thousands of kernel panic forum postings out there. The funny thing is, none of them ever come to any conclusion. That's weird because this has happened in different ways and for different reasons to me at least ten times, including straight-up installs of user-oriented distros like PCLinuxOS, my home system. Another funny thing is this is rarely covered in FAQ pages, and if it is, there's no conclusive answers there either. I read pages and pages of kernel panic posts: people either bailed out or just said "I got it to work!" without any explanation of how. A third layer of irony is that I was in a bookstore the other day and read a completely conclusive and authoritative section about kernel panics: one that included the warning "Don't listen to all those proposed solutions on the internet: this usually happens for the following reasons." I should have bought that book.

So I tried about ten of these proposed solutions, including some directly from Slackware forums and I still got exactly the same message. It was getting close to 10:00PM, so I decided I'd get home; I could sleep in my office, but how much of a nerd you are is a choice, and I decided to stop there. Plus, the computer worked fine. Only my tinkering had "screwed up" anything, and I could always boot the 2.4 kernel. This is the beauty of UNIX. It is if you're smart enough to keep your old kernel in LILO or a boot disk handy, anyway

So then I realized on the walk home from the bus that those messages from mkinitrd were telling me something: there was no reiserfs module to initialize the initrd filesystem. That's because when I installed the 2.4 kernel, I did not install any modules. Yes the underlying filesystem was reiserfs, but mkinitrd can't do anything with that. Also, not installing any modules led to this problem in the first place. I knew there was a solution lurking somewhere there.

The solution was so easy I had to spend twenty minutes writing about it on a linux forum that you're reading right now.

1. I put in Slackware disc 1
2. Go to /mnt/cdrom/kernels/huge26.s
3.
Code:
cp System.map.gz /boot/System.map
cp bzImage /boot/vmlinuz
4. Edit /etc/lilo.conf:

Code:
image = /boot/vmlinuz.old
  root = /dev/hda1
  label = "Slackware24"
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /boot/vmlinuz
#  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = "Slack26huge"
  read-only
remember to run

Code:
 
lilo -v
5. Then I rebooted into the huge26s kernel
6. cd boot, then

Code:
mkinitrd -c -k 2.6.17.13 -m reiserfs -f reiserfs -r /dev/hda1
7. Edit /etc/lilo.conf again:
Code:
image = /boot/vmlinuz.old
  root = /dev/hda1
  label = "Slackware24"
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /boot/vmlinuz
#  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = "Slack26huge"
  read-only 
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = "Slack26test"
  read-only
# Linux bootable partition config ends
I rebooted with "Slack26test" and I'm now writing this. Time to go edit /etc/lilo.conf again.

NOw, the astute (ass-toot) observers among you will notice that I'm still using the System.map and bzImage from the huge26.s kernel. If anybody would like to explain exactly what is going on here, I'd love to hear about it.

What I know is that I'm glad I solved the problem, the machine booted beautifully with no device errors: the ethernet card was detected as was the sound device.

Talk to you all soon,

Joel
 
Old 01-11-2007, 09:18 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Congratulations.

On your quote: BSD is for people who love "Berkley" UNIX. Us "System V" UNIX types can take it or leave it

Actually FreeBSD is a fairly neat little OS. I inherited a couple of those when I got to this job and was surprised at how easy it was to figure out how to do things that seem more complicated on Linux and other UNIX variants.
 
Old 01-11-2007, 11:11 AM   #3
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Original Poster
Rep: Reputation: 31
I think that's funny that you point it out about SysV vs. BSD. My signature is actually a paraphrasing of someone else's signature. The third sentence is mine. I really liked BSD because of its simplicity and the thought of having a unified system where as hard as many packagers try, Linux ends up looking like Dr. Frankenstein's OS. Most importantly, I really really like unix. I'm spelling it like "unix" because I mean it in the broadest sense of the term: UNIX-like operating system.

In addition, as much as I hate Micro$not, I got tired of reading all anti-Micro$tink stuff on Linux webpages -- it gives people the impression that the only reason to use it is because it ain't Micro$ludge. I was attracted to Linux after trying FreeBSD because a lot of distros are already set up for desktop use -- since I was just starting out it seemed like a better option.

After getting my feet wet, I decided to try Slackware in order to learn and I've learned that it's an excellent system. It's very UNIX-like, in the sense of BSD, and it has all the stuff available that a desktop user asks for. So, when I started at the Slackware login prompt, it felt like logging into my original UNIX account (which was actually SunOS as long as we're splitting hairs). That gave me a really good feeling. And I figured out that Slackware is not fragmented like other Linux distros, it's a tightly integrated package that at once integrates additions well. That's a very BSD-ish priority.

So I figured out that with Slackware I could hate Micro$oil, love unix, and get a great system that works the way I want.

Joel

Last edited by trashbird1240; 01-11-2007 at 11:12 AM.
 
Old 01-11-2007, 12:38 PM   #4
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
You want the answer? kernel-generic is not huge26.s, so the generic kernel + huge26.s modules (The ones you installed) can have gaps.

You would have saved alot of heartache and scratching had you READ THE CHANLOGS AND README. Yep, it's in there.
 
Old 01-11-2007, 01:11 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Big early UNIX advice there: RTFM

Of course nowadays it should be RTFWP (...web page instead of manual)

 
Old 01-11-2007, 01:47 PM   #6
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Ok, I have a noob question here

When people talk about "installing" a kernel, I'm assuming this means that they are installing a pre-compiled kernel from the Slackware cds. Correct?

Now as we have seen from Trashbird1240's post, this can be a somewhat complex process. So my question is: Why not just compile the latest kernel from kernel.org if you are going to go through that kind of trouble? As I understand it, there are benefits to be gained from compiling The Kernel for your own machine; like better performance, smaller kernel, etc.

Am I missing something here?
 
Old 01-11-2007, 02:00 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
In case my post in another thread confused you, I have posted a small correction/warning that huge26.s is not the same as the generic kernel (I never said it was, but I also never said it wasn't). The generic kernel only has built-in support for ext2, so you can only boot a kernel from an ext2 partition.
 
Old 01-11-2007, 02:35 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
When you think of the long and gloomy history of man, you will find more hideous crimes have been committed in the name of obedience than have ever been committed in the name of rebellion.
- C. P. Snow (1905 - 1980)
Too bad he didn't live long enough to see the Rwanda/Burundi genocide. It might have changed his mind about the nobility of rebellion.
 
Old 01-11-2007, 02:40 PM   #9
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
Quote:
Originally Posted by mattydee
So my question is: Why not just compile the latest kernel from kernel.org if you are going to go through that kind of trouble? As I understand it, there are benefits to be gained from compiling The Kernel for your own machine; like better performance, smaller kernel, etc.

Am I missing something here?
Yes you are, ppl are afraid of kernel compiling. Especially newbies.
I don't know why tho, maybe they read to much about 'Kernel Panic's
 
Old 01-11-2007, 02:41 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
That and it takes a loooooooong time on older machines ... and even on my new ones. I only compile a kernel when I have to ... so that's been twice.
 
Old 01-11-2007, 08:11 PM   #11
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Quote:
Originally Posted by jlightner
Too bad he didn't live long enough to see the Rwanda/Burundi genocide. It might have changed his mind about the nobility of rebellion.
"more hideous crimes" not "all hideous crimes". This does NOT entail that all rebellious acts must be good - QED

Typical black and white - "you're either with us or against us" thinking. Thank you for strengthening Mr Snow's point. God bless.

As for the topic at hand:

I guess I see the risk of installing a kernel as being almost as high as that of compiling, with the benefits being significantly higher for compiling...
 
Old 01-12-2007, 08:48 AM   #12
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by cwwilson721
You want the answer? kernel-generic is not huge26.s, so the generic kernel + huge26.s modules (The ones you installed) can have gaps.

You would have saved alot of heartache and scratching had you READ THE CHANLOGS AND README. Yep, it's in there.

I'm sorry if my post gave you the impression that there was any "heartache" involved. I'm well past getting emotionally involved when I'm having difficulty with a machine.

Joel
 
Old 01-12-2007, 09:05 AM   #13
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Original Poster
Rep: Reputation: 31
Okay, to follow up my earlier post and correct a few misinterpretations:

1) Even though my story was long and I said that I spent a long time on it I was not -- I repeat not -- frustrated or annoyed with any of this. It had happened before and I had successfully dealt with it. That's how I learn things.
2) I read tons of manual pages, how-tos, etc., none of the ones I read mentioned anything about how the installation I did would lead to the problem I had, which by the way was not a big deal.
3) TeX_MeX, your post did not confuse me in any way about how to install the kernel. I did exactly what you said: the thing that confused me was that you were saying it was easier to do something with more keystrokes (and different from the documentation that i had read) than what I was saying. Maybe I was doing it wrong but again: I use the HAL 9000 strategy to learn about things. That is, DO IT, if something goes wrong, figure out what you did wrong and do it right. Nothing was harmed by doing it that way. I know enough to know that I can install a new kernel and always get the old one back as long as I have a way to boot it.

The original intent of my post was (a) to provide some entertainment and (b) to point people in the right direction when they run into this particular kernel panic. That direction would be READ THE INSTRUCTIONS just like all of you said. However, considering that people might look at my post when they do get a kernel panic, saying "RTFM" is about the worst strategy to encourage a newbie. If i'm a complete newbie, I run into this kernel panic and I see "ha! you dummy" in response to another kernel panic post, I might run screaming back to another OS.

Also, if you're going to say RTFM (read the man pages) then tell people which ones and where they are.

And maybe I missed something, but the posts about "rebellion" and "genocide" don't seem particularly germane to the subject of installing a new kernel.

Now, if someone would like to politely answer my question: do you think I need to change anything from my current configuration? Again, I installed the generic 2.6 kernel from the slackware .tgz package; then I copied in the huge26.s bzImage and made the initrd. It would seem that I'm using the huge26.s kernel with the generic set of modules. Is that how it's supposed to work?



Joel

Last edited by trashbird1240; 01-12-2007 at 09:13 AM.
 
Old 01-12-2007, 09:10 AM   #14
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by cwwilson721
You want the answer? kernel-generic is not huge26.s, so the generic kernel + huge26.s modules (The ones you installed) can have gaps.
Btw I did not install the huge26.s modules, I installed the generic modules. I installed the generic kernel, generic modules, then I had the kernel panic; then I copied the bzImage from huge26.s AND IT WORKED.

RMFP! (read my posting)

Now, everything is working.

Joel
 
Old 01-12-2007, 01:23 PM   #15
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by mattydee
"more hideous crimes" not "all hideous crimes". This does NOT entail that all rebellious acts must be good - QED

Typical black and white - "you're either with us or against us" thinking. Thank you for strengthening Mr Snow's point. God bless.

As for the topic at hand:

I guess I see the risk of installing a kernel as being almost as high as that of compiling, with the benefits being significantly higher for compiling...

Whoa there...

It didn't strengthen his point - it weakened it. I would say that the worst wars and bloodshed in history have all occurred in civil wars rather than wars between nations. In fact "rebels" often enough become "terrorists" because of their military impotency.

Also at what point did I say anything about anyone being with us or against us?

Is this Snow a relative of yours that you should take such umbrage at a challenge to his assertion?
 
  


Reply

Tags
panic



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
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Kernel panic puts me in a panic theeeg Linux - Software 2 07-31-2004 04:46 PM
kernel panic (narius panic) narius Linux - Newbie 3 06-20-2002 03:56 PM
Kernel panic making me panic! Linux_N0oby Linux - Software 19 05-29-2002 12:31 AM

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

All times are GMT -5. The time now is 04:21 PM.

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