LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2005, 01:36 AM   #1
DeltaXFX
Member
 
Registered: Feb 2004
Location: USA
Distribution: Arch
Posts: 30

Rep: Reputation: 15
multiple 2.6 kernels using GRUB


Im looking for a specific answer to this question, Ive googled and check LQ for the past 3 days and cant find a good explanation.
I have the tutorial on how to recompile a kernel. I seem to be able to do that. I copy my bzImage and the other files that are listed in the tutorial to the /boot directory. Then I delete the System.map link to the old System.map-2.6.3 file. Then I use "ln -s System.map-2.6.10 System.map" Which makes a link from System.map to System.map-2.6.10. GRUB looks like it is autoconfigured when I do all the "make" things.
My question is I want to be able to boot either 2.6.3 OR 2.6.10 both are listed when I boot. I screwed up the 2.6.10 kernel a bunch of time trying to compile it and make it actually work... still new at this.
It seems that because I am changing where the System.map link points to it must change how my old kernel would boot. Which my 2.6.3 kernel wont boot now. I just get "GRUB" after POST. So I am just going to reload Fedora.
But can someone just tell me what files are used by an individual kernel to boot? Its needs vmlinuz, initrd, system.map...
On one of my boot attempts on the 2.6.10 kernel I got an error where X wouldnt start. It kicked out a bunch of error messages and put me at level 3. I could log in just fine, I tried startx but just received errors. Is there some other file I need to point the kernel to? like the XF86Config file??

Thanks for any information you can give me!
 
Old 02-03-2005, 02:33 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You don't need to soft link anything for system map. The individual files should be in /boot along with their respective vmlinuz and initrd files. You need to go and edit /boot/grub/menu.lst and then write the grub to the mbr. Here is the sample of mine;

title Debian GNU/Linux, kernel 2.4.20-k7
root (hd2,0)
kernel /boot/vmlinuz-2.4.20-k7 root=/dev/hdd1 ro hdb=ide-scsi apm=on
initrd /boot/initrd.img-2.4.20-k7
savedefault

title Debian GNU/Linux, kernel 2.4.20-k7 (recovery mode)
root (hd2,0)
kernel /boot/vmlinuz-2.4.20-k7 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.4.20-k7
savedefault

title Debian Testing GNU/Linux, kernel 2.6.3-1-k7
root (hd2,2)
kernel /boot/vmlinuz-2.6.3-1-k7 root=/dev/hdd3 ro
initrd /boot/initrd.img-2.6.3-1-k7
savedefault
boot

title Debian TestingGNU/Linux, kernel 2.6.3-1-k7 (recovery mode)
root (hd2,2)
kernel /boot/vmlinuz-2.6.3-1-k7 root=/dev/hdd3 ro single
initrd /boot/initrd.img-2.6.3-1-k7
savedefault
boot

title Zoneminder v 1.19
root (hd1,0)
kernel /boot/vmlinuz-2.6.3-4mdk root=/dev/hdc1 ro
initrd /boot/initrd-2.6.3-4mdk.img
savedefault
boot

title Zoneminder v 1.19 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.3-4mdk root=/dev/hdc1 ro single
initrd /boot/initrd-2.6.3-4mdk.img
savedefault
boot

wrt to the failure to boot in XF86 you may have a problem with one of the peripherals (mouse, screen or whatever). To find out what is causing the problem look at the log file - do cat /var/log/XFree86.0.log | more . I don't have experience with fedora but there should be an app to reconfigure X or if there isn't one then you would have to manually edit /etc/X11/XF86Config-4.
 
Old 02-03-2005, 03:03 AM   #3
DeltaXFX
Member
 
Registered: Feb 2004
Location: USA
Distribution: Arch
Posts: 30

Original Poster
Rep: Reputation: 15
Ahhhhh, something that makes sense! Thank you.
So do I ever need to update the system.map file? Or can I just leave it there and continue to update kernels as they come out?
Just for the sake of learning can you see if i got this right... its copied out of what you posted.

root (hd2,0) <-thats the ID of the physical drive?

