Errors during boot process!

I am currently trying out other ways to reach my goal however something seems wrong about your script:

> cd /mnt/boot/                                                                                 
> ls                                                                                      
amd-ucode.img			    initramfs-5.4-x86_64.img  memtest86+
initramfs-5.10-x86_64-fallback.img  intel-ucode.img	      vmlinuz-5.10-x86_64
initramfs-5.10-x86_64.img	    linux510-x86_64.kver      vmlinuz-5.4-x86_64
initramfs-5.4-x86_64-fallback.img   linux54-x86_64.kver
> manjaro-chroot /mnt sdboot-manage setup                                                 
systemd-boot already installed
> manjaro-chroot /mnt sdboot-manage gen                                               
Error: /boot/loader/loader.conf does not exist

This seems weird since /boot is empty except what cpio puts there. There is at least no loader directory that would need to be there for systemd-boot. However systemd-boot-manager tells me systemd-boot is already installed.

@dalto Thanks for all your help, I managed to get it working! :smile: :+1:

After refining the process a bit more I am going to publish a guide here on the forum.
For everyone needing a bit of guidance until then how to get it working here is the process I went through:

# create a short handle to reference the ssd by id
DISK=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00003

# format the disk into:
# 512M EFI, 2GB efi partition, zfs root pool filling everything but the last 8GB, 8GB swap partition at the end of the disk
sudo sgdisk --zap-all $DISK
sudo sgdisk -n1:0:+2G -t1:EF00 $DISK 
sudo sgdisk -n2:0:-8G $DISK     
sudo sgdisk -n3:0:0 $DISK

# create random UUID to append to the zfs pool names so that importing the pools on other computers e.g. for rescue or backing them up won't result into name conflicts
poolUUID=$(dd if=/dev/urandom of=/dev/stdout bs=1 count=100 2>/dev/null |tr -dc 'a-z0-9' | cut -c-6)

# create root-pool following settings list from:
# https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_ZFS#Setup_the_ZFS_filesystem
# For root pool all available features are enabled by default
sudo zpool create \
	-f -o ashift=12 -o autotrim=on \
	-O acltype=posixacl       \
    -O relatime=on            \
    -O xattr=sa               \
    -O dnodesize=legacy       \
    -O normalization=formD    \
    -O mountpoint=none        \
    -O canmount=off           \
    -O devices=off            \
    -R /mnt                   \
    -O compression=lz4        \
    -O encryption=aes-256-gcm \
    -O keyformat=passphrase   \
    -O keylocation=prompt     \
    rpool_$poolUUID ${DISK}-part2

# creating datasets. Nothing is stored directly under rpool, hence: canmount=off!
# canmount is set to noauto as mentioned here: https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_ZFS#Create_your_datasets
sudo zfs create -o canmount=off -o mountpoint=none rpool_$poolUUID/HOME
sudo zfs create -o canmount=off -o mountpoint=none rpool_$poolUUID/ROOT
sudo zfs create -o mountpoint=/ -o canmount=noauto rpool_$poolUUID/ROOT/default
sudo zfs mount rpool_$poolUUID/ROOT/default   
sudo zfs create -o mountpoint=/home rpool_$poolUUID/HOME/default
sudo zfs create -o mountpoint=/root rpool_$poolUUID/HOME/default/root
sudo zfs mount -a

# formatting and mounting the EFI partition
sudo mkfs.vfat -n EFI $DISK-part1
sudo mkdir /mnt/boot
sudo mount $DISK-part1 /mnt/boot

# configuring the root filesystem as advised here:
# https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_ZFS#Configure_the_root_filesystem
sudo zpool set bootfs=rpool_$poolUUID/ROOT/default rpool_$poolUUID
sudo zpool set cachefile=/etc/zfs/zpool.cache rpool_$poolUUID

# Setup
Prepare Installation -> Set Virtual Console -> change -> "de" 
Install Desktop System -> Install Manjaro Desktop -> yay + base-devel; linux510; linux54 -> gnome -> Yes -> cryptsetup; linux54-zfs; linux510-zfs -> minimal -> Auto-install free drivers
Install Desktop System -> Configure Base -> Generate FSTAB -> fstabgen -U -p
Install Desktop System -> Configure Base -> Set Hostname
Install Desktop System -> Configure Base -> Set System locale -> en_US.UTF-8 -> de_DE.UTF-8
Install Desktop System -> Configure Base -> Set Desktop Keybaord Layout -> "de"
Install Desktop System -> Configure Base -> Set Timezone and Clock -> Europe -> Berlin -> Yes -> utc
Install Desktop System -> Configure Base -> Set Root Password 
Install Desktop System -> Configure Base -> Add New User(s) -> "user" -> bash
Done -> Yes -> No

# leaving the setup unmounts the zfs datasets and the efi partition so we need to remount them
sudo zfs mount rpool_$poolUUID/ROOT/default   
sudo zfs mount -a
sudo mount $DISK-part1 /mnt/boot

# copy over the zpool.cache file to the new system
sudo cp /etc/zfs/zpool.cache /mnt/etc/zfs/zpool.cache

# add encrypted swap partition to the system
# "swap $DISK-part3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256"
# to /mnt/etc/crypttab 
# "/dev/mapper/swap none swap defaults 0 0"
# to /mnt/etc/fstab

# following the configure systemd ZFS mounts section at:
# https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_ZFS#Configure_systemd_ZFS_mounts
sudo systemctl enable zfs.target --root=/mnt
sudo systemctl enable zfs-import-cache --root=/mnt
sudo systemctl enable zfs-mount --root=/mnt
sudo systemctl enable zfs-import.target --root=/mnt
manjaro-chroot /mnt zgenhostid 19841984 
manjaro-chroot /mnt mkinitcpio -P

# install the bootmanager
manjaro-chroot /mnt bootctl install
manjaro-chroot /mnt sudo pacman -S systemd-boot-manager
manjaro-chroot /mnt sdboot-manage gen

sudo umount /mnt/boot
sudo zfs umount -a
sudo zfs umount rpool_$poolUUID/ROOT/default
sudo zpool export rpool_$poolUUID

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.