Need help to understand /boot entries with 2 Kernels
SlackwareThis 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.
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.
Need help to understand /boot entries with 2 Kernels
Aloha!
I started today to compile a 2.6.x Kernel.
After reading many guides (they called themself so far) I started with the compile procedure,...anyway.
I copied the vmlinuz*,System.map*, and config* file into the /boot directory.
Now...the old symbolic links are linked to the 2.4 kernel files. Ok, but I need different ones for the lilo entries to choose between the 2 kernel versions.
Would it work if I create 3 new symbolic links called vmlinuz-2.6, System.map-2.6 and config-2.6 and set the image entry into the lilo.conf file?
Further, why are these files linked at all and not used directly?
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646
Rep:
There should be no need to link them. But it's very convenient that the "make install" with recent 2.6.x kernels copy the files to /boot automatically (this is what I know and what my installation does, don't know why you had to copy them manually). This way once you have a Lilo entry pointing to vmlinuz you should always be ok if the last messages from "make install" show a succesful Lilo run.
You can of course rename the files to get more descriptive names and create a link to,let's say, vmlinuz-2.6.16-oklaus, with the name vmlinuz. If you look in /boot the former vmlinuz is just a symlink to vmlinuz-ide-xxxxx or another kernel. You could change the entry for your old 2.4.x-kernel to that longer name and add a new vmlinuz for the (automatically??) copied 2.6.x one.
I haven't done this in a while, but I think it will work. As long as the 2.4 configs aren't touched you don't need to worry about making your system unbootable. And even then if you have a copy of the Slackware install CD, you can boot with it (there are instructions before you boot a kernel from the CD).
The symbolic links are there to allow quicker recovery if you mess up something. If you miscompile, you kill the vmlinuz file and create a symlink to the old kernel. Et voila, things will work until you have a chance to fix the kernel
Try to keep it simple and some of the guides you read may be old or not for slackware.
Here is the slackware way; ftp://slackware.oregonstate.edu/pub/.../README.initrd
I have also used a kernel from kernel.org and did it like this.
cd /usr/src/linux
make menuconfig
make && make modules_install && make install
this creates the symlink from
/usr/src/linux/arch/i386/boot/bzImage (this you created with make and make modules_install
(I think)
and names it vmlinuz
or you can copy it yourself without the make install like;
cp arch/i386/boot/bzImage /boot/kernel-2.6.12-gentoo-r10(this you can name yourself)
I hope I didn't confuse you more ...
Last edited by comprookie2000; 08-20-2006 at 04:50 PM.
I dislike using soft links to my kernels. Whenever I update a distro, or a kernel package from a distro vendor, the distro vendor always installs and then overwrites that soft link. PV does this too. If I am not paying attention, my boot loader menu no longer matches. So instead of using the soft links in my boot loader, I always hard-code the boot loader menu option directly to the actual kernel rather than the soft link. I then ignore the soft link. I then add a new boot loader menu option for the new kernel. Then, if things are mucked up, I can revert to my previous kernel and menu options. After a while and I become satisfied that my new kernel is working according to Hoyle, I then edit my boot loader menu to remove the previous kernel option.
With this strategy I never worry about distro vendors confusing me. Getting out of bed each day is tough enough of a challenge!
I will install the new kernel from scratch again and use your tip's.
/edit
Really, make install(.sh) copies the image and map file to /boot, after it set new links to the old kernel files and set no new symlinks. It copies the image and map file to /boot and name it vmlinuz & System.map.
But it will not add new lilo.conf entries. I had to insert the option for the old kernel (files named *.old from install.sh) manually.
Anyway, I get a kernel panic.
All posts I read so far including my Panic message are related to filesystems which are not build-in the kernel or SCSI/RAID solutions. But I only use ext2 on my IDE HD. It's built-in definitely and I guess initrd is needlessly. But that's another issue and if I don't figure it out I will start a new Thread.
With regards,
Orangutanklaus
Last edited by Orangutanklaus; 08-21-2006 at 08:28 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.