LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-21-2008, 06:35 AM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
mkinitrd Problem when trying to boot new kernel


Hello Everyone,

I was finally able to get kernel 2.6.27-rc6 installed and compiled, and it starts to boot successfully, then drops to a command line with the message that no kernel modules are present. I know this is a problem with the initrd.gz that I had made with this:

Quote:
mkinitrd -c -k 2.6.27-rc6 -m ext3
It would not load the needed modules with this initrd, and it overwrote the existing initrd I used to boot my generic kernel, so it wouldn't boot either until I remade it.

My question is, how can I successfully build a separate initrd.gz for the new kernel and keep from overwriting my existing initrd? I want to try this kernel because it has native support for my rtl8187B wireless chipset so I can stop using ndiswrapper.

Anyone have any ideas? Thanks for any replies.

Bob
 
Old 09-21-2008, 06:39 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It seems easy, just rename your initrd.gz, say BobNutfield.gz and add it in lilo.conf
unless I missed something ?
 
Old 09-21-2008, 06:50 AM   #3
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
I thought of that. But for some reason, when I rename the current initrd.gz to say, generic-initrd.gz to boot my current generic kernel, and then run the mkinitrd script for the new kernel creating simply initrd.gz, it still boots only to the same command line. Maybe something wrong with the way I am building the kernel initrd?

I use Grub, by the way, which isn't an issue because I just edit the menu.lst file.

Thank you for the reply.

Bob
 
Old 09-21-2008, 07:01 AM   #4
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I don't think you can just rename initrd.gz because /boot/initrd-tree would still reflect the old initrd. Instead of using the '-c' option, which clears the existing initrd tree, you could leave that option out and just add the modules from the new kernel to the initrd. You could also play around with the '-o' and '-s' options if you want to avoid overwriting the existing initrd.gz and initrd-tree and create a whole new initrd.
 
Old 09-21-2008, 07:01 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You can use another directory than the default to make initrd like:
Code:
mkinitrd -c -k 2.6.27-rc6 -m ext3 -s /boot/generic-initrd -o generic-initrd.gz
This will use /boot/generic-initrd as initrd source tree and makes initrd with the name: generic-initrd.gz
So this way you are sure that there will be no conflict
 
Old 09-21-2008, 07:21 AM   #6
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
OK, I was successful in getting my current 2.6.24.5 kernel to boot fine renaming the initrd.gz to generic-initrd.gz. I then re-ran the mkinitrd for 2.6.27-rc6 kernel to create initrd.gz. Edited menu.lst and I get the same results when trying to boot the new kernel. I get a number of messages telling this module isn't present or that module isn't present, so I am beginning to think it is how I built the kernel configuration. I copied my old menuconfig so I would have a starting point.

I believe T3slider is correct about the initrd's I am building continuing to use the initrd tree in existence. Guess I just have to play a lot more to figure out what it is. This is the first time in loooong time I have tried to compile a new kernel, so I guess I have forgotten a lot. I followed Alien Bob's guide and everything went smoothly and I thought I was home free when the new kernel starting booting correctly.

Going to try to remake the initrd with T3slider's suggestion of omitting the -c option to see if I can build a completely separate initrd.
 
Old 09-21-2008, 07:24 AM   #7
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Did you remember to run `make modules` and `make modules_install` (that last one as root)? Is there anything in /lib/modules/2.6.27-rc6?
 
Old 09-21-2008, 07:24 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Why not include the ext3 support in kernel as built-in if you compile it ?
(this way no more initrd headache )
 
Old 09-21-2008, 07:32 AM   #9
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Quote:
Did you remember to run `make modules` and `make modules_install` (that last one as root)? Is there anything in /lib/modules/2.6.27-rc6?
T3slider: yes, those steps were completed and there is a collection of modules in /lib/modules/2.6.27-rc6-smp (I wonder if the name difference has anything to do with it since the kernel named vmlinuz-2.6.27rc6 does attempt to boot, or if it has anything to do with the mkinitrd?)

keefaz: I believe I DID include ext3 support in the kernel. It's long process, so I don't really remember 100%.
 
Old 09-21-2008, 07:36 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Check ext3 in .config
Code:
cd /path/to/kernel/directory
grep -i ext3 .config
Now if you have ext3 built-in, you don't need the initrd line in menu.lst
 
Old 09-21-2008, 07:45 AM   #11
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by keefaz View Post
Check ext3 in .config
Code:
cd /path/to/kernel/directory
grep -i ext3 .config
Now if you have ext3 built-in, you don't need the initrd line in menu.lst
Quote:
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
Oops! Guess I did configure it as a module. Darn! I hate to spend all the time recompiling just to add that. There are still a number of things in the kernel config that I don't totally understand, but I just missed this one.
 
Old 09-21-2008, 07:49 AM   #12
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
After trying the mkinitrd again without the -c option, it appears to still be using the initrd-tree that was in existence. Does anyone know how I can check which kernel a particular initrd is for? There does seem to be any indication in the initrd-tree directory.
 
Old 09-21-2008, 07:49 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Take your time in kernel config, it is worth it
Just remember to remove or comment the initrd line in menu.lst for the kernel you add ext3 support as built in
If you did not issue a make mrproper, I think the kernel compilation will be faster

[edit]
for checking which kernel version your initrd tree belongs to,
try find a .ko module in the initrd directory and use:
Code:
strings <module name>.ko | grep vermagic

Last edited by keefaz; 09-21-2008 at 07:56 AM.
 
Old 09-21-2008, 07:54 AM   #14
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by BobNutfield
T3slider: yes, those steps were completed and there is a collection of modules in /lib/modules/2.6.27-rc6-smp
That would be the problem there. Your correct mkinitrd command should be
Code:
# mkinitrd -c -k 2.6.27-rc6-smp -m ext3
(change any mkinitrd options in that line -- for example, remove the -c option and possibly add the -s and -o options).

mkinitrd should take the directory under /lib/modules, NOT just the kernel version.
 
Old 09-21-2008, 08:12 AM   #15
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
And in 2.6 kernels you run "make" and "make modules_install" --
no need for "make modules" -- make does that job now.

I think there is something amiss in the present mkinitrd script.
I say this because prior to Slackware-12.1, I could build a new
initrd with
Code:
-o /boot/2.6.24.4-noide-initrd.gz
option to have a separate initrd. But now those won't boot anymore.

I have not had the extra time to investigate. Now I just leave off
the -c option and use initrd.gz and add the modules to the existing
initrd and my kernels boot.

NB: I am using RAID, LUKS, and LVM -- much more complicated than
what you seem to be describing. So this is my mkinitrd command:
Code:
mkinitrd -k 2.6.26.5-smp -f jfs -r /dev/cryptvg/root -C /dev/md/2 -L -R -o /boot/initrd.gz
 
  


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
Kernel panic: after mkinitrd daemonkl Linux - Kernel 3 09-08-2007 11:00 PM
problem with running mkinitrd for kernel 2.6.20.7 nkd Linux - General 6 05-01-2007 07:42 AM
Can't mkinitrd for Kernel 2.6.11.6 (when compiling) LordOfer Linux - Newbie 3 04-02-2005 11:20 AM
kernel 2.6.6 mkinitrd problem ziox Linux - Software 0 07-13-2004 07:48 PM
mkinitrd problem - kernel upgrade newbie irvken Linux - Newbie 31 12-23-2003 12:03 PM

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

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