View previous topic :: View next topic |
Author |
Message |
shuuraj n00b
Joined: 13 Jan 2014 Posts: 38
|
Posted: Tue Jan 14, 2014 10:36 am Post subject: [SOLVED] MD-Raid + LVM2 chroot |
|
|
After installing my system and going for the first boot my root partition was not detected.
I booted the live cd, mounted the partitions which worked so far.
But when I try to open the grub config I get an error message.
I'm not at home at the moment, but I will provide you with the exact message when I'm back home.
My question for now is: How do I correctly chroot into my environment which uses LVM and MD-Raid?
The boot partition is a md raid 1.
/home is md raid 0.
And an other md raid 0 partition where my lv's like /var etc. are located.
Last edited by shuuraj on Wed Jan 29, 2014 9:37 am; edited 2 times in total |
|
Back to top |
|
|
Kompi Apprentice
Joined: 05 Oct 2002 Posts: 252 Location: Germany
|
Posted: Thu Jan 23, 2014 12:49 pm Post subject: Re: MD-Raid + LVM2 chroot |
|
|
shuuraj wrote: | How do I correctly chroot into my environment which uses LVM and MD-Raid? |
Basically, like you would do without LVM and MD raid. You get everything mounted to you chroot directory and then chroot into it.
With the liveCD you may have to manually detect the RAID array and LVs first. Something like this:
Code: | mdadm --assemble --scan
vgscan
vgchange -ay |
Then mount everything:
Code: | # mount root & boot (plus any other volume you want to work with)
mount /dev/<ROOT> /mnt/gentoo
mount /dev/<BOOT> /mnt/gentoo/boot
# bind mount kernel pseudo fs'es
mount -o bind /dev /mnt/gentoo/dev
mount -o bind /proc /mnt/gentoo/proc
mount -o bind /sys /mnt/gentoo/sys
# and chroot into it
chroot /mnt/gentoo /bin/bash |
Quote: | After installing my system and going for the first boot my root partition was not detected. |
According to https://raid.wiki.kernel.org/index.php/RAID_setup#7._Misc you must create mirrored RAID boot partitions with metadata version 1.0, so that GRUB can find it. Maybe you used metadata v1.2? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Thu Jan 23, 2014 5:31 pm Post subject: |
|
|
If I get you right:
you have at least those partitions:
/
/boot
/home
and when you attempted to boot, grub loaded kernel to RAM, but failed to mount /
Is it correct? There are 2 possible reasons:
1) wrong params provided to kernel
i'm using: root=/dev/ram0 ramdisk=8192 dolvm lvmraid=/dev/md2 real_root=/dev/mapper/vg0-gentoo, change values to match your setup
2) you don't have lvm support in your initramfs
genkernel --lvm --no-clean all
unlikely, AFAIR instaling grub would fail if metadata format was unsupported. - You're right, it should be 1.0 though. |
|
Back to top |
|
|
shuuraj n00b
Joined: 13 Jan 2014 Posts: 38
|
Posted: Mon Jan 27, 2014 7:06 pm Post subject: |
|
|
Actually it worked with the uuid.... |
|
Back to top |
|
|
|