LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-20-2003, 06:22 PM   #1
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
Kernel panic: A blown compile?


I decided to be brave and compile a new kernel following DaOne's excellent instructions. The problem is that something seems to have gone very wrong, but for the life of me I can't figure out what. When I boot, I get the following error message:
Quote:
Linux IP multicast router 0.06 plus PIM-SM
Kernel panic: VFS: Unable to mount root fs on 03:03
I've searched and not come up with an answer that works. The facts I am sure of are:
1) ext3 IS compiled in the new kernel (2.4.20 if it matters)
2) both lilo.conf and fstab are completely correct in associating partitions with the directory structure. In case it matters that is:

hda1 = swap
hda2 = boot (and is the bootable partition)
hda3 = root
hdb1 = home

I can boot from a bare.i floppy and use mount root=/dev/hda3 to get the system up and running.

Any ideas on how I might fix this?

If not, how could I re-install bare.i to /boot? I tried to install the new kernel a couple of times and seem to have wiped out the kernel I had that was good. D'OH!!
 
Old 03-20-2003, 07:01 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Always keep a working kernel on your system. If you build a kernel and install it, always keep the old one and leave it installed as well. Then you will always be able to boot the old kernel and work on the new one.

It is likely that you left out something important in your new kernel config. If you have the old config file still then use it. If not you will need to experiment a bit with the configuration.
 
Old 03-20-2003, 07:12 PM   #3
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Can you post your lilo.conf file? I think you've got your boot=<kernel stuff here> messed up. Maybe posting it will help others to figure out what's wrong too. Hope this helps.
 
Old 03-20-2003, 07:12 PM   #4
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
If possible, please post the contents of lilo.conf. Sometimes the smallest detail can cause the biggest headaches.

Edit: lol Texicle...same time...same thought.

Last edited by DaOne; 03-20-2003 at 07:14 PM.
 
Old 03-20-2003, 07:20 PM   #5
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Quote:
Originally posted by DaOne
If possible, please post the contents of lilo.conf. Sometimes the smallest detail can cause the biggest headaches.

Edit: lol Texicle...same time...same thought.
Great minds think alike.
 
Old 03-20-2003, 08:10 PM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803

Original Poster
Blog Entries: 1

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
OK, here in all its glory is my lilo.conf:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda2
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256

# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda3
label = Linux
read-only
image = /boot/vmlinuz.old
root = /dev/hda3
label = slack.old
read-only
# Linux bootable partition config ends
 
Old 03-20-2003, 08:26 PM   #7
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Hmmm...looks ok to me. Now you said that it booted fine before the kernel compile? How were the partitions formatted? Ext2, rjfs, etc. I agree at this point that something is incorrect/missing in the kernel config. Is the filesystem support compiled into the kernel, or as a module? And are you sure it is the proper filesystem support for the partitions? I agree with DavidPhillips...try experimenting with some of the kernel options. I don't think that it's as bad as it seems...probably a small detail that was overlokked...beleive me, it's so easy to overlook these things
 
Old 03-20-2003, 08:28 PM   #8
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Another thing...there were no errors after running make install? The last part of make install updates lilo...just wondering if there were any errors.
 
Old 03-20-2003, 08:55 PM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803

Original Poster
Blog Entries: 1

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
I had orignially installed the bare kernel that comes with the 8.1 distribution, and it worked just fine. However, this is an old pc (a pentium 133) so I wanted to get rid of things like USB support since the computer doesn't have a USB port. At any rate, the bare kernel works just fine.

The kernel compile goes fine and there are no errors during make install. As far as I can tell, lilo.conf is updated properly. I've got all my partitions formatted as ext3 and I'm positive that I've got that included in the kernel compile. I am compiling file support into the kernel. In fact, the only thing I'm compiling as a module is iptables. If I boot from a floppy, I can see that ext3 is being used, so I'm sure that the partitions are ext3. Besides, even if they were ext2, wouldn't ext3 in the kernel still allow the system to work? My understanding is that ext3 is just ext2 with journaling.


I guess I'll go back and play with the config and see if I can figure out what is missing. Thanks everyone for your help. At least I know I'm not going crazy! If I find the answer, I'll be sure to post it.
 
Old 03-20-2003, 09:33 PM   #10
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
What did you name your newly compiled kernel? The reason I ask is that my lilo.conf file looks nearly identical and I installed the old faithful bare.i as well.

image = /boot/vmlinuz

This is the same as my image. I don't know how much of a difference this would make, but it just doesn't seem right. I noticed you've got "image = /boot/vmlinuz.old" in there as well, but I'm just brainstorming I guess.
 
Old 03-21-2003, 06:58 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you can name it whatever you like, I would also use the same name for it's initrd image to keep things simple
 
Old 03-21-2003, 09:24 AM   #12
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
image = /boot/vmlinuz is fine to boot the newly compiled kernel.
image = /boot/vmlinuz.old is for booting the old kernel once the newly compiled kernel is installed using make install.
 
Old 03-21-2003, 02:49 PM   #13
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Good to know guys. Thanks. I've never recompiled the kernel so I have no idea. I was just trying to throw ideas out there in hopes of sparking someone's thoughts on this.
 
Old 03-21-2003, 03:12 PM   #14
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803

Original Poster
Blog Entries: 1

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
So THAT is why my old working kernel got killed. Initially I was following DaOne's procedures so I got into lilo.conf and set that up to "save" the old kernel under the slack.old entry. After I compiled the first time and it didn't work, I decided it must have been a stupid mistake and just went ahead and compiled again. Only the second time I didn't bother to rename vmlinuz.old so it must have gotten flattened when make install renamed the busted kernel from the first compile.

Oh well, you don't have to hit me more than five or six times with a large board for me to get the point!

Next time I have a working kernel I'll be sure to have a copy named something other than vmlinuz.old.
 
Old 03-21-2003, 03:50 PM   #15
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Quote:
so it must have gotten flattened when make install renamed the busted kernel from the first compile
Exactly...of course, I learned this the same way you did on my first few attempts
What I do these days is this...
Once I get a good kernel compiled, I typically like to tweak it some more. So knowing that the "good" kernel becomes vmlinuz.old once I do a make install after "tweaking", I will make a copy of vmlinuz and System.map (system map), and rename them .original or .good or whatever. SO I'll do...

cp /boot/vmlinuz /boot/vmlinuz.original
cp /boot/System.map /boot/System.original

Then I'll add these in lilo.conf, then run lilo.

image = /boot/vmlinuz.original
root = /dev/hda1
label = Slack-original
read-only

So now everytime you do a make install, your new kernel becomes vmlinuz, your existing vmlinuz becomes vmlinuz.old...killing what was vmlinuz.old. So if you happen to screw up a few compiles, you'll always have vmlinuz.original to boot with, and you know it's a working kernel
 
  


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
Trying to compile 2.6.8 getting Kernel Panic when booting Tristor Red Hat 2 01-13-2005 01:35 AM
Kernel Panic error after 2.6.7 compile - please help Repeater Slackware 10 08-22-2004 06:23 PM
Kernel panic after 2.6.1 compile Phaethar Fedora 6 01-14-2004 10:55 PM
kernel panic after compile RIgimp75 Slackware 1 01-09-2004 07:46 PM
kernel compile, user PANIC! antken Linux - General 4 01-26-2001 08:06 AM

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

All times are GMT -5. The time now is 04:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration