You are not logged in.

#1 2023-07-22 10:19:18

paladiumNitro
Member
Registered: 2023-07-21
Posts: 1

pvcreate command error writing device mda header (LVM LUKS+UEFI)

Hi,
I have a problem with the usage of the command pvcreate when I try to install ArchLinux on my desktop.

A little bit of context:
I try to install Archlinux version 2023.07.01-x86_64
On the following desktop:
- Gigabyte B450 I AORUS PRO WIFI
- a USB RTL9210 NVME of 2TB (Samsung 970 EVO Plus MZ-V7S2T0BW)
- a USB stick Corsair configured with Ventoy and with the ISO archlinux-2023.07.01-x86_64.iso
- AMD Ryzen 7 3700X 8-Core Processor
- AMD Radeon RX Vega 64

I configured my motherboard with UEFI on the gigabyte: BIOS -> Storage Boot Option Control -> UEFI and Other PCI Devices -> UEFI
I boot the live iso archlinux from my ventoy usb stick.
In ventoy, I booted in normal mode and in grub2 mode. The solutions that I tried where applied with the two modes.

I booted with ventoy into the arch live iso:
I created the three following partitions with fdisk:
500M with EFI System type
500M with Linux filesystem type
1.8T with Linux LVM type

I want an UEFI + LVM encryption type of installation. I follow the arch installation wiki: https://wiki.archlinux.org/title/Partit … le_layouts.

Here is my problem:
After the partitioning, I created a luks partition with the following commands:

cryptsetup luksFormat /dev/sdc3
cryptsetup open --type luks /dev/sdc3 lvmcrypt

After that, I want to create LVM volumes:

pvcreate --dataalignment 1m /dev/mapper/lvmcrypt

And I have this error:

Error writing device /dev/mapper/lvmcrypt at 4096 length 512.
Failed to write mda header to /dev/mapper/lvmcrypt.
Failed to write physical volume "/dev/mapper/lvmcrypt".

I tried to reboot and change from normal mode in ventoy to grub2 mode, and weirdly the previously pvcreate command worked.
After that I tried to understand why it worked and destroyed everything and redo the process.
And strangely enough, it didn't work the second time...and I don't know why.

I tried to retreive errors with this command:

dmesg | grep lvmcrypt

Nothing
I verified that the encrypted device is opened:

lsblk /dev/mapper/lvmcrypt

It returned correct infos
I tried to wipe the filesystem:

wipefs -a /dev/mapper/lvmcrypt

The command was executed correctly but pvcreate gave the same error.


I'm stuck at this step and didn't found something usefull on search engines.
Don't hesitate to ask me for more informations, I tried to give as much information as possible but I'm certainly missing something.

Thanks.

[UPDATE]: I'm maybe near something when I read this wiki https://wiki.archlinux.org/title/Advanc … t#dm-crypt. Maybe it is the fact that my installation is done on a USB-attached drive but there is something that bothers me: how is it possible that I ended up with a correct return of the pvcreate command at a second attempt with the same initial state? I don't understand....
[UPDATE]: I tried to use the pvcreate command when booting the USB NVME on my ThinkPad X200 and it works....and I don't understand why....

Last edited by paladiumNitro (2023-09-04 08:54:18)

Offline

Board footer

Powered by FluxBB