You are not logged in.

#1 2021-12-16 13:18:47

carmilso
Member
From: València, España
Registered: 2017-08-28
Posts: 18
Website

[SOLVED] Grub is ignoring configuration

Hello,

I have this set as configuration for Linux kernel:

GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=06ffa975-695d-4d83-a8c6-3f436d201402 resume_offset=4403200"

And that is correctly applied when I regenerate the configuration for grub:

sudo grub-mkconfig -o /boot/grub/grub.cfg

But for some reason this configuration is not being respected and when I reboot it is using an old configuration. In fact, if I login to the system I can see this:

➜ cat /proc/cmdline                                                                                          
BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=06ffa975-695d-4d83-a8c6-3f436d201402 splash resume=UUID=06ffa975-695d-4d83-a8c6-3f436d201402 resume_offset=4403200

It looks like there is some configuration I'm missing and grub is using it. Any ideas of what is happening?

Last edited by carmilso (2021-12-16 15:15:41)

Offline

#2 2021-12-16 13:28:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,296

Re: [SOLVED] Grub is ignoring configuration

This primarily happens if GRUB isn't looking for it's config where you think it's looking, normally if you e.g. had your EFI partition mounted to /boot during initial setup, and don't have that anymore in your further manipulation attempts. What's /boot ? Should the ESP be mounted there or should this be just a directory on your root partition? If your ESP is mounted, where is it mounted, if it isn't mount it somewhere and check the contents, does it also contain a grub/grub.cfg that doesn't reflect this configuration change and would hence be the config grub is using?

Offline

#3 2021-12-16 13:37:49

carmilso
Member
From: València, España
Registered: 2017-08-28
Posts: 18
Website

Re: [SOLVED] Grub is ignoring configuration

V1del wrote:

This primarily happens if GRUB isn't looking for it's config where you think it's looking, normally if you e.g. had your EFI partition mounted to /boot during initial setup, and don't have that anymore in your further manipulation attempts. What's /boot ? Should the ESP be mounted there or should this be just a directory on your root partition? If your ESP is mounted, where is it mounted, if it isn't mount it somewhere and check the contents, does it also contain a grub/grub.cfg that doesn't reflect this configuration change and would hence be the config grub is using?

You are right that I have an efi directory but I am not sure how I should manage that and I don't find another configuration inside the /boot directory. This is what I have:

➜ tree /boot                                                                                                 
/boot
├── efi
│   ├── GRUB
│   │   └── grubx64.efi
│   └── grub_uefi
│       └── grubx64.efi
├── grub
│   ├── grub.cfg
│   └── grub.cfg.bak
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── intel-ucode.img
└── vmlinuz-linux

So does that mean that I should place my grub.cfg inside /boot/efi?

Last edited by carmilso (2021-12-16 13:42:19)

Offline

#4 2021-12-16 13:52:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,296

Re: [SOLVED] Grub is ignoring configuration

This can be normal, what's your mount/disksetup? Post

lsblk -f

what I'm getting at is that your ESP wherever it is is the one that contains the config and what you are generating currently lands on your root partition. GRUB would however be looking at a grub.cfg in your efi partition.

Last edited by V1del (2021-12-16 13:52:59)

Offline

#5 2021-12-16 13:53:31

carmilso
Member
From: València, España
Registered: 2017-08-28
Posts: 18
Website

Re: [SOLVED] Grub is ignoring configuration

V1del wrote:

This can be normal, what's your mount/disksetup? Post

lsblk -f

what I'm getting at is that your ESP wherever it is is the one that contains the config and what you are generating currently lands on your root partition. GRUB would however be looking at a grub.cfg in your efi partition.

Okay, this is the output of that command:

➜ lsblk -f                                                                                                   
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                            
├─nvme0n1p1 vfat   FAT32       1A44-84BD                             966,9M     5% /boot
├─nvme0n1p3 ext4   1.0         06ffa975-695d-4d83-a8c6-3f436d201402  275,7G    15% /
└─nvme0n1p4 ext4   1.0         5979d706-adca-4ce5-9239-683fa9fd74fa  510,8G     4% /home

Offline

#6 2021-12-16 14:09:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,296

Re: [SOLVED] Grub is ignoring configuration

So from this perspective this is correct, So in this case I'd try to reinstall GRUB, assuming it was originally installed with a different set of options

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

should set it up properly while using the config that's currently in /boot/grub/grub.cfg

Offline

#7 2021-12-16 15:15:29

carmilso
Member
From: València, España
Registered: 2017-08-28
Posts: 18
Website

Re: [SOLVED] Grub is ignoring configuration

V1del wrote:

So from this perspective this is correct, So in this case I'd try to reinstall GRUB, assuming it was originally installed with a different set of options

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

should set it up properly while using the config that's currently in /boot/grub/grub.cfg

That worked, thank you!

Offline

Board footer

Powered by FluxBB