Grub not loading grub.cfg automatically
by geekdude from LinuxQuestions.org on (#6J6YM)
I borked my bootloader on MLK day and I have spent the past 2 weeks trying to figure out how to fix it. When I installed Nobara Linux it installed a linux boot partition beyond the windows partition and the linux root partition after that. This was fine for awhile but I didnt give myself enough space and I wasnt sure if moving the boot partition would cause it to no longer boot so I tried to instal /boot into the windows efi partition and removed the linux boot partition which borked my ability to boot to both windows and linux somehow. I then decided to erase the efi partition and start over which may not have been the best use of my time but here we are. I have coppied the boot files from the installer to the windows efi partition, installed grub to it, and mounted it to /boot in fstab. I now have the computer to the point where I have a perfectly good grub.conf file which is capable of booting windows or Linux but grub just doesn't want to run this file unless I specifically tell it to. It boots to a grub commandline with grub> and if I enter configfile /grub/grub.cfg it boots fine I just dont want to have to do that every time. I have tried just about everything I could find on google about the issue but most of it is MBR specific and I am running on EFI. I have also tried using the auto grub fix option in rescatux. I am convinced that either the grub files are in the wrong place or its configured to look in the wrong place to find them. I just cant find out where that place is supposed to be. Let me know if you can help point me in the right direction
Code:[andrew@LinuxGaming ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 223.6G 0 disk
sda1 8:1 1 649M 0 part /boot
sda2 8:2 1 1000M 0 part
sda3 8:3 1 136.7G 0 part
sda4 8:4 1 85.2G 0 part /home
/
sdb 8:16 1 7.3T 0 disk
sdb1 8:17 1 1000M 0 part
sdb2 8:18 1 182.4G 0 part
sdb3 8:19 1 312.9G 0 part
sdb4 8:20 1 594.7G 0 part /mnt/Data
sdb5 8:21 1 2.8T 0 part /mnt/WinSteam
sdb6 8:22 1 97.7G 0 part /mnt/LinuxPrograms
sdb7 8:23 1 3.3T 0 part /mnt/LinuxSteam
sdb8 8:24 1 127M 0 part
sr0 11:0 1 554.8M 0 rom
zram0 252:0 0 8G 0 disk [SWAP]
Code:/boot
Boot
** cs-CZ
** da-DK
** de-DE
** el-GR
** en-US
** es-ES
** fi-FI
** Fonts
** fr-FR
** hu-HU
** it-IT
** ja-JP
** ko-KR
** nb-NO
** nl-NL
** pl-PL
** pt-BR
** pt-PT
** ru-RU
** sv-SE
** tr-TR
** zh-CN
** zh-HK
** zh-TW
EFI
** Boot
** EFI
** ** fedora
** ** grub
** ** ** fonts
** ** nobara
** Microsoft
** ** Boot
** ** cs-CZ
** ** da-DK
** ** de-DE
** ** el-GR
** ** en-US
** ** es-ES
** ** fi-FI
** ** Fonts
** ** fr-FR
** ** hu-HU
** ** it-IT
** ** ja-JP
** ** ko-KR
** ** nb-NO
** ** nl-NL
** ** pl-PL
** ** pt-BR
** ** pt-PT
** ** ru-RU
** ** sv-SE
** ** tr-TR
** ** zh-CN
** ** zh-HK
** ** zh-TW
** nobara
EFI_PRE_RESCATUX_2024-01-19-04-32-00
** Boot
** Microsoft
** Boot
** cs-CZ
** da-DK
** de-DE
** el-GR
** en-US
** es-ES
** fi-FI
** Fonts
** fr-FR
** hu-HU
** it-IT
** ja-JP
** ko-KR
** nb-NO
** nl-NL
** pl-PL
** pt-BR
** pt-PT
** ru-RU
** sv-SE
** tr-TR
** zh-CN
** zh-HK
** zh-TW
grub
** fonts
grub2
** fonts
** locale
** x86_64-efi
loader
entriesCode:[andrew@LinuxGaming etc]$ sudo cat grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Nobara Linux" {
insmod part_msdos
insmod btrfs
insmod linux
set root=(hd0,gpt4)
linux (hd0,gpt1)/vmlinuz-6.6.2-201.fsync.fc38.x86_64 ro root=/dev/sda4 rootflags=subvol=@
initrd (hd0,gpt1)/initramfs-6.6.2-201.fsync.fc38.x86_64.img
boot
}
Code:[andrew@LinuxGaming ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 223.6G 0 disk
sda1 8:1 1 649M 0 part /boot
sda2 8:2 1 1000M 0 part
sda3 8:3 1 136.7G 0 part
sda4 8:4 1 85.2G 0 part /home
/
sdb 8:16 1 7.3T 0 disk
sdb1 8:17 1 1000M 0 part
sdb2 8:18 1 182.4G 0 part
sdb3 8:19 1 312.9G 0 part
sdb4 8:20 1 594.7G 0 part /mnt/Data
sdb5 8:21 1 2.8T 0 part /mnt/WinSteam
sdb6 8:22 1 97.7G 0 part /mnt/LinuxPrograms
sdb7 8:23 1 3.3T 0 part /mnt/LinuxSteam
sdb8 8:24 1 127M 0 part
sr0 11:0 1 554.8M 0 rom
zram0 252:0 0 8G 0 disk [SWAP]
Code:/boot
Boot
** cs-CZ
** da-DK
** de-DE
** el-GR
** en-US
** es-ES
** fi-FI
** Fonts
** fr-FR
** hu-HU
** it-IT
** ja-JP
** ko-KR
** nb-NO
** nl-NL
** pl-PL
** pt-BR
** pt-PT
** ru-RU
** sv-SE
** tr-TR
** zh-CN
** zh-HK
** zh-TW
EFI
** Boot
** EFI
** ** fedora
** ** grub
** ** ** fonts
** ** nobara
** Microsoft
** ** Boot
** ** cs-CZ
** ** da-DK
** ** de-DE
** ** el-GR
** ** en-US
** ** es-ES
** ** fi-FI
** ** Fonts
** ** fr-FR
** ** hu-HU
** ** it-IT
** ** ja-JP
** ** ko-KR
** ** nb-NO
** ** nl-NL
** ** pl-PL
** ** pt-BR
** ** pt-PT
** ** ru-RU
** ** sv-SE
** ** tr-TR
** ** zh-CN
** ** zh-HK
** ** zh-TW
** nobara
EFI_PRE_RESCATUX_2024-01-19-04-32-00
** Boot
** Microsoft
** Boot
** cs-CZ
** da-DK
** de-DE
** el-GR
** en-US
** es-ES
** fi-FI
** Fonts
** fr-FR
** hu-HU
** it-IT
** ja-JP
** ko-KR
** nb-NO
** nl-NL
** pl-PL
** pt-BR
** pt-PT
** ru-RU
** sv-SE
** tr-TR
** zh-CN
** zh-HK
** zh-TW
grub
** fonts
grub2
** fonts
** locale
** x86_64-efi
loader
entriesCode:[andrew@LinuxGaming etc]$ sudo cat grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Nobara Linux" {
insmod part_msdos
insmod btrfs
insmod linux
set root=(hd0,gpt4)
linux (hd0,gpt1)/vmlinuz-6.6.2-201.fsync.fc38.x86_64 ro root=/dev/sda4 rootflags=subvol=@
initrd (hd0,gpt1)/initramfs-6.6.2-201.fsync.fc38.x86_64.img
boot
}