I had a fresh KDEneon install to a VM that failed to install GRUB initially for some unknown reason. So I booted back to the LiveUSB and mounted the virtual drive and sure enough - no grub files present in /boot/grub. So I tried to reinstall GRUB from the LiveUSB session and had a heck of a time until I realized the errors I was getting in step 4 - file not found, operation not permitted, etc. - were due to root being in a subvolume. I had mounted the whole file system instead.
I decided to write this up in case anyone else runs into this. This How-To was tested on KDEneon in a virtual machine.
For this How To:
Steps:
1. Boot to a LiveUSB
2. Mount the root file system
Note the use of the mount option “-o subvol=@”. This is the critical difference between a BTRFS installation vs. other file systems. The default for *buntu installations is to use "@" as the root subvolume.
3. Mount the folders for the chroot:
If you are using UEFI, you should mount the EFI boot partition as well:
4. “chroot” root and reinstall GRUB
5. Reinstall and update the GRUB bootloader:
6. Leave chroot and shutdown:
You may now remove the LiveUSB and power up again. Your install should now boot correctly.
I decided to write this up in case anyone else runs into this. This How-To was tested on KDEneon in a virtual machine.
For this How To:
- The boot drive is /dev/sda
- EFI (if applicable) is on “/dev/sda1”
- The BTRFS root file system is on “/dev/sda2”
- The root subvolume is “@”
Steps:
1. Boot to a LiveUSB
2. Mount the root file system
Code:
sudo mount -o subvol=@ /dev/sda2 /mnt
3. Mount the folders for the chroot:
Code:
for i in dev dev/pts sys proc run; do sudo mount --bind /$i /mnt/$i; done
Code:
sudo mount /dev/sda1 mnt/boot/efi
Code:
sudo chroot /mnt
Code:
sudo grub-install /dev/sda sudo update-grub
Code:
exit poweroff