LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-23-2009, 05:39 PM   #1
mgrant
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Rep: Reputation: 0
initramfs cannot find lvm root partition


I am trying to move my root and swap to a raid mirror with lvm in the raid partition.

When I boot, this is what I see:

Code:
  Volume group "root" not found
Done.
Begin: Waiting for root file system... ...
then after a long wait...

Code:
Done.
        Check root= bootarg cat /proc/cmdline
        or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/array0/root0 does not exist. Dropping to a shell!
After some poking around, I see /dev/md0 and /dev/md1 are there in the initramfs shell, what's not happening is the lvm does not seem to be kicking in, hence, it's not able to find my /dev/array0/root0 lvm.

Fortunately I can still boot single user mode.

I looked in initrd.img-2.6.18-6-686 with zcat|cpio -t and I see lib/libdevmapper.so.1.02. What it seems to me is that the lvm init script or whatever sets up the /dev/vgname/lvname stuff in /dev isn't getting run, or maybe lvm isn't in there at all really.

Some poking around turned up this page: http://www.tldp.org/HOWTO/LVM-HOWTO/lvm2_boot.html which talks about adding:

Code:
dmsetup mknodes
vgscan --ignorelockingfailure
vgchange -ay --ignorelockingfailure
this to a linuxrc, but I'm not sure where to add that. Furthermore, I don't see any of those commands: dmsetup, cgscan, or vgchange in the initrd.img-2.6.18-6-686.

I have run update-initramfs several times and copied the resulting new files to /dev/md0, but for some reason, update-initramfs does not seem to be creating the correct script to initialize the lvm stuff.

Probably there is a simple fix for this or a step in installing the raid/lvm stuff that I've missed?

I'm doing this on Debian Etch. The system was booting fine from an lvm disk partition before. Incidentally, the volume group of the old non-raid lvm was 'root' which is interesting because that's in the first line way above where it says 'Volume group "root" not found'. I don't know where it's getting that old volume group name from, it definitely has been changed in menu.lst.

Michael Grant
 
Old 01-23-2009, 07:12 PM   #2
jpritikin
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 1
did you run update-initrd inside a chroot?

As far as I know, update-initrd reads from /etc/fstab to figure out where to get root. To permit update-initrd to guess the right place, you need to mount your new root and boot somewhere (e.g. /mnt and /mnt/boot); then chroot /mnt; and then update-initrd. That might solve it.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM: Resizing the root partition fulat2k Linux - General 6 01-08-2012 04:35 PM
MYSQL Crashed - Root partition full - can't find the big files userlander Linux - Software 2 11-03-2008 01:51 PM
lvm root partition corrupt w3bd3vil Linux - Software 0 09-23-2007 03:50 AM
Switching root with initramfs slacker9 Slackware 5 07-24-2007 04:15 PM
Boot cant find initramfs caleb star Linux - Kernel 4 06-13-2007 07:57 AM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration