LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-04-2010, 08:54 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Two generic kernels in /boot directory


Hi,
lately I compiled the 2.6.35 kernel and met the following problem: the kernel I get it is a generic kernel so I have two generic kernels. I want to have a possibility to boot both kernels: the new and the old one. I cannot resolve the problem of a creating initrd as mkinitrd run for the new kernel would overwrite the initrd.gz generated for the old kernel. So , I make a new directory where I put this new kernel. Is there a way to have both kernels together in /boot ?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-04-2010, 09:00 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
When mkinitrd runs, it creates or re-uses a directory called /boot/initrd-tree, adds stuff there and finally wraps that directory into an initrd.gz file.

You have two opttions if you want to use a second generic kernel:

You can either omit the "-c" parameter to mkinitrd which is the way to use the pre-existing /boot/initrd-tree. Nothing that was already in there (the kernel modules for your first generic kernel!) will be removed and the modules for your new generic kernel will be added. Then, you can use the same initrd.gz file for both kernels in /etc/lilo.conf.

Or, you create an entirely new initrd.gz - with a new name. There is no rule against having more than one initrd file! You do that by adding the parameter "-o /boot/mynew_initrd.gz" to the mkinitrd command which will create the initrd file with that name, and then add a line "initrd = /boot/mynew_initrd.gz" to the section of /etc/lilo.conf where you configure your new kernel. The original /boot/initrd.gz file will be untouched.

Eric
 
Old 09-04-2010, 09:09 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Thank's. I thought the similar way. But what about /boot/initrd-tree directory? Should I create another directory? These kernels are using different modules ( but with the same name).
Why this bother me? There are suggestions that it is good to have one small boot partition mounted on /boot. So all used kernels should be in /boot. But maybe I messed things..

Last edited by igadoter; 09-04-2010 at 09:14 AM.
 
Old 09-04-2010, 09:36 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
With the "-s" option of mkinitrd you can specify an alternate directoryname to be used for creating the content of your initrd file. Something like "mkinitrd -s /boot/my-initrd-tree" will work fine.

And yes, you should copy your new kernel(s) into the /boot directory to keep things clean. Keep your initrd stuff in /boot as well.

Eric
 
2 members found this post helpful.
  


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
Newest Ubuntu kernel yast install makes no /lib/modules/2.6.31-20-generic directory? brianpbarnes Linux - Software 2 02-11-2010 06:41 PM
13.0 64 bit just Huge & Generic, no "smp" kernels installed acummings Slackware 2 10-01-2009 09:59 AM
generic or huge kernels? metrofox Slackware 25 04-15-2009 04:04 AM
the kernel directory under the path /lib/modules/kernels is empty. mohanrajd Linux - Newbie 1 01-25-2009 03:01 AM
Unable to cd to kernels sub-directory kwits Linux - General 6 01-06-2007 06:19 PM

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

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