I
I
Ilya Korol2017-03-23 11:47:17
GRUB
Ilya Korol, 2017-03-23 11:47:17

How to restore grub bootloader in linux min on btrfs partition?

I can not restore Grub for the third day, various errors come out.
Either there is no /cow , or something with efi.
I reinstalled windows 10. It is at the beginning of the disk layout. I deleted 3 of its partitions there and created a new C partition. Linux Mint was installed from sda6 to sda8.
sda6-ext2
sda7-btrfs - here in the @ folder there are sys proc and other folders. sda8 - ext4 -there
all files are my personal files / sda If I do it through chroot, then it says something with efi markup. I don't know what to do anymore. Help..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nazar Mokrinsky, 2017-03-23
@iliyaking46

Offhand, this should help (for EFI systems, since it's easier and more convenient):
1) Boot into Live USB
2)

sudo -i
mount -o subvol=/@ /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot
mount /dev/sda2 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

3)
apt-get install --reinstall grub-efi
update-grub
dpkg-reconfigure grub-efi-amd64

After that, you can reboot, in UEFI there should be a boot point in Linux Mint.
/dev/sda2 is an ESP partition, in fact FAT23 labeled in ESP, you can create it in gparted, you can use the same partition that Windows created during installation, if there is one, there should be an efi or EFI folder in the root
Do not forget to add ESP partition /dev/sda2 (better, however, by the UUID of the partition, you can find out, for example, using blkid) in /etc/fstab of the working system, so that it is mounted in /boot/efi.

I
Ilya Korol, 2017-03-23
@iliyaking46

Solution! The file in @/etc/fstab helped and another article logan.tw/posts/2015/05/17/grub-install-and-btrfs-r...
[email protected] ~ $ sudo su
mint mint # sudo mkdir mnt
mint mint # sudo mount -o subvol=/@ /dev/sda7 /mnt
mint mint # sudo mount /dev/sda6 /mnt/boot
mint mint # sudo mount /dev/sda2 /mnt/boot/efi
mint mint # for i in dev dev/pts sys proc run; do sudo mount --bind /$i /mnt/$i; done
mint mint # sudo chroot /mnt
mint / # grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
mint / # update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found Windows Boot Manager on /dev/[email protected]/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done
mint / # exit
exit
mint mint # sudo umount /mnt/boot/efi
mint mint # sudo umount /mnt/boot
mint mint # sudo umount /mnt/proc
mint mint # sudo umount /mnt/sys
mint mint # sudo umount /mnt/dev/ pts
mint mint # sudo umount /mnt/dev
mint mint # sudo umount /mnt/run
mint mint # sudo umount /mnt
mint mint # sudo rmdir mnt
601657b274374dc99487631fb20d4003.png0af62bb354e1445098494314f68ab05f.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question