kernel /boot/vmlinuz-2.4.20-k7 root=/dev/hdd1 ro single <-root is what is mounted to /dev/hdd1

initrd /boot/initrd.img-2.4.20-k7 <- i get this

savedefault <-whats this for?

thanks again! i need to go home and try this now
 
Old 02-03-2005, 03:38 AM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by DeltaXFX
So do I ever need to update the system.map file? Or can I just leave it there and continue to update kernels as they come out?
Just for the sake of learning can you see if i got this right... its copied out of what you posted.

root (hd2,0) <-thats the ID of the physical drive?

kernel /boot/vmlinuz-2.4.20-k7 root=/dev/hdd1 ro single <-root is what is mounted to /dev/hdd1

initrd /boot/initrd.img-2.4.20-k7 <- i get this

savedefault <-whats this for?

I have never fiddled with the maps. Debian automatically updates the /boot file whilst installing the new kernel.

root (hd2,0) - yes this is the physical ID - grub starts numbering the drives and partitions from 0 so this is drive 3 and partition 1

The only reason I can see to replacing the system map is when you only have a single entry and you are replacing one kernel with another. In most instances you don't want to do this because if the new kernel doesn't work you have no way of getting back except via a rescue disk.

savedefault - quote from the grub config file
" You can specify 'saved' instead of a number. In this case, the default entry
is the entry saved with the command 'savedefault'.
default 0"

never really questioned this so not sure of the ramifications of this.

Last edited by TigerOC; 02-03-2005 at 03:52 AM.
 
Old 02-03-2005, 03:50 AM   #5
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
Red face I have it

I have a solution for you use some software depending on your distro to autoupdate your kernel, my only interaction was to delete the old one after reboot
 
Old 02-03-2005, 04:31 AM   #6
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
According to you system.map question, I found some information in my favourite kernel HowTo (Sorry, it's in german, so I post a brief translation):

Quote:
System.map contains names and adresses of kernel symbols (don't ask me what that means, but now comes the important information). It is not of vital importance for a running Linux system. However it is used when it comes to kernel-oops for debugging purposes. Also the command 'ps -l' makes use of it. If it comes to such a case, the System.map is choosen in the following order:

/boot/System.map-`uname -r`
/boot/System.map
/lib/modules/`uname -r`/System.map
/usr/src/linux/System.map
That means, it is totally sufficient to have an unlinked System.map, as long as it contains the correct version number of the running kernel as returned by 'uname -r'. If your link points to the wrong System.map, you won't recognize it, as long as the version information is present.
 
Old 02-03-2005, 04:55 AM   #7
DeltaXFX
Member
 
Registered: Feb 2004
Location: USA
Distribution: Arch
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by abisko00
That means, it is totally sufficient to have an unlinked System.map, as long as it contains the correct version number of the running kernel as returned by 'uname -r'. If your link points to the wrong System.map, you won't recognize it, as long as the version information is present.
So I could just copy my vmlinuz/bzImage and initrid to /boot, update GRUB and then load my new kernel, and once i verify that it is working properly i could just replace the System.map link with the System.map-2.6.10 file? (just rename it to System.map)
 
Old 02-03-2005, 06:10 AM   #8
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
No, this is not what I meant (although it will probably work also).

What I wanted to say is: have a (correct) system.map for each kernel, named by the kernel version (e.g. System.map-2.6.10) and delete the link (since it is not dynamic and may point to the wrong system.map).

This would be the 'correct' way to do it, but you won't recognize it, if you do it the 'wrong' way.
 
  


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
Running Multiple Kernels unosaso Slackware 2 04-05-2005 11:50 AM
nvidia driver for multiple kernels Cornholio Linux - Hardware 4 04-02-2005 01:35 AM
Multiple Kernels apocolpse Linux - Newbie 3 03-17-2005 03:09 AM
Multiple kernels question oneandoneis2 Slackware 5 06-25-2004 07:55 PM
Multiple kernels, one partition -- possible? Tino27 Linux - Newbie 2 11-05-2003 05:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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