You are not logged in.

#1 2021-12-01 18:05:42

Eurkz
Member
Registered: 2021-07-21
Posts: 49

[SOLVED] GRUB not listening to its config file

I'm trying to fix my grub config file, but GRUB does not listen to the file.
even after running a update-grub:

sudo update-grub
Generating grub configuration file ...
Found background: /home/eric/Pictures/wallpaper.png
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  amd-ucode.img initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

-Grub does not detect the background image, even though it says it "Found Background"
-Grub does not use the custom larger font I set
-Grub auto-boots arch even though I specifically tell it not to in my config (to get to the screen below in the picture I have to go to the bios first)
-Grub is listing Windows 10 on my nvme0n1p1, which is my Arch drive (however windows boots fine?)

https://i.imgur.com/urMSbqi.jpeg

# GRUB boot loader configuration

GRUB_DEFAULT="0"
GRUB_TIMEOUT="30"
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK="y"

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE="menu"

# Uncomment to use basic console
GRUB_TERMINAL_INPUT="console"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="auto"

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX="keep"

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/home/eric/Pictures/wallpaper.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to change to default font size
GRUB_FONT=/boot/grub/fonts/DejaVuSansMono36.pf2 

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU="y"

# Uncomment to disable os-prober
GRUB_DISABLE_OS_PROBER="false"

Why is GRUB not listening to this file?
I have almost identical settings on my laptop (just not dualbooting so no os-prober in the grub.cfg) and everything works fine. PC always boots to the grub menu, background image is there, and the 30 second timeout is being listened too.


Mod Edit - Replaced oversized image with link.
CoC - Pasting pictures and code

Last edited by Eurkz (2021-12-02 17:19:58)

Offline

#2 2021-12-01 19:03:14

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: [SOLVED] GRUB not listening to its config file

Eurkz wrote:

even after running a update-grub

Arch does not supply the update-grub wrapper script. From which distribution did you run that command?

Use the set command (with no arguments) from the GRUB command line to see where it is looking for the configuration file. Use the efibootmgr command to see the NVRAM boot entries and their order if this is a UEFI system.

Eurkz wrote:

-Grub is listing Windows 10 on my nvme0n1p1, which is my Arch drive (however windows boots fine?)

That appears to be your EFI system partition.


Jin, Jîyan, Azadî

Offline

#3 2021-12-01 19:15:18

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

I have the update-grub script already installed, just so its easier than typing "grubgrub-mkconfig -o /boot/grub/grub.cfg" everytime.
I am on using Arch not another arch based-distro (ie manjaro)

efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000
Boot0000* Windows Boot Manager
Boot0001* GRUB
grub> set

https://imgur.com/a/wsRkbJX

Last edited by Eurkz (2021-12-01 19:29:24)

Offline

#4 2021-12-01 19:45:49

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: [SOLVED] GRUB not listening to its config file

Please post the efibootmgr output with the -uv options applied along with the output of blkid.

There should be a grub.cfg file on the EFI system partition in the /EFI/GRUB/ directory, also post the contents of that file. Thanks.


Jin, Jîyan, Azadî

Offline

#5 2021-12-01 19:54:11

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

efibootmgr -uv:

BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000
Boot0000* Windows Boot Manager	HD(1,GPT,f4c8fd30-a228-ba45-948c-fe409a37d6ab,0x800,0x100000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)䥗䑎坏S
Boot0001* GRUB	HD(1,GPT,f4c8fd30-a228-ba45-948c-fe409a37d6ab,0x800,0x100000)/File(\EFI\GRUB\GRUBX64.EFI)

blkkid:

/dev/nvme0n1p1: UUID="5573-F907" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="f4c8fd30-a228-ba45-948c-fe409a37d6ab"
/dev/nvme0n1p2: UUID="acc46a17-ec5d-46b3-b5d1-b41c9417a9c1" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="c9f69e52-651f-a240-bfc6-8e326dd3c6b3"
/dev/nvme1n1p2: BLOCK_SIZE="512" UUID="6CBE7DB6BE7D7A02" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0858354e-b96f-4da4-a59a-40d7c8585753"
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="1708cc83-6c2e-4b35-90b9-a247722b3052"

grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root acc46a17-ec5d-46b3-b5d1-b41c9417a9c1
if loadfont /boot/grub/fonts/DejaVuSansMono36.pf2 ; then
  set gfxmode=3440x1440
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root acc46a17-ec5d-46b3-b5d1-b41c9417a9c1
insmod jpeg
background_image -m stretch /home/eric/Pictures/house.jpg
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=30
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=30
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/06_grub-customizer_menu_color_helper ###
### END /etc/grub.d/06_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-acc46a17-ec5d-46b3-b5d1-b41c9417a9c1' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root acc46a17-ec5d-46b3-b5d1-b41c9417a9c1
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=acc46a17-ec5d-46b3-b5d1-b41c9417a9c1 rw  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/amd-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-acc46a17-ec5d-46b3-b5d1-b41c9417a9c1' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-acc46a17-ec5d-46b3-b5d1-b41c9417a9c1' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root acc46a17-ec5d-46b3-b5d1-b41c9417a9c1
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=acc46a17-ec5d-46b3-b5d1-b41c9417a9c1 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/amd-ucode.img /boot/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-acc46a17-ec5d-46b3-b5d1-b41c9417a9c1' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root acc46a17-ec5d-46b3-b5d1-b41c9417a9c1
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=acc46a17-ec5d-46b3-b5d1-b41c9417a9c1 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/amd-ucode.img /boot/initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-5573-F907' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 5573-F907
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Offline

