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! |
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. |
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 :) |
Quote:
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. |
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 :)
|
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:
|
Quote:
|
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. |
All times are GMT -5. The time now is 07:45 AM. |