Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] LUKS - LVM - rootfs mounted but others not
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
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Tue Jul 10, 2018 8:08 pm    Post subject: [SOLVED] LUKS - LVM - rootfs mounted but others not Reply with quote

On a fresh install on a secure-boot enabled Dell Latitude 5580 with an installation on LVM on a LUKS formatted partition I get the system to boot, ask for the password of the encrypted LVM device, correctly unlock the partition and mount the root file system.

The system (systemd) is starting up and stops with a message that systemd is waiting for some /dev/disk/by-uuid/.....device, waits for 1.5 minutes and drops me to the rescue shell.

The missing devices correspond the other 2 entries I have in /etc/fstab besides the rootfs, its /home and swap. Both are located on the same LUKS formatted partition, assigned to the volume group "volume":

Code:
# vgdisplay
  --- Volume group ---
  VG Name               volume
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  14
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               228.55 GiB
  PE Size               4.00 MiB
  Total PE              58509
  Alloc PE / Size       58509 / 228.55 GiB
  Free  PE / Size       0 / 0   
  VG UUID               MqeSho-Xhr6-Ydba-CyIF-P30J-q12n-9GQMIq


That contains the volumes /home, swap and the rootfs:

Code:
# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home volume -wi-ao---- 156.55g                                                   
  root volume -wi-ao----  56.00g                                                   
  swap volume -wi-ao----  16.00g


All of this is stored within the pv:
Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/dm-0
  VG Name               volume
  PV Size               228.55 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              58509
  Free PE               0
  Allocated PE          58509
  PV UUID               93K8gl-4vAQ-dvFE-EGcd-fSP6-4Rui-7F0pbT


Whereas /dev/dm-0 is on /dev/sda6:
Code:
# gdisk -l /dev/sda 
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1008A749-7D4E-4A57-A514-1BF240DB1649
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2493 sectors (1.2 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   0700  Basic data partition
   2          616448          821247   100.0 MiB   EF00  EFI system partition
   3          821248         1083391   128.0 MiB   0C01  Microsoft reserved ...
   4         1083392       496537135   236.3 GiB   0700  Basic data partition
   5       975851520       976773119   450.0 MiB   2700 
   6       496537600       975851519   228.6 GiB   8E00  Linux LVM


In the rescue shell I then enter the following comands:
Code:
/sbin/pvscan
/sbin/vgscan
/sbin/lvscan
mount /home
swapon -a


Then I exit the shell and let the system to continue starting. I then takes a while (some 10-20 seconds) but the login prompt comes up and systemd reports a running status.

If I don't issue the {pv/vg/lv}scan commands, I cannot successfully mount /home - mount reports success (exit code 0) but in the journal I can read that systemd unmounted the device again, it complains, the device is inactive (probably because the fstab-caused mount failed).

I created a service that issues those commands and installed it in the sysinit.target. No luck.

I always have to wait 1.5 minutes to come to the rescue shell, issue the scans, mount /home and activate swap - and now, after a couple of reboot cycles, even this does not work anymore. blkid reports all /dev/mapper entries, I can manually issue a mount for /dev/mapper/volume-home and that reports success but the journal shows "Unit is bound to inactive unit... Stopping too.".
[EDIT]
If I exit the rescue shell and wait, the login prompt comes up, I can login, issue a 'sudo mount' and home is mounted.
[/EDIT]

One oddity I can find is that lsblk -o '+uuid' does not show the uuid of any of the LVM volumes but maybe that's just to ignore.

I am hitting Magic SysRq key repeatedly...
Why on earth does systemd not find/use the existing, activated, up and running LVM volumes?

Thanks for any hints!!


Last edited by fidel on Thu Jul 12, 2018 6:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Thu Jul 12, 2018 6:13 pm    Post subject: Its the initramfs Reply with quote

I finally found another forum entry having the same problem, fixed by using genkernel-next instead of genkernel. Et voilà!

Maybe this is mentioned somewhere in the docs, I certainly missed or accidentally overlooked it then. Just in case someone stumbles over this:

Using LUKS - LVM - systemd creating an initramfs with genkernel does not work for me, I have to use genkernel-next. dracut is told to be capable of handling this but it failed for me. Using genkernel-next brought my system to life.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Thu Jul 12, 2018 9:52 pm    Post subject: Reply with quote

Out of curiosity - did you try this with genkernel 3.5.3.3 or a previous version?

I'm nearing the end of a LVM install on 2 laptops and upon reboot both have pancs, but completely different. I'm trying to troubleshoot them, and perhaps genkenel-next migt be the way for me to go as well....
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Fri Jul 13, 2018 6:33 am    Post subject: Reply with quote

I tried with genkernel-3.5.3.3, dracut-046-r1 but only genkernel-next-68 worked.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Fri Jul 13, 2018 1:15 pm    Post subject: Reply with quote

Ok, thanks for the info.

My own issues are different, although I get a similar prompt to enter the local shell when it cannot find the LVM - but I've already gotten one system fixed, and am working on the other.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
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