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-06-2008, 08:32 PM   #1
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Rep: Reputation: 40
Compiled new Kernel and broke my machine


I compiled the newest kernel, all went better than I expected. I installed it using make install. This apparently over writes the existing kernel. Not quite what I expected. I expected it to install it with the other kernel files and then I would add a lilo entry to test it. When I compiled the kernel I apparently didn't handle adding ext3 properly because I now get a kernel panic at boot which says something to the effect that it can't load the file system on root. There is nothing of importance on this machine so re-installing wouldn't be an issue, however I would like to know if there is a way to restore the previous kernel without having to be so drastic. Additionally how can I install a new kernel so that I do not disturb the current working kernel and I can add a lilo entry to test the new one.

Thanks in advance,
 
Old 03-06-2008, 09:54 PM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Using make install for your kernel is probably not the best thing to do. What I do is copy /usr/src/linux-your_version/arch/i386/boot/bzImage to /boot (giving it an appropriate name so as not to overwrite the old kernel) and then add a stanza to lilo.conf for the new kernel (and run lilo, of course). That way you still have the old kernel available.

Your kernel panic is probably because you have built ext3 as a module. In this case you should make an initrd for booting (personally I just compile the filesystems directly in the kernel).

You do not need to reinstall the whole system. If you only have one partition (not counting swap) it is quite easy. Boot with the install cd. Then mount your root partition. Then reinstall the default kernel by doing "installpkg -root /mnt/your_mount_point /path/to/slackware_cd/a/kernel-huge...tgz". (kernel-generic is better to run, but you would need an initrd and since you plan to use your own kernel you might as well just use -huge as the temporary kernel). You'll then need to re-run lilo. "lilo -r /mnt/your_mount_point".

Alternatively, once you have booted the install cd, you could just mount your partition, chroot, and then create the initrd (or recompile your kernel). But if this is all new to you, it's probably best to have a "known good kernel" in your lilo.conf.


Brian
 
Old 03-07-2008, 06:50 AM   #3
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Original Poster
Rep: Reputation: 40
Thanks for your help! I booted from the kernel on the install DVD re-compiled the kernel with the ext3 fs built-in and now I'm up and running again.

Thanks again,
 
  


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
kernel panic while booting custom compiled 2.6.24 kernel on RHEL 4 AS samkraju Red Hat 4 02-10-2008 12:55 AM
Copy compiled php5 to another machine cooljai Linux - Software 0 10-11-2007 07:54 AM
The kernel I compiled reads my sata drives as hda even though the rpm kernel read sda abefroman Linux - Software 5 07-10-2006 04:42 PM
eth0 device ok in 2.6, dead in 2.4 (on same machine, both kernels compiled) henryhlc Linux - Networking 2 01-26-2006 12:28 PM
eth0 device ok in 2.6, dead in 2.4 (on same machine, both kernels compiled) henryhlc Slackware 2 01-26-2006 11:25 AM

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

All times are GMT -5. The time now is 10:33 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