You are not logged in.
Hi
I messed up something in my installation again just like last year. Generally the plan is to run the system on lvm on luks on raid 0 on raid 1 (from top: RAID 1 -> RAID 0 -> luks -> lvm). I have 3 drives here. The sda and sdb will be used for ‘/’ and the nvme drive will only be used for '/boot'
This time I was a little less foolish and wrote down all the commands I used. Here's what I did:
# Create partitions on sda and sdb drives amounting to 2000204464 sectors to make the size identical (gpt table, Linux RAID type)
cfdisk /dev/sda
cfdisk /dev/sdb
# Create a partition on nvme of 4GB (gpt table, EFI type)
cfdisk /dev/nvme0n1p1
# Create a raid 10 near mode, without bitmap (I plan to add the missing drives later).
mdadm --create --verbose --level=1 --raid-devices=2 /dev/md/raid1_0 /dev/sda1 missing
mdadm --create --verbose --level=1 --raid-devices=2 /dev/md/raid1_1 /dev/sdb1 missing
mdadm --create --verbose --level=0 --raid-devices=2 /dev/md/raid0 /dev/md/raid1_0 /dev/md/raid1_1
# Create a lvm
cryptsetup open /dev/md/raid0 raid10
vgcreate lgrp0 /dev/mapper/raid10
lvcreate -l 100%FREE lgrp0
# Format the partitions
mkfs.ext4 /dev/mapper/lgrp0-lvol0
mkfs.fat -F 32 /dev/nvme0n1p1
# Mount drivers
mount /dev/mapper/lgrp0-lvol0 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
# Install packages
pacstrap -K /mnt base base-devel linux linux-firmware intel-ucode dmraid mdadm cryptsetup lvm2 vim
###
genfstab -U /mnt >> /mnt/etc/fstab
mdadm --detail --scan >> /mnt/etc/mdadm.conf
arch-chroot /mnt
# Edit initramfs for busybox
# MODULES=(vmd dm_mod dm_crypt ext4 sha512 md_mod raid0 raid1)
# HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block net dmraid mdadm_udev encrypt lvm2 filesystems fsck)
vim /etc/mkinitcpio.conf
###
mkinitcpio -P
passwd
# Bootloader install
bootctl install
# Edit bootloader config
# title Arch Linux
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options rd.luks.name=/dev/md/raid0=raid10 root=/dev/mapper/lgrp0-lvol0
vim /boot/loader/loader.conf
###
exit
umount -R /mnt
cryptsetup close raid10
rebootBootloader loads but doesn't detect any system and after a few seconds it moves me into uefi. I thought it was the fault of mdadm.conf and changed:
/dev/mapper/raid1_0 to /dev/md127
/dev/mapper/raid1_1 to /dev/md126
/dev/mapper/raid0 to /dev/md125
and I regenerated initramfs but that didn't help.
If there is anyone less stupid than me, thanks for your help.
Last edited by btjxzkfuly (2025-08-29 13:37:53)
Offline
Okay. I guess i fix this one. After I run
bootctlI notice that there are a lot of unknow lines. There was a mistake:
# Edit bootloader config
# title Arch Linux
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options rd.luks.name=/dev/md/raid0=raid10 root=/dev/mapper/lgrp0-lvol0
vim /boot/loader/loader.confIt should be saved like /boot/loader/entries/arch.conf
Now bootloader gives me a message:
Waiting 10 seconds for device /dev/md/lgrp0-lvol0 ...Offline
Okay. I needed to edit /boot/loader/entries/arch.conf Now it looks like:
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID={UUID}:raid10 root=/dev/mapper/lgrp0-lvol0I dont know how I made it work a days ago...
Offline