#6 2021-12-01 20:38:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: [SOLVED] GRUB not listening to its config file

Eurkz wrote:

grub.cfg

That seems to be /boot/grub/grub.cfg (presumably from your Arch installation). That is not what I asked for.

For clarity:

# mount /dev/nvme0n1p1 /mnt
$ cat /mnt/EFI/GRUB/grub.cfg

^ The output from the second command, please.


Jin, Jîyan, Azadî

Offline

#7 2021-12-01 20:59:33

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

Head_on_a_Stick wrote:

For clarity:

# mount /dev/nvme0n1p1 /mnt
$ cat /mnt/EFI/GRUB/grub.cfg

^ The output from the second command, please.

Assuming I have to boot into the live iso for that.
So when I run:

# mount /dev/nvme0n1p1 /mnt

I can see from lsblk that the partition has mounted correctly, but when I run try to chroot in I get:

mount: /mnt/proc: mount point does not exist
==> ERROR: failed to setup chroot /mnt 

Am I still misunderstanding?

Offline

#8 2021-12-01 21:06:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: [SOLVED] GRUB not listening to its config file

Eurkz wrote:

Assuming I have to boot into the live iso for that.

No.

Eurkz wrote:

Am I still misunderstanding?

Yes.

Last edited by Head_on_a_Stick (2021-12-01 21:14:06)


Jin, Jîyan, Azadî

Offline

#9 2021-12-01 21:15:05

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

Ok so mounting in root.
Once its mounted I ran

cat /mnt/EFI/GRUB/grub.cfg

and am prompted with

cat: /mnt/EFI/GRUB/grub.cfg: No such file or directory

the only thing in /mnt/EFI/GRUB/ is grubx64.efi

Last edited by Eurkz (2021-12-01 21:17:20)

Offline

#10 2021-12-01 21:29:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: [SOLVED] GRUB not listening to its config file

I'm slightly confused here because configfile is not defined from your GRUB command line. Some distributions (not Arch) use grub.cfg on the ESP to point to the correct /boot/grub/grub.cfg but you don't have that either. Weird.

I will have to offer my sincere apologies and step out of this thread for the moment. I'm having trouble concentrating. Hopefully somebody else will be able to offer better assistance.


Jin, Jîyan, Azadî

Offline

#11 2021-12-01 21:31:45

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

Thank you, I appreciate your time and help anyway. Hopefully I can find a fix for this soon.

Offline

#12 2021-12-02 09:01:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] GRUB not listening to its config file

Did you see my last edit in your previous thread? https://bbs.archlinux.org/viewtopic.php … 8#p2006468

If you didn't add the ESP to your fstab on /boot you now once again have a disjoint between where your config lies and where GRUB looks for it.

Decide whether you want your GRUB config on the ESP or on your root partition, this will influence the way you need to setup GRUB. If your last post in the linked thread was any indication you now have a GRUB on the ESP, looking for it's config on the ESP and you currently in this thread are trying to set up configuration that's present on your root partition and not on your ESP while you'd want to configure the latter.

Last edited by V1del (2021-12-02 09:03:49)

Offline

#13 2021-12-02 15:28:18

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

I'm just seeing that now.
How do properly add the ESP to my fstab?

# mount /dev/nvme0n1p1 /mnt
# genfstab -U /mnt >> /mnt/etc/fstab

Gives me

no such file for directory: /mnt/etc/fstab

Offline

#14 2021-12-02 15:33:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] GRUB not listening to its config file

If you wanted to use that approach you'd mount your root from lsblk output of your previous thread nvme0n1p2  to /mnt then your esp to /mnt/boot, then run that genfstab command. genfstab picks up all the mount points as they are present under the /mnt path and generates the relevant entry.

You can also just manually pick up the UUID from lsblk and add it, or mount it to /boot and just do a

genfstab -U / >> /etc/fstab

assuming you're on your installed system. Double check the fstab to be sure.

Or really to prevent confusions from the automations you can also just add

UUID=5573-F907  /boot  vfat  defaults 0 0

and add that to the end of your fstab

Last edited by V1del (2021-12-02 15:44:42)

Offline

#15 2021-12-02 15:54:45

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

Its still not letting me run genfstab:

# genfstab -U /mnt >> /mnt/etc/fstab
zsh: command not found: genfstab

I can edit the file manually but I'm not sure exactly what to put in it. (Does the UUID matter? can it be any random UUID? what options do I pass etc.)

Offline

#16 2021-12-02 16:01:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] GRUB not listening to its config file

See my edit. Add that line to your fstab and compare what I added in that last line with the output of lsblk -f after mounting the ESP to know why I know what to put there.

Last edited by V1del (2021-12-02 16:03:20)

Offline

#17 2021-12-02 16:10:47

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

Looks like it matches, I'm going to restart my machine and see if there are any changes

lsblk -f
NAME    FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1
├─nvme0n1p1
│       vfat   FAT32       5573-F907                             420.8M    18% /mnt/boot
└─nvme0n1p2
        ext4   1.0         acc46a17-ec5d-46b3-b5d1-b41c9417a9c1  666.6G    24% /mnt
                                                                               /
nvme1n1
├─nvme1n1p1
│
└─nvme1n1p2
        ntfs               6CBE7DB6BE7D7A02

Offline

#18 2021-12-02 17:19:30

Eurkz
Member
Registered: 2021-07-21
Posts: 49

Re: [SOLVED] GRUB not listening to its config file

It worked! Thank you!

Offline

Board footer

Powered by FluxBB