Friday, 31 August 2012

Ubuntu grub fix with btrfs

I couldn't find a simple guide for this so here it is...

I have Ubuntu 12.04 with btrfs as my main FS.  Once Windows was install Ubuntu vanished as usual. Took some playing but here is my fix.

The guts are..

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

sudo mount --bind /dev /mnt/dev/

sudo mount --bind /proc /mnt/proc

sudo chroot /mnt/

grub-install --recheck /dev/sda

The key bit is the mount line. If you see in your mount directory @ and @home something has not worked and it's mounted the raw thing not the correct subvolume.


John Doe said...

I must have Googled a solution to this problem a google times. I appreciate the straight forward answer and a solution that just worked. Most answers require a lot of digging through the message and this particular solution has eluded me until now.

Thank you so much!

Rony Dray said...

After 10 hours of research, your solution saved my computer. You are my savior.

But need to mount more:
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run

After grub-install --recheck /dev/sdX
Need to run : update-grub

Arjuna said...

Thanks to Nick's post, and Rony Dray's clarifier, all is well! Thank you both for your help! Saved me hours of scouring, no doubt.

CS:GO on Linux not starting

Valve, for a company that supposedly loves Linux your support is terrible. I got pointed to a community forum for support when logging this ...