LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-23-2018, 03:44 PM   #1
keizo
LQ Newbie
 
Registered: Apr 2018
Posts: 3

Rep: Reputation: Disabled
Dual Boot and Encrypted Volumes (Using LVM)


Before installing Linux my hard disk was parted as follows:
500MB (NTFS) reserved by system
100GB (NTFS) primary partition
100GB (NTFS) primary partition
152.5GB free space

How i configured volumes during installation of Linux:
1) I created logical partition a 2.5 GB (ext4) and configured the mount point "/boot";
2) From the entire free space (150GB) i created an encrypted partition;
3) Using LVM i created a volume group "M_V_G" from an encrypted partition;
4) In this group i created logical volumes and assigned the mount points "/root", "/swap" and "/home";

Installation was successful, system works fine but... after selecting "Kali" in GRUB i see the following:
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
Volume group "M_V_G" not found
Cannot process volume group M_V_G
Please unlock disk sda6_crypt:
*I entered password*
WARNING: Failed to connect lvmetad. Falling back to device scanning.
Reading all physical volumes. This my take a while...
Found volume group "M_V_G" using metadata type lvm2
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
3 logical volume(s)in volume group "M_V_G" now active

Then system is loaded

And so... the question: can i get rid of WARNINGs?
 
Old 05-07-2018, 01:21 AM   #2
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Check if you have enabled service lvmetad. Enable it if not.
Check why it does not run if fails.
If nothing helps, disable use_lvmetad in /etc/lvm/lvm.conf
I still not understand the benefits of using lvmetad, everything works well even without it.
 
Old 05-08-2018, 05:52 PM   #3
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
Quote:
1) I created logical partition a 2.5 GB (ext4) and configured the mount point "/boot";
any reason why you made boot bigger as 128MB?

Quote:
4) In this group i created logical volumes and assigned the mount points "/root", "/swap" and "/home";
do you need swap?

keeping home and root separated is up to discussion. i do not do that. the free space is wasted and needed usually on the other partitions. just bad practise.

Quote:
3) Using LVM i created a volume group "M_V_G" from an encrypted partition;
naming lvm containers in rubbish is not good practise, name it properly, so you have an easier life later.

Quote:
Kali"
why do you kali=

Quote:
And so... the question: can i get rid of WARNINGs?
Sure. adapt the boot process

I also made a custom init script. the gentoo shipped one has after many years the same faults. i saw it because i saw guys asking the same questions. i did not bohter reporting back, as 90 percent of my bugs on bugs.gentoo.org or bugs.kernel.org are not read / done something to fix it.

it is expected and usual to write / adapt your own init script when using luks.

and dealing with binary distros with luks is something i would not recommend

--

Quote:
Please unlock disk sda6_crypt: *I entered password*
sorry to write this, but it seems you did not understood the principle of lvm and luks. i would not call something sda6_crypt

Last edited by _roman_; 05-08-2018 at 05:54 PM.
 
Old 05-11-2018, 03:42 PM   #4
keizo
LQ Newbie
 
Registered: Apr 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by voleg View Post
I still not understand the benefits of using lvmetad, everything works well even without it.
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ... This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.


Quote:
Originally Posted by voleg View Post
If nothing helps, disable use_lvmetad in /etc/lvm/lvm.conf
Disabling lvmetad solves the problem, but affects the performance of the commands (I don't know how important it is for me now). If I'll do not find anything better - I use this method, thanks
 
Old 05-11-2018, 04:12 PM   #5
keizo
LQ Newbie
 
Registered: Apr 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by _roman_ View Post
any reason why you made boot bigger as 128MB?
Did according to the guide (there it was stated that is necessary 1.5Gb, since it is not important for me and I can afford 2.5Gb - made so there were no problems)

Quote:
Originally Posted by _roman_ View Post
do you need swap?

keeping home and root separated is up to discussion. i do not do that. the free space is wasted and needed usually on the other partitions. just bad practise.
Perhaps in the future for hibernation.
Again, the free space in this case is not a problem

Quote:
Originally Posted by _roman_ View Post
naming lvm containers in rubbish is not good practise, name it properly, so you have an easier life later.
For example?

Quote:
Originally Posted by _roman_ View Post
why do you kali=
Because of the tools that will be useful in system administration

Quote:
Originally Posted by _roman_ View Post
it is expected and usual to write / adapt your own init script when using luks.
Can you share the materials/links that will help me in adapting the init script?

Quote:
Originally Posted by _roman_ View Post
i would not call something sda6_crypt
Because you are not at the stage of studying the above
 
  


Reply



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
[SOLVED] Encrypted LVM dual boot Debian-Slackware aghasee Linux - Newbie 2 01-30-2018 08:15 AM
Recover grub on a dual boot machine with encrypted LVM mzzxx11 Linux - Newbie 2 10-19-2015 12:41 PM
Dual Boot with Encrypted LVM GhengisCan Linux - General 1 07-12-2014 05:42 AM
Resizable encrypted LVM requiring just one password on boot (encrypted volume group)? Nyyr Linux - Software 9 01-24-2013 05:52 AM
[SOLVED] Slackware 12.1 + RAID 1 + LVM: Can't boot with or without encrypted filesystem gargamel Slackware 29 08-04-2011 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration