P
P
Pavel2016-01-07 19:39:50
linux
Pavel, 2016-01-07 19:39:50

How to restore grub in Ubuntu on btrfs?

I start LiveUSB, open the console
Then, through fdsik -l, I look at the partitions
/ dev / sda1 - the partition with the btrfs system
/ dev / sda2 - extended partition
/ dev / sda3 - home partition on ext4
I mount / mnt partition / dev / sda1
Then I see in / mnt the following folders @ and boot and some other boot_rm
I mount further
mount --bind /dev /mnt/@/dev
mount --bind /sys /mnt/@/sys
mount --bind /proc /mnt/@ /proc
mount --bind /boot /mnt/@/boot
and go to chroot /mnt/@
When I try to install grub-install /dev/sda it says /cow path not found ... But even if I
mount - -bind /boot /mnt/boot then the same problem still occurs....
And yes, my boot is not taken out of the system at the moment ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2016-01-07
@rusbaron

Read this: https://help.ubuntu.com/community/btrfs
The default configuration is to create a subvolume @ for the root.
That is, you need to mount not just /dev/sda1, but a subvolume, for example, like this:
Here is another article on installing GRUB: https://help.ubuntu.com/community/Grub2/Installing
There is an example for BTRFS:
That is, you can either do this:

sudo mount -o subvol=/@ /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

either like this:
sudo mount /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/@/boot /dev/sda

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question