I've been having a problem with a re-installation of arch on a machine that's dual booted with windows 10. For various unrelated reasons, I decided to back up everything in my old arch installation and start fresh. I have the arch live media on a USB, so I went ahead and booted from it (in UEFI), formatted my linux partition and went through the arch installation guide.
Everything seemed to be working fine until I got to the 'install bootoloader' section. I wasn't 100% sure what to do here, as the beginners guide that I used before has been deleted in favor of the (much, much more brief) installation guide. I know that my EFI partition already had all the grub stuff it needed, but I figured it would need to be changed for a new installation. I deleted the
/boot/EFI/grub.efi stub, and renamed
pacman -S grub os-prober'ed, ran the grub-install command from the arch installation guide with
directory=/boot (my mount point for my efi partition) and then ran g
rub-mkconfig -o /boot/grub/grub.cfg.
This is where my trouble started. Running the grub-mkconfig command gave me a '
failed to connect to lvmetad' error, and said it was reverting to fallback mode. It successfully produced a grub.cfg file in the correct directory, however there were no menuentries present. When I try to boot, all I get is a grub command line. Going back into my arch live media and redoing the arch-chroot, I went into my
/boot/grub.bak and copied the menu entry sections for arch linux from there, making sure to replace the old UUID with the one currently reported in my fstab for my root directory. This brought the grub menu back when I rebooted, but selecting arch linux gave me an error that
/vmlinux couldn't be found.
I went back into my chroot on the live media, and re-ran grub-config. Still no menuentries. I found this thread with a similar issue, that said there was a known problem with the grub-mkconfig helper script. This was from '14, so I thought it was unlikely that my issue was the same, but I followed the best answer there. The suggestion was to do the following:
ran across the same issue just now, and found another workaround. Basically, it involves making the hosts /run directory available to the guest.
First, we mount /run where it can be accessed by the guest. I will assume that your install partition is mounted at /mnt
mkdir /mnt/hostrun mount --bind /run /mnt/hostrun Then, we chroot into the guest, and mount our host's /run/lvm in the guest's /run
arch-chroot /mnt /bin/bash mkdir /run/lvm mount --bind /hostrun/lvm /run/lvm You can then run grub-mkconfig and grub-install without any LVM errors. This also makes the commands behave if you are installing with LVM, for what it's worth.
When done, remember to umount /run/lvm before exiting the chroot.
Doing so actually got rid of my
fails to connect to lvmetad error, but replaces it with a
/dev/sdx not initialized in UDEV. The command still produces a grub.cfg without menuentries.
I'm able to get into Windows by selecting the Windows Boot Manager from my laptop's 'hammer f12 while booting' menu.