Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] LVM-RAID1-install fr. oth. distro - grub trouble
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Mon Jan 12, 2015 8:01 am    Post subject: [SOLVED] LVM-RAID1-install fr. oth. distro - grub trouble Reply with quote

Hi,
As shown in the title of this post, I am trying to install Gentoo on an existing system with lvm from inside Debian.
My profile is Gnome systemd.
It is not that easy to follow the handbook when you have three causes of diversion, I mean systemd, lvm and alternate method and not to forget something – what I probably did.
Here is what the
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

returns
Quote:

WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.


Can somebody tell me what is the trouble here?


Last edited by augustin2 on Wed Jan 14, 2015 4:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Mon Jan 12, 2015 8:17 pm    Post subject: Reply with quote

First, installing from other linux is NOT an alternative way. It's the only supported way, described in handbook. Stick to it and it will make your life easier.
Second, profiles are there to help you, not to make additional mess. You chose one with sysd, so be it. The only difference is you can't configure network with netifrc.
Now, LVM part. I'm not sure if grub2 can boot from LVM. Even if it can, I suggest creating separate boot partition outside of LVM. 50 MB is enough for me, you can just as well use 100MB if you want to keep a dozen of kernel's generations there. Disk space is reasonably cheap :)

There is one more thing you should know before you start: stage3 is basicaly a minimal, self-sufficient gentoo system. Don't bother installing tones of packages and fine tuning your system before reboot. You only need stage3, kernel and bootloader to get started. And support for LVM in whatever linux you use until then. You must create some volumes before you can install to them.
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Mon Jan 12, 2015 9:24 pm    Post subject: Reply with quote

I'm pretty much just totally guessing as it has been years since I used lvm but it seems like a logical thing to check. Do you have grub configured to use the "device-mapper" use flag? 'emerge -pv sys-boot/grub'
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Mon Jan 12, 2015 9:32 pm    Post subject: Reply with quote

augustin2,

Those are only warnings - they are not fatal.

Does /boot/grub/grub.cfg contain an entry for your gentoo kernel now?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Tue Jan 13, 2015 7:16 am    Post subject: Reply with quote

Thank you all for your answers.
I will try to follow your advices as soon as I can. At the time being I cannot.
@szatox : before installing Debian, I didn't created non LVM partition for /boot. Other volumes for /root and /home were already created before install.
@davidm: I didn't pay attention to this point. I have to check this.
@NeddySeagon: there is one entry. Maybe I can boot
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Tue Jan 13, 2015 3:29 pm    Post subject: Reply with quote

I re-emerged grub with the device-mapper flag and rerun grub2-mkconfig.
I used my Debian grub, re-running the same grub-mkconfig to start.

When trying to start on the Gentoo sys, I am told /dev/mapper/GV0-Logical_Volume_06 (the root device for Gentoo) is not a valid device.
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Tue Jan 13, 2015 5:03 pm    Post subject: Reply with quote

augustin2 wrote:
I re-emerged grub with the device-mapper flag and rerun grub2-mkconfig.
I used my Debian grub, re-running the same grub-mkconfig to start.

When trying to start on the Gentoo sys, I am told /dev/mapper/GV0-Logical_Volume_06 (the root device for Gentoo) is not a valid device.


Maybe boot from a live cd or sysrescue cd or such and verify the device and volume names. Then chroot and repair any errors you might have found.

http://wiki.gentoo.org/wiki/LVM#List_LV

^ This wiki page might have something to help you as well.

You might also want to try with an initramfs if you just want to get it working. See this too maybe:
http://wiki.gentoo.org/wiki/LVM#Using_LVM_in_an_initramfs
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Wed Jan 14, 2015 6:13 am    Post subject: Reply with quote

Hi davidm,
Thank you for your help
I installed an initramfs with
Code:
genkernel --lvm --mdadm --install initramfs

re-run the
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

in the chrooted env.
Then after booting debian re-run
Code:
grub-mkconfig -o /boot/grub/grub.cfg

Rebooting I have the following entry in the debian boot menu
Quote:
setparams 'Gentoo GNU/Linux (on /dev/mapper/GV0-Logical_Volume_06/'
insmod raid
insmod mdraid1x
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(GV0-Logical_Volume_06)'
search --no-floppy --fs-uuid --set=root-b4be8a87-67ba-…
linux /boot/kernel-genkernel-x86_64-3.17.7-gentoo
root= /dev/mapper/GV0-Logical_Volume_06 ro rootfstype=ext4 real_init=/usr/lib/systemd/systemd dolvm
initrd /boot/initramfs-genkernel-x86_64-3.17.7-gentoo


When choosing this entry I end with the following message

Quote:
lvm failed to run cannot activate logical volumes >> initializing root devicee -- /dev/mapper/GV0-Logical_Volume_06 is an invalid root device
Please file a bug …


In fact, it seems that lvm not running is the root of the trouble!?
The naming of the logical volumes are those a lvdisplay command returns.
Nevertheless I have some hesitation on how to name the devices in the fstab (but probably this is not the problem) should it be:
/dev/GV0/Logical_Volume_06 or
/dev/mapper/GV0-Logical_Volume_06 or
/dev/mapper/GV0/Logical_Volume_06 ?
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Wed Jan 14, 2015 4:09 pm    Post subject: Reply with quote

Eventually I could manage to boot.
I forgot several things as:
adding the dmraid flag before emerging genkernel
running genkernel with the --lvm and --mdadm option.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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