LinuxQuestions.org
Visit Jeremy's Blog.
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 04-14-2006, 04:43 AM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Grub and new kernel


Hi Everbody,

It has been awhile now since I have tried to install a 2.6 kernel with my Slack 10.2 system. I tried twice before and really screwed it up (almost lost my 2.4 setup in the process.) I have studied intensely since then and I believe I am ready to try again. So, don't worry, this is NOT a HOW TO COMPILE question. The question is only about making sure I can still boot into my current 2.4 setup in case it goes wrong again. Please note the following instructions I will be following:

Now, cd to the boot directory. You'll find System.map, vmlinuz, and config symlinked to your stock 2.4 kernel. We'll need to remove those symlinks. Run "rm System.map vmlinuz config" to remove them. Now, create new symlinks to your new kernel files with the following:

* ln -s vmlinuz-2.6.X vmlinuz
* ln -s System.map-2.6.X System.map
* ln -s config-2.6.X config

This is exactly what I did on my last attempt. By removing the references to the 2.4 kernel in vmlinuz and linking everything to the new kernel, my current Grub entry for Slack will no longer find the 2.4 boot info, as happened on the previous attempts. Curretnly, I boot into Slack with the following Grub.conf:

title Slackware
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=788 ro

The question is simply this: can I just save the current vmlinuz and rename it to vmlinuz24 (or something to that effect) and change the reference in Grub to it, then making the entry for vmlinuz26 in Grub? Will that ensure I can boot back into my 2.4 kernel if it goes wrong?

Any help appreciated.

Bob
 
Old 04-14-2006, 06:23 AM   #2
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Rep: Reputation: 30
Short answer, yes

I do this all the time but with lilo:
Just copy what you already have:

Quote:
title Slackware
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=788 ro
Rename the title and change the
Quote:
/boot/vmlinuz
to the correct kernel name.
 
Old 04-14-2006, 09:41 AM   #3
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thank you for your help...Went as planned until I do "make install" and I get the following error:

root@bobsbox:/usr/src/linux# make install
sh /usr/src/linux-2.6.16.5/arch/i386/boot/install.sh 2.6.16.5 arch/i386/boot/bzImage System.map "/boot"
/etc/lilo.conf: No such file or directory
make[1]: *** [install] Error 1
make: *** [install] Error 2

As you can tell from my opening question, I don't use lilo and the install script is looking for the /etc/lilo.conf file which doesn't exist. I have scanned the makefile thoroughly and can't find any reference to the lilo.conf file.

Any suggestions on how to amend this script to just install to the correct directory without the lilo.conf?

Thanks, any help appreciated.

Bob
 
Old 04-14-2006, 09:54 AM   #4
slackamp
Member
 
Registered: Dec 2005
Distribution: slackware-current
Posts: 86

Rep: Reputation: 16
i never do a make install. i only do that for the modules, here are my steps.

make menuconfig
make bzImage
make modules
make modules_install

cp arch/i386/boot/bzImage /boot/vmlinuz
cp .config /boot/config
cp System.map /boot/System.map

reconfigure grub then reboot.
 
Old 04-14-2006, 10:06 AM   #5
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thank you very much, that appears to work just fine. I have read that the 2.6 kernel needs an initrd entry in grub (there is one for the Fedora kernels I have), or will it boot without the initrd?

Thanks,

Bob
 
Old 04-14-2006, 10:17 AM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Mine boots without, because I have ReiserFS support compiled in the kernel and not as a module.
 
Old 04-14-2006, 10:29 AM   #7
slackamp
Member
 
Registered: Dec 2005
Distribution: slackware-current
Posts: 86

Rep: Reputation: 16
yah, you really only need initrd if you didn't compile things in your kernel that needs to be loaded before your system actually boots up. i too have reiserfs compiled in and not as module.
 
Old 04-14-2006, 11:05 AM   #8
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thank you for the replies..Unfortunately, I guess I have done it again, blown the system. It starts to boot OK, the panics with:

VFS: Cannot open root device "sda2" or unknown-block (0,0)
Please append correct "root=" boot option
Kernel panic - not syncing: unable to mount root fs on unknown block (0,0)

Don't really understand that. This is the same partition I have been booting the 2.4 kernel all along. The boot option in Grub reads:

root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=788 ro

Any thoughts what might be wrong?

Thanks for your help

Bob
 
Old 04-14-2006, 11:47 AM   #9
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Just a another note on this problem..I can boot into 2.4.31 with the boot disk which boots root on /dev/sda2 by default. This makes it even more curious why the kernel I just compiled panics with this error..The only thing I can guess is that I compiled something into the kernel which keeps it from finding the root filesystem on /dev/sda2

This is my third attempt at compiling and install a 2.6 kernel in Slackware. I believe I can repair it and go back to the 2.4.31 kernel, but, man, this is so frustrating when I have studied this to the point of memorizing it!. If I am not able to figure this one out, I guess I am just going to have to wait until Slack 11 comes out to try the 2.6 kernel.

Bob
 
Old 04-14-2006, 11:55 AM   #10
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
What is your root file system? And did you compile support for it into the kernel?
 
Old 04-14-2006, 12:06 PM   #11
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks, root file system is ext3, and yes it was compiled into the kernel. I have recompiled twice to be sure. I cannot boot back into the old kernel now, either. It seems to go right into the kernel I just compiled even though (in Grub) I changed the original entry to:

/boot/vmlinuz.old

Thanks for your help, this is frying my brain..

Bob
 
Old 04-14-2006, 12:24 PM   #12
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
One more possibility....I have SATA drives. Could it be that they need SCSI emulation to be recognized? I can only imagine that as a possible problem for not finding the root filesystem. I do not remember seeing an option for SATA drive support in the makeconfig.

Bob
 
Old 04-14-2006, 12:36 PM   #13
SlackerDex
Member
 
Registered: Mar 2006
Location: localdomain.localhost
Distribution: Arch-0.7.2, Slack-11.0
Posts: 56

Rep: Reputation: 15
Why not try installing the 2.6.13 kernel from slack.install disc(#2) first and using that to build the 2.6.16.5 kernel? Worked for me.

Have you read any of the documentation included with the 2.6.16.5 kernel by chance?

It's possible you need to update some of your packages (eg.udev).

Last edited by SlackerDex; 04-14-2006 at 12:49 PM.
 
Old 04-14-2006, 12:52 PM   #14
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thank you, yes I did read the documentation. I installed the latest udev before compiling and installing 2.6.15. I have read in another forum (Gentoo) the exact same problem which was solved by changing Grub to read:

kernel (hd0,1) /boot/vmlinuz root=/dev/sda2 ro

Don't know if it will work, but going to try that now..

Thanks for your help..

Bob
 
Old 04-14-2006, 12:59 PM   #15
SlackerDex
Member
 
Registered: Mar 2006
Location: localdomain.localhost
Distribution: Arch-0.7.2, Slack-11.0
Posts: 56

Rep: Reputation: 15
Well if Grub doesn't work you could always go for lilo.

Last edited by SlackerDex; 04-14-2006 at 01:00 PM.
 
  


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
Grub = Kernel panic iirish Linux - Newbie 4 04-22-2005 10:11 AM
Grub Kernel Panic CloudBuilder Linux - General 3 02-07-2005 06:11 PM
lost new kernel in grub jeempc Fedora 7 06-27-2004 01:00 AM
Grub killed my kernel! I think... =P SmackMyBishop Linux - General 2 08-03-2002 11:38 PM
Install kernel for GRUB M.I. Linux - General 1 12-13-2001 02:20 AM

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

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