Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with GRUB configuration for LUKS and LVM
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Mon Jun 05, 2017 12:04 pm    Post subject: Problem with GRUB configuration for LUKS and LVM Reply with quote

Hello,

after I have installed grub and I reboot I got this error message:

Code:
>> Scanning for and activating Volume Groups
    Reading all physical volumes. This make take a while...
    No volume groups found
    No volume groups found
    No volume groups found
Device UUID=sWIfA8-LTKF-H10W.....     doesn´t exist or access denied.
!! The LUKS device UUID=sWIfA8-LTKF-H10W..... does not contain a LUKS header
!! Could not find the root in UUID=sWIfA8-LTKF-H10W..... .
!! Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip...
root(UUID=sWIfA8-LTKF-H10W.....) ::


I have edit my grub configuration file (/etc/default/grub) with these lines:
Code:
#Append parameters to the linux kernel command line
GRUB_CMDLINE_LINUX="real_root=/dev/vg_gentoo2/lv_root crypt_root=UUID=sWIfA8-LTKF-H10W..... dolvm"
.
.
.
GRUB_ENABLE_CRYPTODISK=y


I also edited /etc/default/grub with only these lines:
Code:
#Append parameters to the linux kernel command line
GRUB_CMDLINE_LINUX="crypt_root=UUID=sWIfA8-LTKF-H10W..... dolvm"
.
.
.
GRUB_ENABLE_CRYPTODISK=y


and

Code:
#Append parameters to the linux kernel command line
GRUB_CMDLINE_LINUX="real_root=/dev/vg_gentoo2/lv_root dolvm"
.
.
.
GRUB_ENABLE_CRYPTODISK=y


But then I got this error message:
Code:
!! Block device /dev/sdb4 is not a valid root device ...
!! Could not find the root block device in .
Please specify another value or: press Enter for the same, type "shell" for shell, or "q" to skip ...
root block device () ::


I searched online for several solutuions but none of them worked.

My partition setup is this:
Code:

(chroot) livecd / # lsblk
                                         SIZE                    TYPE              MOUNTPOINT
sdb                                    232,9G                    disk                     
|- sdb4                                231,7G                    part
|   I- sb4-luks                        231,7G                    crypt
|       I-vg_gentoo2-lv_opt                5G                    lvm                 /opt
|       I-vg_gentoo2-lv_usr               15G                    lvm                 /usr
|       |-vg_gentoo2-lv_root              20G                    lvm                 /
|       |-vg_gentoo2-lv_usr_local          7G                    lvm                 /usr/local
|-sdb2                                   1,1G                    part                /boot
|-sdb1                                     3M                    part
sr0                                      261M                    rom
loop0                                  228,6M                    loop
sda                                    298,1G                    disk
|-sda1                                 298,1G                    part
  |-sda1-luks                          298,1G                    crypt
  |-vg_gentoo1-lv_swap                     9G                    lvm
  |–vg_gentoo1-lv_var                      5G                    lvm                  /var
  |–vg_gentoo1-lv_tmp                    452M                    lvm                  /tmp
  |–vg_gentoo1-lv_home                    15G                    lvm                  /home
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Jun 05, 2017 6:07 pm    Post subject: Reply with quote

Just my opinion:

lvm container is named ot the brand of the drive (ADATA)
root volume, lv volume is named accordingly to make things easier on my side (could be named to anything fancy)
Code:
├─sda3                                                      8:3    0 111,6G  0 part 
│ └─vg_root_volume_ADATA-lv_root_volume_ADATA             251:0    0 111,6G  0 lvm   
│   └─root_vg_root_volume_ADATA-lv_root_volume_ADATA-root 251:1    0 111,6G  0 crypt /



--

in your setup you miss the lvm features. like using snapshots. moving physical extents (used that several times in past years)

I know guides suggests your setup, i am against it

--

Usual errors:

missing features of the kernel, includes initramfs. : lvm / initramfs / encryption
bootoader issues, initramfs issues (most likely when you use genkernel initramfs)

--

MY suggestion.

