N
N
Nikolay Shamanovich2014-10-06 20:59:57
linux
Nikolay Shamanovich, 2014-10-06 20:59:57

Why won't gentoo start with LVM2 root?

I'm trying to install gentoo rooted on a lvm2 partition. I'm doing all this on a machine with debian already installed, which is also installed on lvm2. It is necessary that both systems work (I will probably remove Debian later).
I am compiling the kernel for dzhent with the help
genkernel --install --lvm all
of croot.
Everything is assembled correctly, then I manually write to /boot/grub/grub.cfg
Manually, because grub2 makes a bad config (or I'm doing something wrong).
Then I boot, and an error appears:

Block device /dev/mapper/hdd-gentoo is not valid root device

If you take the kernel and initram from debian, everything is loaded with a bang.
What could be wrong? It seems to me that real_root must be specified somewhere in the jent configs, but I can’t find where.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Veritatis_Exquisitor, 2014-10-07
@Shm13

1. wiki.gentoo.org/wiki/LVM
2. wiki.gentoo.org/wiki/Initramfs
3. You can also use the command to create an initrd

lvm2create_initrd -c /etc/lvm/lvm.conf -M gentoo `uname -r`
from the package sys-fs/lvm2She will tell, after execution, what parameters need to be added to the kernel. And try not to edit grub.cfg with your hands, but grub2-mkconfig -o /boot/grub/grub.cfgHe usually adds the necessary parameters to the kernel, including real_root. (Before that, in order for grub2 to find the initrd, remove the "lvm2-" from its name).
I myself collected the initramfs with my hands, tk. I still have the whole thing on a portable HDD-USB. (But this is an extreme case ...).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question