Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-14-2006, 04:43 AM
|
#1
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Rep:
|
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
|
|
|
04-14-2006, 06:23 AM
|
#2
|
Member
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897
Rep:
|
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 to the correct kernel name.
|
|
|
04-14-2006, 09:41 AM
|
#3
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 09:54 AM
|
#4
|
Member
Registered: Dec 2005
Distribution: slackware-current
Posts: 86
Rep:
|
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.
|
|
|
04-14-2006, 10:06 AM
|
#5
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 10:17 AM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
Mine boots without, because I have ReiserFS support compiled in the kernel and not as a module.
|
|
|
04-14-2006, 10:29 AM
|
#7
|
Member
Registered: Dec 2005
Distribution: slackware-current
Posts: 86
Rep:
|
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.
|
|
|
04-14-2006, 11:05 AM
|
#8
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 11:47 AM
|
#9
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 11:55 AM
|
#10
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
What is your root file system? And did you compile support for it into the kernel?
|
|
|
04-14-2006, 12:06 PM
|
#11
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 12:24 PM
|
#12
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 12:36 PM
|
#13
|
Member
Registered: Mar 2006
Location: localdomain.localhost
Distribution: Arch-0.7.2, Slack-11.0
Posts: 56
Rep:
|
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.
|
|
|
04-14-2006, 12:52 PM
|
#14
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Original Poster
Rep:
|
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
|
|
|
04-14-2006, 12:59 PM
|
#15
|
Member
Registered: Mar 2006
Location: localdomain.localhost
Distribution: Arch-0.7.2, Slack-11.0
Posts: 56
Rep:
|
Well if Grub doesn't work you could always go for lilo.
Last edited by SlackerDex; 04-14-2006 at 01:00 PM.
|
|
|
All times are GMT -5. The time now is 07:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|