(To clarify: this is about fixing grub by using a LiveCD to rebuild grub, a pretty standard operation e.g. https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows, with the difficulty being btrfs in use)

Ubuntu partition is /dev/sda5 and is btrfs, with encrypted home.

When I

mount /dev/sda5 /mnt
cd /mnt 

I get two directories: @ and @home and the / file system is under @

chroot /mnt

fails with 'failed to run command /bin/bash'

chroot /mnt/@

looks like it works, since it lets me mount the /proc /dev etc via

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

but update-grub fails with

grub-probe: cannot find a device for / (is /dev mounted?).

fstab looks like this:

UUID=<...> / btrfs defaults,subvol=@ 0 1

swap and home are encrypted.


Ah, the trick with the subvolume is to mount the partition like this:

sudo mount -t btrfs -o subvol=@ /dev/sda5 /mnt 

update-grub succeeds.

I needed to do these steps as well (via How can I repair grub? (How to get Ubuntu back after installing Windows?))

grub-install /dev/sda
update-grub # In order to find and add windows to grub menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.