Grub and rename of btrfs root subvol

I fired up a test install and I was able to get it working.

> lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                                             8:0    1 115.5G  0 disk  
├─sda1                                          8:1    1 115.5G  0 part  
└─sda2                                          8:2    1    32M  0 part  
nvme0n1                                       259:0    0 476.9G  0 disk  
├─nvme0n1p1                                   259:1    0     1G  0 part  /boot/efi
└─nvme0n1p2                                   259:2    0 475.9G  0 part  
  └─luks-1e1afdba-38af-4ca1-8153-467c53df5497 254:0    0 475.9G  0 crypt /var/log
                                                                         /var/cache
                                                                         /home
                                                                         /
> sudo mount -o subvolid=0 /dev/mapper/luks-1e1afdba-38af-4ca1-8153-467c53df5497 /mnt 
> ls /mnt
@  @cache  @home  @log
> sudo mv /mnt/@ /mnt/@eos
> ls /mnt
@cache  @eos  @home  @log
> sudo nano /etc/fstab
> sudo systemctl daemon-reload
> sudo dracut-rebuild
:: Building initramfs for linux (6.9.1-arch1-1)
   [ verbose output redacted for brevity ]
:: Building fallback initramfs for linux (6.9.1-arch1-1)
   [ verbose output redacted for brevity ]
> sudo grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.
> sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
> reboot

When I reboot, after unlocking with the passphrase I get the normal journal output and then the Grub menu, and the system boots as expected.

To summarize:

  • Rename the subvolume;
  • Amend /etc/fstab;
  • systemctl daemon-reload;
  • Regenerate the initramfs;
  • Reinstall Grub;
  • Regenerate Grub config.

Note: reinstalling Grub is needed in this case (https://wiki.archlinux.org/title/GRUB#LUKS2). I also tested with doing all the other steps but without reinstalling Grub and I get the same error (error: file '/@/boot/grub/x86-64-efi/normal.mod' not found).

1 Like