Update ruined grub file. Reinstalling grub doesn't help

For some reason my Bluetooth completely stopped functioning. So I jumped over to Windows and saw it wasn't functioning there. Couldn't end up figuring it out so I ran my Lenovo software (I have an Lenovo Yoga 920) and it had a bios update along with some driver updates. Decided to give it a chance and run those updates after reading online that these shouldn't be an issue with Linux. I updated and my Bluetooth was working again. Except it screwed up my grub boot loader. So I read up on how to get it working again and everyone said to basically just reinstall. So I:

and it seems to run fine with a simple warning that google says is expected and can be ignored.

SO, I reboot and jump into bios and see that I now have an arch boot loader again. I also have an old ubuntu boot loader sitting in there as well.I boot from arch boot loader and it jumps straight into a grub screen that looks like the live cd. On the screen it says:

With a blinking cursor. I have no idea what this is, I'm extremely frustrated at this point as I have performed a lot of research and done a lot of steps prior to this trying to get this to work (gave you the short and sweet version) but I would really appreciate some help at this point and a breather.I've spent months setting this up and got it looking perfect for me and really don't want to screw something up. I plan on moving it over to an external SSD when I can afford one to not have to deal with this dual boot nonsense after this and have a nice plug and play. I hate Windows and wish I didn't need some of its software for work and school

EDIT: Also, I had to disable secure boot again since the new bios had re-enabled it. (Along with VM being disabled that I re-enabled as well)

EDIT2: I read that typing exit on this grub screen brings you to boot screen. I did this and had the options to boot into:Grub (Samsung)EFI USB Deviceubuntu (Samsung)arch (Samsung)Windows Boot Manager (Samsung)

Clicking on grub, Ubuntu, or arch brings me right back to the grub terminal screen. The efi usb device is the live cd, and you know what windows is

EDIT3: So I did a bit more googling. I typed 'ls' on the grub command line and got this:

for the efi partition or not. I can give that another shot but I really don't know. Could have been either since I had done it like 4 times prior to getting in through the backdoor via grub terminal. I then:

arch-chroot /mnt
sudo pacman -S grub efibootmgr os-prober
n

Did that to check to make sure they were still installed which they were. Then I:

Re: Update ruined grub file. Reinstalling grub doesn't help

Re: Update ruined grub file. Reinstalling grub doesn't help

seth wrote:

You mounted nvme0n1p1 into the live system, so when you chrooted into /mnt, it had no relevance…

mount /dev/nvme0n1p1 /mnt/boot

Ya, that's what I was just trying to remember. I don't know which I did. I will give it another go. I edited my post with full commands as a heads up. I appreciate your response. You're the only one who cares haha. Thanks again. I'll report back with an update.

Re: Update ruined grub file. Reinstalling grub doesn't help

Reporting back. Unfortunately it made no difference =/. Made sure to mount it

mount /dev/nvme0n1p1 /mnt/boot

and grub installed just fine.Everytime I do grub-mkconfig it shows this:

WARNING: Failed to connect to lvmetad.
Falling back to device scanning.
Done

But from what I've seen online, that's completely fine. However when I remember reinstalling grub after deleting Ubuntu, I swear it went through a list saying it recognized Linux and Windows. Am I wrong?Anyways, I still have the grub command line with the only way to actually get into my linux system via method described above in OP. I have a feeling that grub is bloated and needs to be cleaned up in order to get working. Maybe I'm wrong.

Re: Update ruined grub file. Reinstalling grub doesn't help

Damn well I had planned on purchasing an external SSD on Black Friday/cyber Monday specifically with the purpose of moving my arch install over to it so that I could just plug and play by making boot order for external SSD the primary if it’s plugged in. Could this potentially fix this issue since it doesn’t seem as if anyone knows how to fix my current situation? I had planned on just making an EFI partition, swap partition, and ext4 Linux file system partition for the remainder on the SSD and simply copying over my arch partition from my main hard drive to the external SSD. Uninstalling grub and reinstalling it. Does this sound legit?

Re: Update ruined grub file. Reinstalling grub doesn't help

Roken wrote:

Are you mounting /boot outside of, or within chroot. I still think Seth is right and you are mounting in the live system. You need to mount it in chroot.

wait....maybe I misunderstood. Is it because I am mounting it prior to arch-chroot'ing into my system? I was under the impression it was because I had miss-typed it by mounting it to /boot instead of /mnt/bootThe last time I tried it, I made sure I mounted it to /mnt/boot and not just /boot. However if I need to mount it after I chroot into the arch system then that could be the issue and I can try again and mount it after I chroot.

EDIT: Wow my grub.cfg has a big red 'x' on it in my file manager and when I open it it is completely empty. I don't understand why that is since I've gone into this file in the past and seen what it looks like when it is filled. I guess the big red x is because its file type is unknown. And I'm sorry but what do you mean by checking the timestamps in the boot partition? Do you mean to look into my EFI partition and see the timestamps? Or simply to look into my /boot directory and check like the last time the grub.cfg was edited? And is there anyway I can use a default grub.cfg and change the values inside to get it working correctly since mkconfig doesn't seem to be working right.

This....worked. To a degree. It doesn't recognize my Windows install, only my arch install. Now I can go into bios and boot from the Windows boot loader if need be and I don't go on Windows but rarely when I need to use a specific software but it would be nice if it had recognized Windows either way. If not, then I'd much rather it boot straight into Arch instead of the bootloader screen where I have to select Arch from it. So I decided to check on my grub.cfg file and it's still empty. There's nothing in it. I have an efi directory in /boot but the directory is empty as well. Why is this? Did I put in the commands correctly? I was kinda going in blind when I added /efi in the grub-install command as well as the grub-mkconfig command so I'm not sure if I should have done that or not but it seemed like the right thing since I had mounted to /mnt/boot/efi. How is grub recognizing Linux if the config file is empty? Thanks.

Re: Update ruined grub file. Reinstalling grub doesn't help

I doubt it's empty... how do you know you have read permission for the file? grub-mkconfig is an insane, crazy program which generates garbage, and also makes the grub.cfg only readable as root for "security" reasons.

Re: Update ruined grub file. Reinstalling grub doesn't help

eschwartz wrote:

I doubt it's empty... how do you know you have read permission for the file? grub-mkconfig is an insane, crazy program which generates garbage, and also makes the grub.cfg only readable as root for "security" reasons.

Note that grub.cfg can be incredibly simple. Here's a sample one with a lot of flexibility for different situations, including loading Windows: https://ptpb.pw/mk7y

Thank you for that. I assumed that I could at least read it without root permissions like every other file I have opened. I'm going to post my current grub.cfg and take a look at the link you gave me after I get out of class. Note that I do now have grub recognizing my Arch installation, just not my Windows.

Re: Update ruined grub file. Reinstalling grub doesn't help

Well, the section which is generated by os-prober is empty, so either you didn't have os-prober installed, or os-prober detected nothing. I've got no clue which one might be the case, but I do know that writing a custom grub.cfg is both easy and more reliable.

Managing AUR repos The Right Way -- aurpublish (now a standalone tool)