LinuxQuestions.org
Register a domain and help support LQ
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 07-10-2010, 08:24 PM   #1
gammahermit
Member
 
Registered: Apr 2010
Distribution: Debian
Posts: 39

Rep: Reputation: 4
Trouble booting up to LVM partition on Raid1.


I been trying all day to boot debian on a lvm partition on a raid1. I have found some howtos but they only show how to do it for one or the other not both at the same time. Using those howtos I think I have grub2 setup right the problem is my kernel. It has support for both LVM and Raid built-in. I setup the raid and lvm partitions while running that kernel. But when I use it to boot up the system on the lvm/raid it gives a kernel panic.

VFS: Cannot open root device "mapper/vg-root" or unknown-block(0,0)

The OS is by itself on an old disk sda1. The raid1 is on two other disks sdb1 & sdc1. It is divided into 2 logical partition vg-root & vg-media. I just copied the OS onto vg-root. Then tolled grub to boot to it. The grub entry is like so

menuentry "Debian with kernel 2.6.34" {
insmod lvm
insmod raid
set root='(vg-root)'
linux /boot/bzImage-2.6.34 root=/dev/mapper/vg-root ro vga=795
}

I tried setting root=(md0) but that didn't work either. I'm pretty sure the problem is with the kernel but I don't see why since it can it can see the raid and lvm partitions once it is booted up and both the raid & lvm options are built into the kernel so it should be able to see them at boot time.
 
Old 07-11-2010, 07:55 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Have you compiled the kernel yourself? Debian kernels have the raid components compiled as modules, not compiled in.

If the raid system is compiled into modules, you need to state your RAID partitions in /etc/mdadm/mdadm.conf and rebuild your initramfs. If they are compiled directly in then the RAID partitions should be automatically detected, but the partition type needs to be set to FD (Linux RAID autodetect)

example mdadm.conf:

Code:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

ARRAY /dev/md3 level=raid10 num-devices=4 UUID=ffffffff:ffffffff:ffffffff:ffffffff

ARRAY /dev/md1 level=raid1 num-devices=2 UUID=ffffffff:ffffffff:ffffffff:ffffffff
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=ffffffff:ffffffff:ffffffff:ffffffff

# This file was auto-generated on Wed, 22 Apr 2009 18:03:38 +0100
# by mkconf $Id$
 
Old 07-11-2010, 11:37 AM   #3
gammahermit
Member
 
Registered: Apr 2010
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 4
Yes I compiled the kernel myself and the raid and device mapper modules have been built into the kernel. And the partitions are of type FD
 
  


Reply

Tags
kernel panic, lvm, raid


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 ontop of raid10 or combine two raid1 via lvm? okar Linux - Server 3 09-11-2009 02:37 PM
LVM, raid1 and scsi failure Ezplan Linux - Server 1 05-18-2007 01:59 AM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM
boot fails when booting from lvm partition jlatl69 Linux - Newbie 6 03-07-2006 06:23 AM
Trouble booting new SATA partition with Grub ridensnow23 Linux - Hardware 9 05-29-2005 12:15 PM


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