use an external disk, copy over your /, redo the step about partitions / lvm / luks in that way => SSD => lvm2 => luks => ext4
copy back / from external disk. (can be an enxrypted luks too)
use unencrypted boot with grub2 from linux mint, manually unpack and adapt genkernels initramfs to suit your needs. use modified genkernel + custom kernel + grub2 from linux mint

(above procedure works. I use a similar procedure to do my backups. works on several plain SSDs fresh out of the box with 128GB / 120GB)

--

When you want to fix your setup. Find the root cause, I suggest you unpack your initramfs and verify step by step. I did the same years ago to get my genkernel initramfs going. The lazy approach is to fix genkernel initramfs to your needs. Some even write their own initramfs / init for htat stuff.

I would not expect that genkernel or any other initramfs works out of the box.

--

Totally off topic, just my point of view

I recommend making single partitino for / or / and /home
You will waste a lot of space when you setup many partitions for different folders. Also the FHS is not really respected anymore.
Swap is not needed anymore. My previous box was a notebook with 4GB RAM and never had any SWAP and worked. This box has 16GB RAM, before 8GB RAM and never had any SWAP. You may need swap on those mini computers like rasperry pi and such. or boxes with 1 / 2 GB of RAM.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Tue Jun 06, 2017 1:35 am    Post subject: Reply with quote

OP: as you are new here, I will warn you that it is not uncommon that people disagree with Roman_Gruber or disregard him entirely.

Your error messages look like they come from a Linux initramfs (probably generated by genkernel), not from GRUB itself (although GRUB2 is also able to access advanced storage configurations, when properly configured). Is it correct to say that those errors come from a Linux initramfs? If it is an initramfs, was it generated by genkernel (common for new users) or did you create it in some other way? As I read your lsblk output, it looks to me like you do not need GRUB to understand LUKS or LVM.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2799

PostPosted: Tue Jun 06, 2017 4:51 am    Post subject: Reply with quote

Hu wrote:
... (although GRUB2 is also able to access advanced storage configurations, when properly configured)

Are you saying GRUB2 can start a system on LVM without the help of an initramfs?
Back to top
View user's profile Send private message
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Tue Jun 06, 2017 2:51 pm    Post subject: Reply with quote

Hu wrote:
OP: as you are new here, I will warn you that it is not uncommon that people disagree with Roman_Gruber or disregard him entirely.

Your error messages look like they come from a Linux initramfs (probably generated by genkernel), not from GRUB itself (although GRUB2 is also able to access advanced storage configurations, when properly configured). Is it correct to say that those errors come from a Linux initramfs? If it is an initramfs, was it generated by genkernel (common for new users) or did you create it in some other way? As I read your lsblk output, it looks to me like you do not need GRUB to understand LUKS or LVM.


Yes, my initramfs was generated by genkernel.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 06, 2017 7:39 pm    Post subject: Reply with quote

skysearcher,

The key part of your post is
Code:
!! Block device /dev/sdb4 is not a valid root device ...
!! Could not find the root block device in .

Between the word 'in' and the period, the kernel has listed all the block devices it can see.
That's none at all.

Nothing else matters until the kernel can see your HDD.

Please post the output of
Code:
lspci -nn
so we can see your hardware.
Put your kernel .config
Code:
 /usr/src/linux/.config
onto a pastebin site.

Genkernel usually gets this part of the kernel right but with very new or rare hardware, it may need a hand.
_________________
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
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Wed Jun 07, 2017 1:31 am    Post subject: Reply with quote

charles17 wrote:
Hu wrote:
... (although GRUB2 is also able to access advanced storage configurations, when properly configured)

Are you saying GRUB2 can start a system on LVM without the help of an initramfs?
I was repeating hearsay from the Gentoo Wiki page GRUB2: Advanced Storage. ;) I interpret that page to mean that GRUB2 can obtain data from a filesystem on LVM. The kernel thus obtained may or may not be able to boot without help from an initramfs. In theory, you could have GRUB2 load a kernel from an LVM-wrapped filesystem, but that kernel not be able to boot from LVM on its own. Such a situation would not be useful in most cases, but could be acceptable in exotic cases where the booted kernel has no need for the LVM-wrapped filesystems.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 07, 2017 8:13 am    Post subject: Reply with quote

