Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to make grub load a new kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 30

PostPosted: Sun Mar 31, 2024 10:23 am    Post subject: Unable to make grub load a new kernel Reply with quote

I installed the new distribution kernel "linux-6.8.2-gentoo-dist" and was thinking that having "sys-kernel/installkernel" installed with grub USE flag should be enough to update grub and be done with it.

While the new configuration is generated in /boot, and the gubr.cfg looks updated, when rebooting the grub menu only gives the option of an old kernel: linux-6.5.5.
My /boot after installation of the new kernel can be seen here.

Thinking that the mess in the folder might be the issue, I cleaned it up to this, but the issue persisted (grub only showing 6.5.5).

The boot log from dmesg shows me "BOOT_IMAGE=/boot/vmlinuz-6.5.5-gentoo-x86_64" which doesn't exist anymore..
This makes me think that I'm actually looking at the wrong /boot but I don't see how that is possible.
My fstab should be fine and
Code:
mount | grep boot
gives me the right partition:

Quote:
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,​errors=remount-ro)


The output of
Code:
efibootmgr
is:
Quote:
# efibootmgr
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0003,2001,2002,2003
Boot0001* Windows Boot Manager HD(2,GPT,0c8c2351-8b0a-4d79-ae71-a53c6b3a380f,0xa00800,0x82000)/File(\EFI\Micros​oft\Boot\bootmgfw.efi)RC
Boot0002* EFI PXE 0 for IPv4 (3C-18-A0-5A-57-CF) PciRoot(0x0)/Pci(0xd,0x0)/USB(2,0)/MAC(3c18a05a57cf,0)/IPv4(0.0.0.00.0.0.0,0,0)R​C
Boot0003* gentoo HD(1,GPT,e571ca75-5b03-9048-b277-627c7ff4d8d9,0x800,0x200000)/File(\EFI\gentoo\g​rubx64.efi)
Boot0004* Windows Boot Manager HD(2,GPT,0c8c2351-8b0a-4d79-ae71-a53c6b3a380f,0xa00800,0x82000)/File(\EFI\Micros​oft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042​004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d​0034006500370030002d0061006300630031002d0066003300320062003300340034006400340037​00390035007d00000011110100000010000000040000007fff0400
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC



Does someone know what the issue could be?

[Moderator edit: broke long whitespace-free lines in quote tags to fix thread layout. -Hu]
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9680
Location: almost Mile High in the USA

PostPosted: Sun Mar 31, 2024 2:52 pm    Post subject: Reply with quote

I thought the grub config file is in /boot/grub/grub.cfg -- Are you checking the right location?
I also am not sure how you're installing grub, at least this is where I have my grub.cfg on my ESP which is mounted at /boot ...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 30

PostPosted: Sun Mar 31, 2024 2:59 pm    Post subject: Reply with quote

I have =sys-boot/grub-2.12-r2 installed.

My grub config file is indeed in /boot/grub/grub.cfg, I was referring to the following files that are generated in /boot:
- config-6.8.2-gentoo-dist
- initramfs-6.8.2-gentoo-dist.img
- System.map-6.8.2-gentoo-dist
- vmlinuz-6.8.2-gentoo-dist
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Tue Apr 02, 2024 3:49 am    Post subject: Reply with quote

It sounds like you may be installing the kernel and updating GRUB with the /boot partition not mounted. Use df to ensure the /boot partition is mounted and if not mount it and do it again.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 30

PostPosted: Tue Apr 02, 2024 7:04 am    Post subject: Reply with quote

Code:
df -h | grep --color=auto /boot

gives me
Quote:
/dev/nvme0n1p1 1022M 80M 943M 8% /boot


so that should be fine
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9680
Location: almost Mile High in the USA

PostPosted: Tue Apr 02, 2024 7:09 am    Post subject: Reply with quote

When you run grub-mkconfig does it list your (old and) new kernels?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 30

PostPosted: Tue Apr 02, 2024 8:16 am    Post subject: Reply with quote

only the new ones:
Code:
grub-mkconfig -o /boot/grub/grub.cfg


Quote:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.2-gentoo-dist
Found initrd image: /boot/initramfs-6.8.2-gentoo-dist.img
Found linux image: /boot/vmlinuz-6.8.2-gentoo-dist.old
Found initrd image: /boot/initramfs-6.8.2-gentoo-dist.img.old
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Back to top
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 30

PostPosted: Fri Apr 05, 2024 6:03 am    Post subject: Reply with quote

Since apparently installing grub with the --removeable flag fixes some issue I tried to run:
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --removable

and then
Code:
grub-mkconfig -o /boot/grub/grub.cfg


but that did no help either
Back to top
View user's profile Send private message
Adarion
Tux's lil' helper
Tux's lil' helper


Joined: 22 Aug 2005
Posts: 78

PostPosted: Fri Apr 05, 2024 3:01 pm    Post subject: Reply with quote

=sys-boot/grub-2.12-r2 seems to be quite some trouble. I do classic (non-UEFI-style) booting here and it locked me nearly out of the system (got weird errors at boot (kernel load) and things got stuck there) until I downgraded to 2.06-r9.
As of now (today?) there seems to be a Gentoo-patched revision 2.12-r3 to be in portage. Maybe this fixes something. But GRUB breakage is very nasty.
_________________
stop tcpa, swpatents, corrupt politicians and other scary stuff
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9680
Location: almost Mile High in the USA

PostPosted: Fri Apr 05, 2024 6:52 pm    Post subject: Reply with quote

grub 2.12 seems to work fine for efi sorta though I ran into the setup problem. When I upgraded 2.06 to 2.12 I kept getting stuck in firmware setup. However after re-grub-install on my boot disk(s) everything went back to normal.

Seems the Gentoo devs are requesting a change to grub such that if you used the 2.12 grub-mkconfig for grub 2.06 EFI binary, it won't do this anymore... we'll see...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum