Recently, I modified my whole ext4 system to become a btrfs one, which was successful. Then, I modified the subvolumes to look like the following:
(btrfs partition block device): ├─@rootfs (subvolume for /) ├─@home (subvolume for /home) ├─@log (subvolume for /var/log) ├─@libvirt (subvolume for /var/lib/libvirt) ├─@opt (subvolume for /opt) I was able to mount everything properly when booting after using Rescuezilla's live environment for the configurations (for /etc/fstab and grub-install), and I added root=UUID=[btrfs partition UUID] rootflags=rw,subvol=@rootfs to the grub kernel parameters. Now, I have the themes files in the /@rootfs/boot/grub directory, but Grub does not seem to recognize the location and defaults to the default theme whenever I boot into Grub.
How can I make Grub recognize theme files in a btrfs subvolume of the root partition?
Edit: I have created a separate luks1-encrypted boot partition to try to solve this. Everything still works but detecting the theme. The error message (that is thankfully inert) is about a nonexistent file somewhere in /usr/share/grub. I installed grub2 with grub-install --uefi-secure-boot --boot-directory=/boot --efi-directory=/boot/efi --directory=/usr/lib/grub/x86_64-efi --themes=vimix --target=x86_64-efi /dev/nvme0n1p1
The grub error message when booting is:
error: file `/usr/share/desktop-base/ceratopsian-theme/grub/grub-16x9.png' not found. The file does exist though, at least in the @rootfs subvolume.
I read this which seems to have the same issue, but the solution to stick to the default theme is not helpful: https://forum.endeavouros.com/t/grub-error-no-server-is-specified/42389
Edit 2: Now, I have luks2-encrypted the root partition and boot partition (converting luks1 ⇾ luks2 keeping pbkdf2). A new error shows stating how the cryptodisk module cannot be found, and no server is specified. It is harmless, but it prevents the theme directory from even appearing if the root partition cannot be unlocked while using Grub. Post-boot unlocks fine. The link mentioned previously has these conditions.
Significant parts of /etc/default/grub
GRUB_CMDLINE_LINUX="cryptdevice=UUID=[uuid of encrypted partition]:debian_crypt crypto=sha512:aes-xts-plain64:512:0: root=UUID=[uuid of mapped btrfs root device from encrypted partition at /dev/mapper/debian_crypt] rd.luks.name=[uuid of mapped btrfs root device from encrypted partition at /dev/mapper/debian_crypt]=debian_crypt rd.luks.options=[uuid of mapped btrfs root device from encrypted partition at /dev/mapper/debian_crypt]=tpm2-device=auto,password-echo=no,tries=1 rootflags=rw,subvol=@rootfs intel_iommu=on iommu=pt efi=runtime i915.enable_guc=2" # If your computer has multiple operating systems installed, then you # probably want to run os-prober. However, if your computer is a host # for guest OSes installed via LVM or raw disk devices, running # os-prober can cause damage to those guest OSes as it mounts # filesystems to look for things. GRUB_DISABLE_OS_PROBER=false ... # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' GRUB_GFXMODE=1920x1200,auto ... GRUB_THEME="/usr/share/grub/themes/vimix/theme.txt" GRUB_BACKGROUND="/usr/share/desktop-base/ceratopsian-theme/grub/grub-16x9.png" # Enable cryptodisk in case it is needed GRUB_ENABLE_CRYPTODISK=y GRUB_PRELOAD_MODULES="part_gpt btrfs cryptodisk" update-grub output:
Generating grub configuration file ... Found theme: /usr/share/grub/themes/vimix/theme.txt Found background image: .background_cache.png Found linux image: /boot/vmlinuz-6.15-amd64 Found initrd image: /boot/initrd.img-6.15-amd64 Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi Found memtest86+ 32bit EFI image: /boot/memtest86+ia32.efi Found memtest86+ 64bit image: /boot/memtest86+x64.bin Found memtest86+ 32bit image: /boot/memtest86+ia32.bin Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Adding boot menu entry for UEFI Firmware Settings ... done
grub-install? Did you chroot into anywhere before the run?grub-installwas run inside a chroot environment on a LiveCD. It reported no errors./mnt, did you mount the @rootfs subvolume on/mntbefore that? (If youls /usr/share/desktop-base/ceratopsian-theme/grub/grub-16x9.pngafter chrooting, would it also report file not found?)arch-chroot /mntafter mounting withmount -o subvol=@rootfs [btrfs device] /mnt, and the file does exist.