View previous topic :: View next topic |
Author |
Message |
missinghelix n00b
Joined: 24 Dec 2004 Posts: 19 Location: Boston, MA
|
Posted: Fri Jan 14, 2011 10:45 pm Post subject: kernel panic - grub can't see root partition (LVM/RAID) |
|
|
I'm following the RAID/LVM2 Quickinstall Guide and installing gentoo on an Intel Core 2 Quad, dual 1-TB drives.
Partitioning:
Code: |
/dev/sda,b
sda1 : 100 M RAID 1 /boot partition
sda2 : 16 GB RAID 1 swap
sda3 : 914 GB RAID 1 LVM2
|
sda3 has one volume group, vg, containing:
Code: |
/dev/vg/home : 500GB
/dev/vg/root : ~300GB
|
Yes, i know i am flagrantly disregarding good sense by putting my root partition on a LVM -- and yes, this is the crux of my issue.
On reboot, i get a kernel panic from grub because it can't find my root partition.
grub.conf:
Code: |
name Gentoo Linux Server
insmod raid
insmod lvm
root (hd0,0)
kernel /boot/kernel /root=(vg-root)
|
I am getting conflicting syntax information about the insmod statements, and the structure of the /root parameter, from http://grub.enbug.org/LVMandRAID . Should i be specifying ?
I'm also confused about specifying the boot location as (hd0,0) and not (md0): which is correct?
Thanks! |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21708
|
Posted: Fri Jan 14, 2011 11:14 pm Post subject: Re: kernel panic - grub can't see root partition (LVM/RAID) |
|
|
missinghelix wrote: | Code: | /dev/sda,b
sda1 : 100 M RAID 1 /boot partition
sda2 : 16 GB RAID 1 swap
sda3 : 914 GB RAID 1 LVM2 |
| I assume you are doing software RAID via Linux, rather than hardware RAID via a controller or FakeRAID through the BIOS, correct?
If so, then placing swap on a RAID volume may not be needed. Linux can naturally handle multiple swap volumes and split data among them. The potential boost to data integrity is not likely to help much with swap, since it is so temporary. You might get a throughput boost from read interleaving.
What do you hope to gain by using mirroring? Are you primarily interested in the improved data integrity or in the potential for improved performance? It is a bit unusual to see RAID and LVM used at the same time, so depending on your requirements, you may need only one, rather than both.
missinghelix wrote: | On reboot, i get a kernel panic from grub because it can't find my root partition. | Please provide the last 20 lines of output before the panic.
missinghelix wrote: | grub.conf: Code: | name Gentoo Linux Server
insmod raid
insmod lvm
root (hd0,0)
kernel /boot/kernel /root=(vg-root) |
| Although you may be able to do without it, an initramfs would make this much easier.
For a dedicated kernel, why not build in the RAID and LVM support? Based on your design, you will never have a working system with them unloaded, and building them in will reduce complexity.
This is the first time I have seen anyone prefix root= with a /. Yes, root= needs to point to a device node which exists and contains your filesystem.
missinghelix wrote: | I'm also confused about specifying the boot location as (hd0,0) and not (md0): which is correct? | That specification is a grub name, not a kernel name. |
|
Back to top |
|
|
missinghelix n00b
Joined: 24 Dec 2004 Posts: 19 Location: Boston, MA
|
Posted: Fri Jan 14, 2011 11:37 pm Post subject: Re: kernel panic - grub can't see root partition (LVM/RAID) |
|
|
Hu wrote: | I assume you are doing software RAID via Linux, rather than hardware RAID via a controller or FakeRAID through the BIOS, correct? |
Correct.
Quote: |
If so, then placing swap on a RAID volume may not be needed. Linux can naturally handle multiple swap volumes and split data among them. The potential boost to data integrity is not likely to help much with swap, since it is so temporary. You might get a throughput boost from read interleaving.
|
fair enough.
Quote: | What do you hope to gain by using mirroring? Are you primarily interested in the improved data integrity or in the potential for improved performance? |
data integrity. The idea is to have a 1TB install with an easily extendable home partition and flexible resizing.
Quote: | Please provide the last 20 lines of output before the panic. | forthcoming ...
Quote: | For a dedicated kernel, why not build in the RAID and LVM support? Based on your design, you will never have a working system with them unloaded, and building them in will reduce complexity. |
done.
Quote: | Yes, root= needs to point to a device node which exists and contains your filesystem. | Okay. what's grub syntax to point to a logical volume on a raid, then? I tried (vg-root) and that didn't work either. |
|
Back to top |
|
|
svenc n00b
Joined: 06 Apr 2003 Posts: 33
|
Posted: Sat Jan 15, 2011 3:06 am Post subject: |
|
|
Having spent a lot of time trying to get the same thing to work, I too recommend initramfs. You create an initramfs with the functionality you want ( i.e. LVM, mdadm ) and embed within the kernel without concern for genkernel, initrd or grub. Incredible document for doing so: http://en.gentoo-wiki.com/wiki/Initramfs.
Sven |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21708
|
Posted: Sat Jan 15, 2011 3:44 am Post subject: Re: kernel panic - grub can't see root partition (LVM/RAID) |
|
|
missinghelix wrote: | Quote: | Yes, root= needs to point to a device node which exists and contains your filesystem. | Okay. what's grub syntax to point to a logical volume on a raid, then? I tried (vg-root) and that didn't work either. | I am pretty sure that Grub cannot read LVM, which is why even root-on-LVM users leave their /boot in a separate partition. However, I think there was a misunderstanding. Since you have managed to get a kernel panic, grub apparently did find your kernel image somehow. That says you do not need grub syntax for referencing a logical volume. You need Linux syntax, which is likely root=/dev/mapper/vg-root, assuming that something else has already activated the logical volume. If it is not activated, you may not be able to boot without activating it first. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|