Hu,

Grub2 can do its own thing with raid, LVM anh maybe LUKS.
That's only loading the kernel and optionally, the initrd.

grub-legacy cannot read from LVM and with raid you need to cheat a bit. A raid1 /boot with raid metadata 0.90 can be read.
That's a bit of an exaggeration, the raid is ignored as the filesystem on the raid1 is in the same place as it would be non raided.
Hence a raid1 /boot with raid metadata 1.2 is a showstopper.

Nothing has changed once the kernel and optionally, the initrd are loaded.
The kernel, using the initrd, if any, still has to do the rest.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Wed Jun 07, 2017 9:25 am    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

The key part of your post is
Code:
!! Block device /dev/sdb4 is not a valid root device ...
!! Could not find the root block device in .

Between the word 'in' and the period, the kernel has listed all the block devices it can see.
That's none at all.

Nothing else matters until the kernel can see your HDD.

Please post the output of
Code:
lspci -nn
so we can see your hardware.
Put your kernel .config
Code:
 /usr/src/linux/.config
onto a pastebin site.

Genkernel usually gets this part of the kernel right but with very new or rare hardware, it may need a hand.


Here is the output of lspci -nn:
Code:
00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 0
4)
00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20]
(rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4)
00:1c.1 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1e12] (rev c4)
00:1c.2 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 [8086:1e14] (rev c4)
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation QM77 Express Chipset LPC Controller [8086:1e55] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04)
02:00.0 System peripheral [0880]: Ricoh Co Ltd PCIe SDXC/MMC Host Controller [1180:e823] (rev 04)
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)


And here is the link to my kernel.config:
https://fr32k.de/schnipsel/?d2b3e6ccc1aa5956#UOTB6fbnpOOrzFayHFdiRls5EpKcnB08+KECFDwxcII=
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 07, 2017 1:44 pm    Post subject: Reply with quote

skysearcher,

Code:
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04)

That's a good sign. Genkernel knows about that chip set.

Your kernel set up as far as getting the kernel to list block devices looks good too.
You must use an initrd, as you have a fully modular kernel.
I didn't ask for your grub.cfg file but everywhere it contains a line
kernel <file> .. root=,,,
It must be followed by an initrd <file> line.
Failure to use an initrd with your kernel settings produces the symtoms you report.
What happens is that the modules needed to mount the root filesystem are located on the root filesystem, which can't be read until the modules located on the root filesystem have been loaded.
The initrd fixes this loop.

With LVM and LUKS you must use an initrd, as you need user space tools to mount root.

Much longer shot ...
I have two systems based on the same hardware. One needs # CONFIG_SATA_AHCI_PLATFORM is not set to be on in the kernel, the other does not.
I don't know why. Its off in your kernel, so if your initrd is in /boot and grub is loading it. Its worth a shot.

Feel free to post the output of
Code:
ls -l /boot
Thats your /boot and the content of grub.cfg if you want a second pair of eyes.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Wed Jun 07, 2017 5:56 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

Code:
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04)

That's a good sign. Genkernel knows about that chip set.

Your kernel set up as far as getting the kernel to list block devices looks good too.
You must use an initrd, as you have a fully modular kernel.
I didn't ask for your grub.cfg file but everywhere it contains a line
kernel <file> .. root=,,,
It must be followed by an initrd <file> line.
Failure to use an initrd with your kernel settings produces the symtoms you report.
What happens is that the modules needed to mount the root filesystem are located on the root filesystem, which can't be read until the modules located on the root filesystem have been loaded.
The initrd fixes this loop.

With LVM and LUKS you must use an initrd, as you need user space tools to mount root.

Much longer shot ...
I have two systems based on the same hardware. One needs # CONFIG_SATA_AHCI_PLATFORM is not set to be on in the kernel, the other does not.
I don't know why. Its off in your kernel, so if your initrd is in /boot and grub is loading it. Its worth a shot.

