I can not boot into my CentOS install after I reinstalled Windows 10 on a dual-boot machine.

I am confused about grub-install and update-grub. I've reinstalled Windows on my dual-boot PC, and after that I can not boot into my CentOS system. I am searching the web for hours, but I got not solution. What might be unique in my case: the "root" partition is on /dev/sda6/root, i.e. if I mount the volume, I do not mount the root partition, but it has a "label" or subvolume called root. (I have no idea why it was installed so, I just guess that this was the default in CentOS installer)

Among others I followed these guides: (the others were similar)

The output of the boot repair is upoladed to here: http://paste.ubuntu.com/p/HGzXK6SWX4/ Boot-repair did not write out any warning or error messages. What is strange, that it does not mention any linux installation, just the volume names tells us it was CentOS. I would have expected a grub installed at /dev/sda2 line. Also I would expect that my EFI partition has the boot flag, not the windows boot manager (see in the pastebin link).

OS-prober does not find my linux installation partition:

xubuntu@xubuntu:~$ sudo os-prober
/dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.

Using grub-install also did not work. I tried with --boot-directory option as well. No luck...

xubuntu@xubuntu:~$ sudo grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `aufs'.

I have not found any useful posts about this. Not clear what does the error mean.

When I followed the link above about the chroot method, I got the error that the grub-install is no found:

xubuntu@xubuntu:~$ sudo mount -t btrfs -o subvol=root /dev/sda6 /mnt
xubuntu@xubuntu:~$ for i in /sys /dev /proc /run; do sudo mount -B $i /mnt$i; done
xubuntu@xubuntu:~$ sudo chroot /mnt
bash-4.2# grub-install /dev/sda
bash: grub-install: command not found
bash-4.2# update-grub
bash: update-grub: command not found
bash-4.2# exit
xubuntu@xubuntu:~$ which grub-install
xubuntu@xubuntu:~$ sudo mount --bind /usr/sbin/ /mnt/usr/sbin
xubuntu@xubuntu:~$ sudo chroot /mnt
bash-4.2# grub-install
grub-install: error while loading shared libraries: libdevmapper.so.1.02.1: cannot open shared object file: No such file or directory

I have clearly reached my limit and I can not solve this issue. I did not loved CentOS, but I have set up everything on it, and I do not want to reinstall it. Any help is welcome.

  • The fdisk output is in the pastebin link. Which fstab would you like to see? I was using a live USB disk. How does the fstab of the original CentOS help? It will be used only after boot. – Horror Vacui Mar 9 '18 at 15:00
  • Do NOT use "foreign" distros for recovery/emergency purposes. Use a CentOS recovery disk/image (or the install image in recovery mode). Please be sure to use the right boot mode (BIOS/UEFI) when starting the recovery. Actually your pastebin does look fine. root, home (LVM) and swap (LVM) could be identified. – reichhart Apr 7 '18 at 23:36

Your Answer

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

Browse other questions tagged or ask your own question.