You are not logged in.

#1 2021-01-07 23:54:34

patrioticparadox
Member
Registered: 2020-11-29
Posts: 3

grub-install fails with "error: cannot seek [...] Invalid argument."

Attempting to install arch to a LVM on LUKS on RAID0 configuration.
When I reach the point to install GRUB I use

 grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=ArchCrypt

which results in the error

error: cannot seek `/dev/mapper/cryptdisk': Invalid argument.

I've installed arch several time using various combinations of LUKS, RAID, and LVM. Now I'm trying to bring them all together. So I've been studying the Wiki for several days piecing together from the LVM, RAID, LUKS, GRUB and main install guide the below commands to install arch in this configuration.
My guess is that I'm doing something wrong with the way I'm handling the logical volumes but... I'm at a loss.
I haven't been able to find information about this error with GRUB. Likely because I'm asking the wrong question.

**ZERO THE DISKS - note: they have already been cleaned
dd if=/dev/zero of=/dev/nvme0n1 bs=4M status=progress
		of=/dev/nvme1n1
		of=/dev/nvme2n1

**CREATE PARTITION TABLE & PARTITIONS
cfdisk /dev/nvme0n1
	GPT
	1G ef00
	remainingspace fd00

**CLONE TO OTHER NVMEs
sfdisk -d /dev/nmve0n1 > part-table
sfdisk /dev/nvme1n1 < part-table
sfdisk /dev/nvme2n1 < part-table

**CREATE RAID ARRAYS
mdadm --create --verbose --level=1 --metadata=1.0 --raid-devices=3 /dev/md/bootRAID1 /dev/nvme0n1p1 /dev/nvme1n1p1 /dev/nvme2n1p1
mdadm --create --verbose --level=0 ==metadata=1.2 --chunk=64 --raid-devices=3 /dev/md/mainRAID0 /dev/nvme0n1p2 /dev/nvme1n1p2 /dev/nvme2n1p2

**CHECK RAID ARRAY STATUS
watch -n 1 cat /proc/mdstat
mdadm --misc --detail /dev/md/bootRAID1
		      /dev/md/mainRAID0

**CREATE & OPEN dm-crypt DEVICE
cryptsetup -y -v luksFormat --type luks1 /dev/md/mainRAID0
cryptsetup open /dev/md/mainRAID0 cryptdisk

**CREATE PHYSICAL VOLUME
pvcreate /dev/mapper/cryptdisk
pvdisplay

**CREATE VOLUME GROUP
vgcreate vgroup /dev/mapper/cryptdisk
vgdisplay

**CREATE LOGICAL VOLUMES
lvcreate -L 32G -n lvswap vgroup
lvcreate -l +100%FREE -n lvroot vgroup
lvdisplay

**MAKE FSs
mkswap /dev/mapper/vgroup-lvswap
mkfs.ext4 /dev/mapper/vgroup-lvroot
mkfs.fat -F32 /dev/md/bootRAID1

**MOUNT FSs
swapon /dev/mapper/vgroup-lvswap
mount /dev/mapper/vgroup-lvroot /mnt
mkdir /mnt/efi
mount /dev/md/bootRAID1 /mnt/efi

**PACSTRAP
pacstrap /mnt base base-devel linux linux-firmware nano mdadm lvm2 networkmanager intel-ucode grub efibootmgr

**SET mdadm.conf
mdadm --detail --scan >> /mnt/etc/mdadm.conf
cat /mnt/etc/mdadm.conf | less

**CREATE fstab
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab

**TIME & LOCALE
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc
nano /etc/locale.gen
	en_US.UTF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 >> /etc/locale.conf
echo thisComputer >> /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 thisComputer.localdomain thisComputer" >> /etc/hosts

**INITRAMFS
nano /etc/mkinitcpio.conf
	HOOKS base udev autodetect *keyboard *keymap *consolefont modconf block *mdadm_udev *encrypt *lvm2 filesystems keyboard fsck
	MODULES dm-raid raid0

mkinitcpio -p linux

**GRUB
nano /etc/default/grub
	GRUB_CMDLINE_LINUX_DEFAULT="cryptsetup=/dev/mapper/cryptdisk:vgroup-lvroot"
	GRUB_ENABLE_CRYPTODISK=y

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=ArchCrypt

I've tried several parameters for GRUB_CMDLINE_LINUX_DEFAULT, including leaving it blank, with no change to the error.

Last edited by patrioticparadox (2021-01-09 16:32:39)

Offline

#2 2021-01-09 00:48:28

nd925a
Member
Registered: 2017-01-30
Posts: 27

Re: grub-install fails with "error: cannot seek [...] Invalid argument."

patrioticparadox wrote:
**MOUNT FSs
swapon /dev/mapper/vgroup-lvswap
mount /dev/mapper/vgroup-lvroot /mnt
mkdir /mnt/efi
mount /dev/md/bootRAID1

I'm not overly familiar with LVM or RAID, but it looks like you didn't actually mount the boot drive to /mnt/efi.

Online

#3 2021-01-09 16:24:26

patrioticparadox
Member
Registered: 2020-11-29
Posts: 3

Re: grub-install fails with "error: cannot seek [...] Invalid argument."

Interesting. I'm fairly certain I just forgot to write that down in my log but I've done dumber stuff in my life. Good catch!

edit: Yeah because I was able to format it later on so I definitely just forgot to add it to the log. Good eye though!

Last edited by patrioticparadox (2021-01-09 16:31:40)

Offline

Board footer

Powered by FluxBB