Feel free to post the output of
Code:
ls -l /boot
Thats your /boot and the content of grub.cfg if you want a second pair of eyes.


Here is the link to my grub.cfg:
https://fr32k.de/schnipsel/?457c30f30b6babcf#fNZ60QGY9aIjwn40qo2d/RW7+mEVu07dP1bhgYlixsc=

And here is the output of ls -l /boot:
Code:
(chroot) livecd / # ls -l /boot
insgesamt 43206
drwxr-xr-x 6 root root     1024  5. Jun 12:41 grub
-rw-r--r-- 1 root root 35685976 27. Mai 09:53 initramfs-genkernel-x86_64-4.9.16-gentoo
-rw-r--r-- 1 root root  5201904 27. Mai 09:07 kernel-genkernel-x86_64-4.9.16-gentoo
drwx------ 2 root root    12288 26. Mai 21:30 lost+found
-rw-r--r-- 1 root root  3163465 27. Mai 09:07 System.map-genkernel-x86_64-4.9.16-gentoo


I uncommend # CONFIG_SATA_AHCI_PLATFORM is not set in my kernel.config but I got the same error message as before.

Here in line 1.957:
https://fr32k.de/schnipsel/?d2b3e6ccc1aa5956#UOTB6fbnpOOrzFayHFdiRls5EpKcnB08+KECFDwxcII=
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 07, 2017 6:58 pm    Post subject: Reply with quote

skysearcher,

You appear to be doing everything correctly but it doesn't work.
Lets dig a bit deeper.

When the boot fails, it should offer to drop you to a rescue shell. Its a very minimal shell but its enough to look around.

Boot, let it fail and go into the shell.
Code:
ls /dev/sd*
should list your hard drive(s) and partitions.
Are they all there?

If not the next step will fail, so stop here and report what you find.

