LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2024, 09:10 PM   #1
geekdude
LQ Newbie
 
Registered: Apr 2015
Posts: 10

Rep: Reputation: Disabled
Grub not loading grub.cfg automatically


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
    └── entries
Code:
[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
    }
 
Old 01-28-2024, 09:46 PM   #2
geekdude
LQ Newbie
 
Registered: Apr 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Code:
[andrew@LinuxGaming etc]$ ls /sys/firmware/efi/efivars
AcpiGlobalVariable-af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e  LegacyDevChecksum-a56074db-65fe-45f7-bd21-2d2bdd8e9652
BiosSynDataStuct-523db52e-5474-423e-9fc1-15adbc1600bc    LegacyDevOrder-a56074db-65fe-45f7-bd21-2d2bdd8e9652
BoardFeatures-94b9e8ae-8877-479a-9842-f5974b82ced3       MaintenanceSetup-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
BoardId-6b2dd245-03f2-414a-8c02-9ffc2352e31e             MemCeil.-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c            MemorySize-d7bd52b0-b2dc-4f08-b467-de50d728f6bd
Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c            MePatchState-0328cb47-4d60-4ada-a20e-aac3a41fe3d0
Boot0005-8be4df61-93ca-11d2-aa0d-00e098032b8c            MfgDefault-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
Boot0006-8be4df61-93ca-11d2-aa0d-00e098032b8c            MfgDefaults-4599d26f-1a11-49b8-b91f-858745cff824
Boot0007-8be4df61-93ca-11d2-aa0d-00e098032b8c            MfgMode-ef14fd78-0793-4e2b-ac6d-062847e01791
Boot0008-8be4df61-93ca-11d2-aa0d-00e098032b8c            MonotonicCounter-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0009-8be4df61-93ca-11d2-aa0d-00e098032b8c            MrcS3Resume-d7bd52b0-b2dc-4f08-b467-de50d728f6bd
Boot000a-8be4df61-93ca-11d2-aa0d-00e098032b8c            OriginalLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot000b-8be4df61-93ca-11d2-aa0d-00e098032b8c            PayLoadChkSum-0f7a52a8-62d9-4219-bcb0-365ed9df2dc4
Boot0014-8be4df61-93ca-11d2-aa0d-00e098032b8c            PciSerialPortsLocationVar-560bf58a-1e0d-4d7e-953f-2980a261e031
Boot0015-8be4df61-93ca-11d2-aa0d-00e098032b8c            PNP0303_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
Boot0016-8be4df61-93ca-11d2-aa0d-00e098032b8c            PNP0303_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c         PNP0400_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
BootFlow-ef152fb4-7b2f-427d-bdb4-7e0a05826e64            PNP0400_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c           PNP0501_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
BootPartition-8db699cc-bc81-41e2-aac6-d81d5300d759       PNP0501_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
ConErrDev-8be4df61-93ca-11d2-aa0d-00e098032b8c           PNP0501_1_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c               PNP0501_1_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c            PNP0604_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c              PNP0604_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c           PNP0F03_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
CpuS3Resume-30b98b95-dfa3-4501-a3ce-e38c186384a0         PNP0F03_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
DefMRCTimingData-d7bd52b0-b2dc-4f08-b467-de50d728f6bd    SerialPortsEnabledVar-560bf58a-1e0d-4d7e-953f-2980a261e031
DmiData-70e56c5e-280c-44b0-a497-09681abc375e             SetupCpuFeatures-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
EfiTime-9d0da369-540b-46f8-85a0-2b5f2c301e15             SetupDefault-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
Events-b452fd8a-c9ca-4764-977e-59d839dd861b              Setup-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
FirmwareId-efc071ae-41b8-4018-afa7-314b185e578b          SLP20Magic-41282ef2-9b5a-4eb7-95d8-d9cd7bdce367
HiiDB-1b838190-4625-4ead-abc9-cd5e6af18fe0               StdDefaults-4599d26f-1a11-49b8-b91f-858745cff824
ItkBiosModVar-3812723d-7e48-4e29-bc27-f5a39ac94ef1       Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
ItkDataVar-3812723d-7e48-4e29-bc27-f5a39ac94ef1          UsbMassDevNum-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c                UUID-d357c710-0ada-4717-8dba-c6adc7cd2b2a
LastBootMode-0f7a52a8-62d9-4219-bcb0-365ed9df2dc4        WOL-a4c5067a-5b95-4770-9ac0-59e6544ca239
LastUnLockMode-0f7a52a8-62d9-4219-bcb0-365ed9df2dc4
 
Old 01-31-2024, 07:36 PM   #3
geekdude
LQ Newbie
 
Registered: Apr 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hey Nevermind. I was booting from a previous uefi entry. I tried it today under the Nobara entry and it worked without me having to tell is where the config file is so something I did worked.
 
  


Reply

Tags
boot, efi, grub2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux From Scratch 4 06-20-2018 09:13 PM
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux - Newbie 6 06-20-2018 01:54 PM
Files in /etc/grub.d not included in /boot/grub/grub.cfg. stf92 Slackware 21 05-27-2018 04:38 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] how to the give path of the part.cfg file in %include command in ks.cfg. YOGESHAS87 Linux - Newbie 2 01-11-2011 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration