You are not logged in.
When using LVM for the first time my custom installer failed at the grub-install step. Before using LVM the process ran without any issues. The error message is "grub-install: /boot doesn't look like an EFI partition."
I have 2 nvme drives and I am trying to setup an LVM mirror for the root filesystem. My partitioning is done as follows:
# disk1
nvme format -f "$disk1" --ses=1
parted --script --align=optimal "$disk1" \
mklabel gpt \
mkpart "ESP" fat32 0% 1GiB \
set 1 boot on \
mkpart "ROOT1" xfs 1GiB 100%
partprobe -s "$disk1"
# disk2
nvme format -f "$disk2" --ses=1
parted --script --align=optimal "$disk2" \
mklabel gpt \
mkpart "LOG" xfs 0% 1GiB \
mkpart "ROOT2" xfs 1GiB 100%
partprobe -s "$disk2"
# partition naming
esp="$disk1"p1
root1="$disk1"p2
log="$disk2"p1
root2="$disk2"p2
My ESP partition which has worked until now is is created as follows:
# esp
mkfs.vfat -F32 -n ESP "$esp"
mount -t vfat -m -o discard "$esp" /mnt/boot
Grub is installed via script which runs in chroot during installation. The method I use is standard:
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
LVM is the new addition here and the following runs without any error messages:
# root
pvcreate "$root1" "$root2"
vgcreate vg0 "$root1" "$root2"
lvcreate -n lv0 --type raid1 -m 1 -l 100%FREE vg0
mkfs.xfs -L ROOT /dev/mapper/vg0-lv0 -l logdev="$log"
mount -t xfs -o logdev="$log" /dev/mapper/vg0-lv0 /mnt
I have tried creating the esp partition with and without the fat32 option.
I have tried removing the 'set 1 boot on' option.
I have tried manually creating the /boot directory.
I have tried using /boot/efi instead of just /boot.
I am completely new to LVM so the obvious question is what did I do wrong?
Thanks!
Last edited by lenhuppe (2025-02-24 01:49:19)
"I'm suspicious of people who don't like dogs, but I trust a dog when it doesn't like a person." -- Bill Murray
Offline
did you mount the root first then the efi partition ? otherwise the root will be mounted over the top of the already mounted /mnt/boot
Offline
Swapping the mount sequence got me through the grub-install ok.
At boot I am getting:
ERROR: device '/dev/mapper/vg0-lv0' not found.
Last edited by lenhuppe (2025-02-27 14:18:12)
"I'm suspicious of people who don't like dogs, but I trust a dog when it doesn't like a person." -- Bill Murray
Offline
Solution:
I found that adding an external log to xfs caused the boot process to fail.
Last edited by lenhuppe (2025-02-27 14:19:00)
"I'm suspicious of people who don't like dogs, but I trust a dog when it doesn't like a person." -- Bill Murray
Offline