Danke für den Tipp.
Also ich habe jetzt alles nochmal durchgespielt. mit folgendem Setup:
Boot Arch Linux ISO
loadkeys de
gdisk /dev/sda
512M Bootpartition Typ ef00 (EFI)
232,4G ARCH Typ 8300
sgdisk --backup=table /dev/sda
sgdisk --load-backup=table /dev/sdb
mkfs.vfat -F 32 -n EFI /dev/sda1
mkfs.vfat -F 32 -n EFI /dev/sdb1
cryptsetup --type luks1 luksFormat /dev/sda2
cryptsetup --type luks1 luksFormat /dev/sdb2
cryptsetup luksOpen /dev/sda2 cryptsda2
cryptsetup luksOpen /dev/sda2 cryptsdb2
mkfs.btrfs -L ARCH -m raid1 -d raid1 /dev/mapper/cryptsda2 /dev/mapper/cryptsdb2
mount LABEL=ARCH /mnt
cd /mnt/
btrfs sub create @
btrfs sub create @home
btrfs sub create @pkg
btrfs sub create @snapshots
cd
umount /mnt
mkdir -p /mnt/home
mkdir -p /mnt/var/cache/pacman/pkg
mkdir -p /mnt/.snapshots
mkdir -p /mnt/btrfs
mount -o noatime,ssd,space_cache=v2,compress=lzo,subvolid=5 LABEL=ARCH /mnt/btrfs/arch
mount -o noatime,ssd,space_cache=v2,compress=lzo,subvol=@home LABEL=ARCH /mnt/home
mount -o noatime,ssd,space_cache=v2,compress=lzo,subvol=@pkg LABEL=ARCH /mnt/var/cache/pacman/pkg
mount -o noatime,ssd,space_cache=v2,compress=lzo,subvol=@snapshots /LABEL=ARCH /mnt/.snapshots
mount /dev/sda1 /mnt/boot/efi
pacstrap /mnt base linux linux-firmware base-devel btrfs-progs dosfstools bash-completion vi vim gvim
genfstab -Lp /mnt >> /mnt/etc/fstab
arch-chroot /mnt/
echo archmabox > /etc/hostname
echo LANG=de_DE.UTF-8 > /etc/locale.conf
echo LANGUAGE=de_DE >> /etc/locale.conf
echo KEYMAP=de-latin1 > /etc/vconsole.conf
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
vi /etc/locale.gen
de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
locale-gen
pacman -Sy
dd bs=512 count=4 if=/dev/random of=/crypto_keyfile_sda2.bin iflag=fullblock
dd bs=512 count=4 if=/dev/random of=/crypto_keyfile_sdb2.bin iflag=fullblock
chmod 600 /crypto_keyfile_sda2.bin
chmod 600 /crypto_keyfile_sdb2.bin
chmod 600 /boot/initramfs-linux.img
cryptsetup luksAddKey /dev/sda2 /crypto_keyfile_sda2.bin
cryptsetup luksAddKey /dev/sda2 /crypto_keyfile_sdb2.bin
vi /etc/mkinitcpio.conf
BINARIES=(/usr/bin/btrfs)
FILES=(/crypto_keyfile_sda2.bin /crypto_keyfile_sdb2.bin)
HOOKS=(base udev autodetect modconf block keyboard keymap encrypt btrfs filesystems)
mkinitcpio -p linux
pacman -S grub grub-btrfs efibootmgr
blkid
vi /etc/default/grub
GRUB_CMDLINE_LINUX="cryptdevice=UUID=8b408bb4-6fe4-4041-988a-855896f2e526:cryptsda2 cryptdevice=UUID=ae6aa5e7-75ae-433a-b329-7aa130108ebb:cryptsdb2"
GRUB_ENABLE_CRYPTODISK=y
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
passwd
exit
umount -R /mnt/
cryptsetup luksClose cryptsda2
cryptsetup luksClose cryptsdb2
reboot
Das führt dazu das ich beim Boot zunächst zweimal ein Passwort eingeben muss, einmal für hd0,gpt2 und dann für hd1,gpt2. Danach erscheint das GRUB Menü.
Das sieht ja schonmal danach aus das die Konfiguration mit dem Keyfile in /etc/default/grub nicht passt. Normalerweiße müsste man ja dann an der Stelle kein Passwort eingeben.
Das größere Problem ist dann aber das nachdem GRUB dann booten möchte es nicht weitergeht.
Es wird wieder nach einem Passwort gefragt. Das wäre das ja dann für initramfs.
Es erscheint folgendes:
Starting version 245-3-arch
A Password is required to access the cryptsdb2 volume:
Enter passphrase for /dev/sdb2:
Eigentlich ja erstmal ok das nach der Passphrase gefragt wird aber dann erscheint der Fehler von meinem ersten Beitrag.
Scanning for Btrfs filesystems
mount: /new_root: wrong fs type, bad option, bad superblock on /dev/mapper/crytpsdb2, missing codepage or helper program, or other error.
You are now being dropped into an ermergency shell.
sh: can't access tty: job control turned off
[rootfs ]#_
Hier wäre mal die komplette mkinitcpio.conf:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=(/usr/bin/btrfs)
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=(/crypto_keyfile_sda2.bin /crypto_keyfile_sdb2.bin)
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect block filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block filesystems)
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS=(base udev block mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block keyboard keymap encrypt btrfs filesystems)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()