You are not logged in.
I am running a vm for tests as a base to reinstall my Arch with encryption and btrfs. (I am also signing for secureboot with sbctl).
When mkinitcpio updates the initramfs it finishs with an error message saying tha the command could not finish correctly.
I am guessing this final message is because he warns that there is no fsck and thus it wont be run on boot and he then says the error to make us pay notice to it, but it is expected behavior. (because I think fsck is not compatible with btrfs)
Or am I doing something wrong that is causing this issue? I couldnt find any answers on this matter on the web or wiki and I want to know if my speculation is correct, even though others warnings for missing drivers are expected, but the command finishs sucessfully without errors.
From watching other people installing over encrypted btrfs I noticed the error message is in their installs as well. I tried it on both 08/2023 and 09/2023 ISOs.
On my current system with ext4 there are no such messages when updating initramfs.
Also as a side note, I tryed to use sd-encrypt before filesystem and when updating the mkinitcpio there was even more errors about missing libs, so I went with just encrypt. Here I do miss to read more and learn, so it is just a bonus question if you know if there is a package that I should install to make it work properly, I will research it still and I am sorry about asking, it is just because it is related for what I am studying right now.
The commands I used if it helps:
fdisk /dev/vda
mkfs.vfat /dev/vda1
cryptsetup --cipher aes-xts-plain64 --hash sha512 --use-random --type luks2 --verify-passphrase --perf-no_read_workqueue --perf-no_write_workqueue luksFormat /dev/root
cryptsetup --allow-discards --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen /dev/root main
(this one is just so I make sure those flags/options are enabled)
mkfs.btrfs --checksum xxhash /dev/mapper/main
mount /dev/mapper/main /mnt -o noatime,space_cache=v2,compress=zstd:3,ssd,discard=async
btrfs su cr {@,@home,@etc,@games,@swap,@cache,@log,@.snapshot}
(this doesnt work, but so you get the idea the subvols I created)
cd /mnt
mkdir /mnt/{boot,home,etc,games,swap,var,var/cache,var/log,.snapshot}
mount /dev/mapper/main /mnt -o noatime,space_cache=v2,compress=zstd:3,ssd,discard=async,subvol=@{boot,home,etc,games,swap,var,var/cache,var/log,.snapshot}
(as before, just so you know how I mounted each subvol)
btrfs filesystem mkswapfile --size 4g --uuid clear /swap/swapfile
swapon /swap/swapfile
pacstrap /mnt base base-devel linux linux-firmware linux-headers amd-ucode nano sudo fish sbctl efibootmgr
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
sbctl status
sbctl create-keys
sbctl enroll-keys -m
sbctl sign -s -o /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed /usr/lib/systemd/boot/efi/systemd-bootx64.efi
sbctl sign -s /boot/vmlinuz-linux
bootctl install
edit the mkinitcpio.conf to add btrs on modules and encrypt before filesystems
mkinitcpio -PI removed the time and localization commands to concentrate on what I felt was worth pointing out for this question
Last edited by Soultrigger (2023-09-06 22:20:13)
Offline
btrfs-progs seems to be missing from your pacstrap command. That provides (among other things) btrfs.fsck (which doesn't really do anything, but makes btrfs "fit in" like a normal fs and should eliminate the warning). If you remove e2fsprogs from your ext4 install, you probably get similar errors.
The sd-encrypt hook is for use with a systemd-based initramfs.
Offline
Thanks for the reply.
I did copy those from a install notes I am making, so I do not know if I did put btrfs-progs at the pacstrap or not, the pacstrap line there was from the ext4 install and I added sbctl and efibootmgr that I knew I added.
Once I get home I will try to install the btrfs-progs and update the mkinitcpio again and let you all know if I was that newbe at it. haha
Thanks, I will look at the systemd-based initramfs, it seems to be a bigger topic than I thought and it will help me in what to research.
Offline
btrfs-progs seems to be missing from your pacstrap command. That provides (among other things) btrfs.fsck (which doesn't really do anything, but makes btrfs "fit in" like a normal fs and should eliminate the warning). If you remove e2fsprogs from your ext4 install, you probably get similar errors.
The sd-encrypt hook is for use with a systemd-based initramfs.
You are spot on, I tried it a few times and this last one that I finally succeded I forgot to add btrfs-progs and that was the reason for the error messages even though the system worked without issues and booted properly. (I see now that I used btrfs-progs from the iso to setup the btrfs and forgot to add it on my system).
Thanks for the help, now without errors I can research further. (the post about amd-ucode pointed me to learn more microcode (which I used, but there is so much to learn still), but also about encryption and an awesome post from cloudflare about encryption tuning and performance - the nerd in me is happy).
I will also research a systemd based boot (I use systemd boot, but that might not be just that) since sd-encrypt seems to have more options/power than just encrypt.
Marking this as solved. (added a btrfs error on the title so it might be useful for someone in the future and to find it easier)
Last edited by Soultrigger (2023-09-06 22:20:55)
Offline