LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2006, 11:06 AM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Rep: Reputation: 30
my initrd is never run


Hi,

I create a initrd with mkinitrd, and add the initrd to my grub.conf file

But on bootup, my system never gets as far as to run the initrd before trying to mount the root volume

Since my root volume is an LVM partition, it can't root and the kernel panics ... any ideas why my initrd is not running first? Not that I expect anyone to know, just looking for suggestions

Thanks!
George
 
Old 05-17-2006, 11:26 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
When you create the initrd, do a mkinitrd -v so that you get verbose information during the creation of the initrd. Look at that output and make sure that the information concerning your LVM stuff is being included in the initrd. It could be that you are in fact loading the initrd at boot time, but the LVM stuff just isn't in it.
 
Old 05-17-2006, 11:31 AM   #3
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
that still wouldn't explain why initrd is never being run though, the fact is initrd is never run, let alone lvm being run in it

i did use -v to check, and it is putting the LVM related stuff in just to make sure

Last edited by hedpe; 05-17-2006 at 11:39 AM.
 
Old 05-17-2006, 11:45 AM   #4
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Hrm...now I am curious to see what you used for your grub.conf file...
 
Old 05-17-2006, 11:52 AM   #5
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
here is my grub.conf:
Code:
title Kernel 2.4.32
    root (hd0,2)
    kernel /vmlinuz-2.4.32 ro root=/dev/VolGroup00/LogVol00 rhgb
    initrd /initrd-2.4.32.img
 
Old 05-17-2006, 12:01 PM   #6
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
well, this looks a little suspicious:

# CONFIG_BLK_DEV_INITRD is not set
 
Old 05-17-2006, 12:04 PM   #7
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Hrm. Do you have a boot partition that is not a part of the LVM? It seems to me that grub is getting confused on exactly where the initrd file actually is, though I am not sure why it would continue if it never found the initrd in the first place. I seem to remember kernel boots going nuts when the boot process couldn't find the initrd file in the first place.

Something you may want to look at is exactly what is listed in the boot configuration when you actually boot. Take a look at what is stated there before the machine is even booted and make sure that they match what you expect them to say.

By default, grub doesn't actually look at grub.conf in /boot/grub/grub.conf. It actually looks at /boot/grub/menu.lst, and the grub.conf file tends to be a symbolic link to that file (or the other way around...depends on the distribution). If this symbolic link is broken and there are two different files, you will tend to get a disparity in what you expect and what you actually get.
 
Old 05-17-2006, 12:04 PM   #8
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Quote:
Originally Posted by hedpe
well, this looks a little suspicious:

# CONFIG_BLK_DEV_INITRD is not set
Oooh...yeah. That does look suspicious. Time to recompile the kernel.
 
Old 05-17-2006, 01:07 PM   #9
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
yes!

I'm getting closer, my initrd is now running, it mounts /proc, and then it scans for logical volumes as it should, but then i get:

Code:
Scanning logical volumes
   /bin/vgscan.lvm1: execvp failed: No such file or directory
ERROR: /bin/vgscan exited abnormally!
Activating logical volumes
   /bin/vgchange.lvm1: execvp failed: No such file or directory
ERROR: /bin/vgchange exited abnormally!
 
Old 05-17-2006, 01:21 PM   #10
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
it seems like execvp doesn't know where to look for those particular files. You may have to do some symbolic linking or something so that when execvp looks for them, it actually finds them. Either that, or figure out where execvp is being run from and change the default places it looks to where things really are during that portion of the boot process.
 
Old 05-17-2006, 01:43 PM   #11
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
i'm not sure what execvp is looking for?

is it looking for /bin/vgscan.lvm1 and /bin/vgchange.lvm1?

Heres another question, I only have lvm2 installed, and the vgscan/vgchange that gets inserted into the initrd is lvm2 ... do i need to install old lvm1 stuff?
 
Old 05-17-2006, 02:02 PM   #12
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
ok so what i did was copy /sbin/lvm.static to /bin/lvm on the initrd image
lvm.static is:
Code:
LVM version:          2.00.25 (2004-09-29)
Library version:      1.00.19-ioctl (2004-07-03)
Driver version:       4.1.0
I then linked all of the following to /bin/lvm in the image:
Code:
/bin/vgscan
/bin/vgscan.lvm1
/bin/vgchange
/bin/vgchange.lvm1
I rebooted, I see "Scanning for logical drives"

and then it hangs for atleast 2 minutes before I rebooted

any ideas?

Thanks!
George
 
Old 05-17-2006, 05:38 PM   #13
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Are those programes dynamic link or static link. If they are dynamic link, you will have to move the libraries too. Compiling the programs as static to put on a initrd makes it a lot easier, but they take a lot of space and memory.

Read http://www.tldp.org/HOWTO/LVM-HOWTO/lvm2_boot.html
 
Old 05-19-2006, 11:05 AM   #14
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
ahhh, that seems to be one of my problems

the static versions of dmsetup and lvm are like 2 years old, which is what is put into the initrd, however my libraries are newer, how do i include the libraries or statically link? either or is fine with me
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
what is initrd? PinRojas Linux - Newbie 2 06-16-2005 12:18 PM
initrd chris318 Linux - Software 1 02-27-2005 05:28 PM
Do I even need an initrd? chadman Linux - General 3 02-20-2005 10:53 PM
initrd tekbuz Debian 2 08-04-2004 01:34 PM
using initrd? e1000 Linux - General 4 02-19-2004 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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