LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-27-2006, 12:00 AM   #1
drlouis
Member
 
Registered: Aug 2004
Location: Ne
Distribution: slackware 12 on Dell XPS m1710
Posts: 90

Rep: Reputation: 15
kernel panic after 2.6 compile


I finally got brave enough to compile my first kernel (2.6.16.27 - source from kernel.org). I followed Alien's kernel compile guide at http://alien.slackbook.org/dokuwiki/...kernelbuilding with a couple of deviations (I didn't use wget to dl the source and .config)

Using xconfig, I took my time and was very careful in configuring the new kernel. It took long enough that I had to save my progress a couple of times and come back to it later, so when I was finally done I had several *.config files. I deleted all but the most recent (2.6.16.27.config), and the one that was simply ".config". After compiling and installing the new kernel, I got a kernel panic. I noted the error (could not mount root file system), and rebooted with the old kernel, and got the same error! after a bunch of reading and googling I think the problem with the old kernel is I didn't change the "image" in lilo.conf to "vmlinuz.old". Which if I understand correctly means that both options in lilo are actually trying to boot from the new kernel.

I booted up with Slax, intending to edit lilo.conf, and get it so I could at least boot from the old kernel, but after editing lilo.conf, and running lilo I get:
Code:
root@slax:/mnt/disc0part3/etc# lilo
Fatal: creat /boot/map~: Read-only file system
I'm logged in as root, but I can't figure out how to re-run lilo.

If any one can tell me how to restore my old kernel I'd really appreciate it. Once that's done, I assume I just need to make sure I have my root file system compiled into my kernel (thought I did, but apparently not).

If I'm missing anything else, or if you need any other info please let me know.

Anyway thanks for the help.
 
Old 08-27-2006, 12:36 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Boot with your Slackware CD1 and at the boot: prompt enter >
bare.i root=/dev/hda1 noinitrd ro
where bare.i is the kernel you installed with, and /dev/hda1
is the name of your / (root) filesystem. Then you will boot
into your Slackware system. Login as root and run "lilo" and
you will reinstall the bootloader.

Why change that kernel to vmlinuz.old? That just adds a step
that might (looks like it did) confuse you. Here's my /boot :
Code:
mingdao@silas:~/kernel/linux-2.6.17.8$ ls -lh /boot/
total 6.8M
lrwxrwxrwx 1 root root   37 2006-07-06 08:56 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root   25 2006-07-06 01:53 System.map -> /boot/System.map-2.6.17.1
-rw-r--r-- 1 root root 595K 2006-07-06 01:53 System.map-2.6.17.1
-rw-r--r-- 1 root root 595K 2006-07-08 08:06 System.map-2.6.17.4
-rw-r--r-- 1 root root 596K 2006-08-12 10:26 System.map-2.6.17.8
-rw-r--r-- 1 root root 150K 2006-03-13 09:49 System.map-ide-2.4.32
-rw-r--r-- 1 root root  512 2006-07-06 09:09 boot.0800
lrwxrwxrwx 1 root root   17 2006-07-06 08:56 config -> config-ide-2.4.32
-rw-r--r-- 1 root root  41K 2006-03-13 09:49 config-ide-2.4.32
-rw-r--r-- 1 root root 5.0K 2006-06-26 12:43 diag1.img
-rw------- 1 root root  20K 2006-08-25 07:11 map
lrwxrwxrwx 1 root root   18 2006-07-06 08:56 vmlinuz -> vmlinuz-ide-2.4.32
-rw-r--r-- 1 root root 1.2M 2006-07-06 01:53 vmlinuz-2.6.17.1
-rw-r--r-- 1 root root 1.2M 2006-07-08 08:06 vmlinuz-2.6.17.4
-rw-r--r-- 1 root root 1.2M 2006-08-12 10:27 vmlinuz-2.6.17.8
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
To simplify matters, I keep the original vmlinuz-ide-2.4.32 image and
symlink in place. With each new kernel I add a new image for that kernel,
and new System.map.
 
