I've been having a problem with a reinstallation of Arch Linux on a machine that's dual booted with Windows 10.
For various unrelated reasons, I decided to back up everything in my old Arch Linux installation and start fresh. I have the Arch Linux live media on a USB, so I went ahead and booted from it (in UEFI), formatted my Linux partition and went through the Arch Linux 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 beginner's 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.efistub, and renamed
- I ran
pacman -S grub os-prober
grub-installcommand from the arch installation guide with
directory=/boot(my mount point for my EFI partition) and then ran
grub-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 menu entries present.
When I try to boot, all I get is a GRUB command line. Going back into my Arch Linux 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 reran
grub-config. Still no menu entries. I found this question with a similar issue that said there was a known problem with the
grub-mkconfig helper script. This was from 2014, 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
/rundirectory available to the guest.
First, we mount
/runwhere it can be accessed by the guest. I will assume that your install partition is mounted at
mkdir /mnt/hostrun mount --bind /run /mnt/hostrun
chrootinto the guest, and mount our host's
/run/lvmin the guest's
arch-chroot /mnt /bin/bash mkdir /run/lvm mount --bind /hostrun/lvm /run/lvm
You can then run
grub-installwithout 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/lvmbefore 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 menu entries.
I'm able to get into Windows by selecting the Windows Boot Manager from my laptop's 'hammer F12 while booting' menu.