Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
EFI Stub into LUKS+LVM
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
lquenti
n00b
n00b


Joined: 10 Dec 2017
Posts: 7

PostPosted: Sun Nov 11, 2018 5:27 pm    Post subject: EFI Stub into LUKS+LVM Reply with quote

What I'm trying to do
Setting up an gentoo on a LUKS-encrypted LVM with directly booting from uefi.
What the error message looks like
Code:
!! Block device /dev/mapper/vg0-root is not a valid root device
!! Could not find the root block device in .

Further explaination
I guess I don't know the proper kernel command line arguments, which I need based on this. Since I have no grub, I have to compile the args into the kernel. My current arguments:
Code:
CONFIG_CMDLINE="crpytdevice=/dev/sda3:vg0 root=/dev/mapper/vg0-root dolvm"

my full .config
Thanks a lot in advance

----------------

Besides replacing any Grubconfiguration with my everything here, I did anything like described here.

My chrooted blkid:
Code:
/dev/sda1: UUID="ED5E-B160" TYPE="vfat" PARTLABEL="grub" PARTUUID="530c3239-548a-4880-88df-9b1f6144af47"
/dev/sda2: UUID="1790b07a-98eb-4cc1-a97c-9eacfd3ba157" TYPE="swap" PARTLABEL="swap" PARTUUID="dcea578b-3b7a-4ddc-909e-f81ad804b33c"
/dev/sda3: UUID="c600e8be-439b-4389-b87d-d51ef0065c2f" TYPE="crypto_LUKS" PARTLABEL="lvm" PARTUUID="9038bd08-c379-4735-9665-b9271d8a1611"
/dev/sdb: LABEL="STICK" UUID="CC7A-DE2C" TYPE="vfat"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/mapper/lvm: UUID="85yN3o-i7af-rqrP-Fsuc-8nsm-7d8n-LOHbV3" TYPE="LVM2_member"
/dev/mapper/vg0-root: UUID="577dc1ce-5482-480c-9667-11b8ce3649a9" TYPE="ext4"
/dev/mapper/vg0-home: UUID="8d80c9fd-9cfb-475c-8731-d7dcd41447cd" TYPE="ext4"


/etc/fstab
Code:

/dev/sda1 /boot vfat noauto,noatime 1 2
/dev/mapper/vg0-root    /           ext4    defaults,noatime,errors=remount-ro,discard   0 1
/dev/mapper/vg0-swap    none        swap    defaults,noatime,discard    0 0
/dev/mapper/vg0-home    /home       ext4    defaults,noatime,discard    0 2


lsblk (home currently not mounted)
Code:
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0            7:0    0   1.8G  1 loop  (all loops are ubuntu live usb stuff)
loop1            7:1    0  86.9M  1 loop 
loop2            7:2    0  34.7M  1 loop 
loop3            7:3    0 140.9M  1 loop 
loop4            7:4    0   2.3M  1 loop 
loop5            7:5    0    13M  1 loop 
loop6            7:6    0  14.5M  1 loop 
loop7            7:7    0   3.7M  1 loop 
sda              8:0    0 238.5G  0 disk 
├─sda1           8:1    0     1G  0 part  /boot
├─sda2           8:2    0     8G  0 part  [SWAP]
└─sda3           8:3    0 229.5G  0 part 
  └─lvm        253:0    0 229.5G  0 crypt
    ├─vg0-root 253:1    0    75G  0 lvm   /
    └─vg0-home 253:2    0 154.5G  0 lvm   
sdb              8:16   1   7.6G  0 disk  (USB-Stick)


parted /dev/sda print
Code:
Model: ATA SanDisk SD8TB8U2 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  1075MB  1074MB  fat32           grub  boot, esp
 2      1075MB  9666MB  8591MB  linux-swap(v1)  swap
 3      9666MB  256GB   246GB                   lvm   lvm


lvdisplay (I cant figure out where the error comes from so I guess its because of chrooting)
Code:
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  --- Logical volume ---
  LV Path                /dev/vg0/root
  LV Name                root
  VG Name                vg0
  LV UUID                hBxfsg-Hbzv-yocq-CniA-Ksmo-GFEv-Y1mERt
  LV Write Access        read/write
  LV Creation host, time ubuntu, 2018-11-09 18:11:35 +0100
  LV Status              available
  # open                 1
  LV Size                75.00 GiB
  Current LE             19200
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/vg0/home
  LV Name                home
  VG Name                vg0
  LV UUID                ABRVzm-82oq-irjd-ohd5-TpRB-T6s1-rgif4V
  LV Write Access        read/write
  LV Creation host, time ubuntu, 2018-11-09 18:11:43 +0100
  LV Status              available
  # open                 0
  LV Size                154.47 GiB
  Current LE             39544
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2


PS: explicitly checked that ext4 support is compiled in the kernel, not just as a module

----------------

I guess I'm one step closer. After reading a bit more and changing the kernel parameters to
Code:
CONFIG_CMDLINE="root=/dev/ram0 crypt_root=PARTUUID=9038bd08-c379-4735-9665-b9271d8a1611 dolvm real_root=/dev/mapper/vg0-root rootfstype=ext4 real_init=/sbin/init real_resume=/dev/mapper/vg0-swap"

I get a new error message
Code:
!! The LUKS device PARTUUID=9038bd08-c379-4735-9665-b9271d8a1611 does not contain a LUKS header
!! Could not find the root in PARTUUID=9038bd08-c379-4735-9665-b9271d8a1611.

which I dont get, because I can mount from a live ubuntu via
Code:
cryptsetup luksOpen /dev/sda3 lvm

with sda3 having the same PARTUUID.
Im currently completely clueless what to do anymore.

[Moderator edit: Moved poster's self-response into main post, then deleted that self-response to return the thread to the unanswered list.

OP: Generally, if post length permits, you should edit extra information into your first post instead of replying to it. Some users run a canned search for threads with zero replies as a way of finding posts to answer. When you replied to yourself, you removed your thread from that list, even though you were not replying to announce that the thread was solved. Thus, they would no longer see your thread on the list of unanswered threads.
-Hu]
Back to top
View user's profile Send private message
matt_w
Apprentice
Apprentice


Joined: 17 Nov 2003
Posts: 233
Location: 40N 105W (~)

PostPosted: Mon Nov 12, 2018 8:34 pm    Post subject: Reply with quote

There should be a shell prompt with it drops the error message
Code:
!! The LUKS device PARTUUID=9038bd08-c379-4735-9665-b9271d8a1611 does not contain a LUKS header
!! Could not find the root in PARTUUID=9038bd08-c379-4735-9665-b9271d8a1611.


What happens if you run
Code:
blkid -o list
from that shell?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 12, 2018 8:53 pm    Post subject: Reply with quote

lquenti,

Code:
!! Could not find the root block device in .
Tells that your kernel cannot see any block devices at all.
At least
Code:
/dev/sda
/dev/sda1
/dev/sda2
/dev/sda3
should be listed there.

Your kernel/initrd is missing something is the SCSI stack or your initrd is not being loaded.

-- edit --

Your initrd is not built into the kernel
Code:
CONFIG_INITRAMFS_SOURCE=""
nor are you passing it on the kernel command line.
Its needed to start your logical volumes if not for the LUKS stuff too.
_________________
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
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