Old 08-27-2006, 10:41 PM   #3
drlouis
Member
 
Registered: Aug 2004
Location: Ne
Distribution: slackware 12 on Dell XPS m1710
Posts: 90

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Bruce Hill
Boot with your Slackware CD1 and at the boot: prompt enter >
bare.i root=/dev/hda1 noinitrd ro
where bare.i is the kernel you installed with, and /dev/hda1
is the name of your / (root) filesystem. Then you will boot
into your Slackware system. Login as root and run "lilo" and
you will reinstall the bootloader.

Why change that kernel to vmlinuz.old? That just adds a step
that might (looks like it did) confuse you. Here's my /boot :
Code:
mingdao@silas:~/kernel/linux-2.6.17.8$ ls -lh /boot/
total 6.8M
lrwxrwxrwx 1 root root   37 2006-07-06 08:56 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root   25 2006-07-06 01:53 System.map -> /boot/System.map-2.6.17.1
-rw-r--r-- 1 root root 595K 2006-07-06 01:53 System.map-2.6.17.1
-rw-r--r-- 1 root root 595K 2006-07-08 08:06 System.map-2.6.17.4
-rw-r--r-- 1 root root 596K 2006-08-12 10:26 System.map-2.6.17.8
-rw-r--r-- 1 root root 150K 2006-03-13 09:49 System.map-ide-2.4.32
-rw-r--r-- 1 root root  512 2006-07-06 09:09 boot.0800
lrwxrwxrwx 1 root root   17 2006-07-06 08:56 config -> config-ide-2.4.32
-rw-r--r-- 1 root root  41K 2006-03-13 09:49 config-ide-2.4.32
-rw-r--r-- 1 root root 5.0K 2006-06-26 12:43 diag1.img
-rw------- 1 root root  20K 2006-08-25 07:11 map
lrwxrwxrwx 1 root root   18 2006-07-06 08:56 vmlinuz -> vmlinuz-ide-2.4.32
-rw-r--r-- 1 root root 1.2M 2006-07-06 01:53 vmlinuz-2.6.17.1
-rw-r--r-- 1 root root 1.2M 2006-07-08 08:06 vmlinuz-2.6.17.4
-rw-r--r-- 1 root root 1.2M 2006-08-12 10:27 vmlinuz-2.6.17.8
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
To simplify matters, I keep the original vmlinuz-ide-2.4.32 image and
symlink in place. With each new kernel I add a new image for that kernel,
and new System.map.
Thank you! Ok, I'm back in. you said you dont rename yours to vmlinuz.old, and I actually didn't either. I just found a thread on here where someone said when you compile a new kernel the old one is automatically renamed vmlinuz.old so you have to change it in lilo.conf too. I hadn't done that, so I figured that was my problem. Apparently not. Given that fact, I now have NO IDEA why my old kernel refused to boot.

If you or anyone else can enlighten me, I'd welcome the information. for now, thank you again for helping me get back into my system, and I'm off to see what I can dig up on my own.

Last edited by drlouis; 08-27-2006 at 10:42 PM.
 
Old 08-28-2006, 12:20 AM   #4
drlouis
Member
 
Registered: Aug 2004
Location: Ne
Distribution: slackware 12 on Dell XPS m1710
Posts: 90

Original Poster
Rep: Reputation: 15
ok, as I'm sure most of you already knew, I had missed compiling support for Reiserfs into the kernel. Once I was able to get back into my system I added that to the configuration, and redid the kernel compile. I'm now running my shiny new 2.6.16.27 kernel! Thanks again Bruce! (and of course alien for his guide I used to do all this)

I still have no idea why I couldn't boot my old kernel before though. I'd still love to know for future reference if anyone has any ideas.
 
  


Reply



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 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 panic: A blown compile? Hangdog42 Slackware 14 03-21-2003 03:50 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:34 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