If that's correct,
Code:
ls /dev/mapper/*
should list your logical volumes.
If /dev/mapper/ only contains control, logical volume manager did not start your logical volumes.

You can start them by hand. Exactly how, depends on the content of your initrd.
ls /sbin/lv* will giv some hints.

Run
Code:
/sbin/lvchange -ay
if /sbin/lvchange exists
Code:
/sbin/lvm lvchange -ay
does the same thing a different way.

I suspect that this step will fail and generate an error message.
Post the error message.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Fri Jun 09, 2017 6:45 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

You appear to be doing everything correctly but it doesn't work.
Lets dig a bit deeper.

When the boot fails, it should offer to drop you to a rescue shell. Its a very minimal shell but its enough to look around.

Boot, let it fail and go into the shell.
Code:
ls /dev/sd*
should list your hard drive(s) and partitions.
Are they all there?

If not the next step will fail, so stop here and report what you find.

If that's correct,
Code:
ls /dev/mapper/*
should list your logical volumes.
If /dev/mapper/ only contains control, logical volume manager did not start your logical volumes.

You can start them by hand. Exactly how, depends on the content of your initrd.
ls /sbin/lv* will giv some hints.

Run
Code:
/sbin/lvchange -ay
if /sbin/lvchange exists
Code:
/sbin/lvm lvchange -ay
does the same thing a different way.

I suspect that this step will fail and generate an error message.
Post the error message.


ls /dev/sd* lsited all my partitions correctly.
ls /dev/mapper/ only contains control and when I ran ls /sbin/lv* I only saw /sbin/lvmchange so I ran:
Code:
/sbin/lvmchange

and got this error message:
Code:
With LVM2 and the device mapper, this programm is obsolete.

I also ran:
Code:
/sbin/lvmchange -ay

and got this error message:
Code:
Error during parsing of command line.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jun 09, 2017 7:00 pm    Post subject: Reply with quote

skysearcher,

Oops typo ...
Code:
 /sbin/lvmchange -ay

Its lvchange - there is no m.

Normally, most of the commands are symlinks to /sbin/lvm anyway
Code:
ls -l /sbin/lv*
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvchange -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvconvert -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvcreate -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvdisplay -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvextend -> lvm
-r-xr-xr-x 1 root root 1630792 Feb 22 10:56 /sbin/lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmchange -> lvm
-r-xr-xr-x 1 root root   12691 Feb 22 10:56 /sbin/lvmconf
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmconfig -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmdiskscan -> lvm
-r-xr-xr-x 1 root root   10418 Feb 22 10:56 /sbin/lvmdump
-r-xr-xr-x 1 root root   68560 Feb 22 10:56 /sbin/lvmetad
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmsadc -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmsar -> lvm
-r-xr-xr-x 1 root root 2755080 Feb 22 10:56 /sbin/lvm.static
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvreduce -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvremove -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvrename -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvresize -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvs -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvscan -> lvm


Your post has the extra m in both commands. Please retest.
I can reproduce your error messages with the commands you posted.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Fri Jun 09, 2017 7:21 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

Oops typo ...
Code:
 /sbin/lvmchange -ay

Its lvchange - there is no m.

Normally, most of the commands are symlinks to /sbin/lvm anyway
Code:
ls -l /sbin/lv*
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvchange -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvconvert -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvcreate -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvdisplay -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvextend -> lvm
-r-xr-xr-x 1 root root 1630792 Feb 22 10:56 /sbin/lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmchange -> lvm
-r-xr-xr-x 1 root root   12691 Feb 22 10:56 /sbin/lvmconf
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmconfig -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmdiskscan -> lvm
-r-xr-xr-x 1 root root   10418 Feb 22 10:56 /sbin/lvmdump
-r-xr-xr-x 1 root root   68560 Feb 22 10:56 /sbin/lvmetad
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmsadc -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvmsar -> lvm
-r-xr-xr-x 1 root root 2755080 Feb 22 10:56 /sbin/lvm.static
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvreduce -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvremove -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvrename -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvresize -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvs -> lvm
lrwxrwxrwx 1 root root       3 Feb 22 10:56 /sbin/lvscan -> lvm


Your post has the extra m in both commands. Please retest.
I can reproduce your error messages with the commands you posted.


I ran:
Code:
/sbin/lvchange -ay

and got this error message:
Code:
/bin/bash: /sbin/lvchange: not found

And I ran:
Code:
/sbin/lvm lvchange -ay

and got this error message:
Code:
Please give logical volume path(s)
Run ´lvchange --help´ for more information.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jun 09, 2017 7:30 pm    Post subject: Reply with quote

skysearcher,

That's encouraging.

The -a in /sbin/lvm lvchange -ay means --all. However, You have two volume groups, vg_gentoo1 and vg_gentoo2.
Try
Code:
/sbin/lvm lvchange -ay vg_gentoo1
to start vg_gentoo1
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Fri Jun 09, 2017 7:39 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

That's encouraging.

The -a in /sbin/lvm lvchange -ay means --all. However, You have two volume groups, vg_gentoo1 and vg_gentoo2.
Try
Code:
/sbin/lvm lvchange -ay vg_gentoo1
to start vg_gentoo1


I ran:
Code:
/sbin/lvm lvchange -ay vg_gentoo1

and got this error message:
Code:
Volume group "vg_gentoo1" not found
Skipping volume group vg_gentoo1

I tried it also with vg_gentoo2 but I got the same error message.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jun 09, 2017 7:54 pm    Post subject: Reply with quote

skysearcher,

Lets move back a bit.

One of
Code:
/sbin/pvscan
/sbin/lvm pvscan
should list your volume groups.

Code:
# /sbin/pvscan
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  PV /dev/md127   VG vg              lvm2 [2.71 TiB / 873.39 GiB free]
  PV /dev/sde2    VG static          lvm2 [476.82 GiB / 303.82 GiB free]
  Total: 2 [3.18 TiB] / in use: 2 [3.18 TiB] / in no VG: 0 [0   ]
The warning can safely be ignored.
This shows two volume groups. vg and static
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Fri Jun 09, 2017 8:08 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

Lets move back a bit.

One of
Code:
/sbin/pvscan
/sbin/lvm pvscan
should list your volume groups.

Code:
# /sbin/pvscan
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  PV /dev/md127   VG vg              lvm2 [2.71 TiB / 873.39 GiB free]
  PV /dev/sde2    VG static          lvm2 [476.82 GiB / 303.82 GiB free]
  Total: 2 [3.18 TiB] / in use: 2 [3.18 TiB] / in no VG: 0 [0   ]
The warning can safely be ignored.
This shows two volume groups. vg and static

Now I got with both commands this error message:
Code:
No matching physical volumes found
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jun 09, 2017 8:19 pm    Post subject: Reply with quote

skysearcher,

Can you try from your install media please?
Boot the install media and those commands should list you volume groups.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Sat Jun 10, 2017 9:42 am    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

Can you try from your install media please?
Boot the install media and those commands should list you volume groups.

Ok, I tried now from my install media:
Code:
ls /sbin/lv*

I got all correctly listed, including /sbin/lvchange.
But with the other commands I got the same error messages as before.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Jun 10, 2017 10:40 am    Post subject: Reply with quote

skysearcher,

From your install media
Code:
/sbin/pvscan
does not list any Physical Volumes?
Please confirm that.

Its not clear in which order you set up LVM and LUKS
.
You can make logical volumes with LUKS inside, or you can make a LUKS container, then divide it up with LVM.
The order is important. I have been assuming (never assume) that you made the logical volumes first, then put LUKS inside them.
If you made a LUKS container, then divided it up with LVM, your physical volumes will be invisible until the LUKS container is unlocked.

If you have LVM inside LUKS, I've been asking you to do things in the wrong order.
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Sat Jun 10, 2017 11:01 am    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

From your install media
Code:
/sbin/pvscan
does not list any Physical Volumes?
Please confirm that.

Its not clear in which order you set up LVM and LUKS
.
You can make logical volumes with LUKS inside, or you can make a LUKS container, then divide it up with LVM.
The order is important. I have been assuming (never assume) that you made the logical volumes first, then put LUKS inside them.
If you made a LUKS container, then divided it up with LVM, your physical volumes will be invisible until the LUKS container is unlocked.

If you have LVM inside LUKS, I've been asking you to do things in the wrong order.

Yes, /sbin/pvscan does not list any Physical Volumes. I have LVM inside LUKS.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Jun 10, 2017 11:57 am    Post subject: Reply with quote

skysearcher,

My original assumption was wrong. Sorry about that.
Your initrd must unlock the LUKS container before it can see any physical volumes.
That's why the commands I asked you to execute in the initrd shell all failed.

In the initrd shell, unlock the LUKS container. It appears that this isn't happening when you try to boot.

Are you using a key file on another device or is the initrd prompting you for a pass phrase?
_________________
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
skysearcher
n00b
n00b


Joined: 27 May 2017
Posts: 19

PostPosted: Sat Jun 10, 2017 1:35 pm    Post subject: Reply with quote

NeddySeagoon wrote:
skysearcher,

My original assumption was wrong. Sorry about that.
Your initrd must unlock the LUKS container before it can see any physical volumes.
That's why the commands I asked you to execute in the initrd shell all failed.

In the initrd shell, unlock the LUKS container. It appears that this isn't happening when you try to boot.

Are you using a key file on another device or is the initrd prompting you for a pass phrase?


My initrd should asking me for a pass phrase at boot. But I only get this error message:
Code:
>> Scanning for and activating Volume Groups
    Reading all physical volumes. This make take a while...
    No volume groups found
    No volume groups found
    No volume groups found
Device UUID=sWIfA8-LTKF-H10W.....     doesn´t exist or access denied.
!! The LUKS device UUID=sWIfA8-LTKF-H10W..... does not contain a LUKS header
!! Could not find the root in UUID=sWIfA8-LTKF-H10W..... .
!! Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip...
root(UUID=sWIfA8-LTKF-H10W.....) ::
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
Goto page 1, 2  Next
Page 1 of 2

 
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