Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel, boot, grub
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5071
Location: Bavaria

PostPosted: Tue Nov 05, 2024 9:45 pm    Post subject: Reply with quote

Ralphred wrote:
[...]T he idea of having to replace grub.cfg to switch kernels does seem to be a strange choice to make, but we are not privy to the constraints of reality faced by jankom's supplier, it could just be a timing thing - by the time the VNC output is available, seen, and published, it's too late for the user to interact with it?

I suspect something completely different: Jankom installed the grub because it wasn't there yet ... and the first part of grub is of course nowhere ... grub-mkconfig works quite simply because it only searches for kernels (and initramfs) and enters them in grub.cfg.

I asked for "efibootmgr" because you can configure some VMs (many? all?) to act (for booting) like an UEFI and with a correct UEFI entry (of course no real UEFI entry of the physical machine) you can boot a kernel directly.

@jankom:
If you get something from "efibootmgr" then tell us here ... and I can help you to create a new entry for your new kernel.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 355
Location: USA

PostPosted: Tue Nov 05, 2024 11:29 pm    Post subject: Update - to you all Reply with quote

efibootmgr - I'll explore that later when I have more quiet time.

I tried to copy bzImage file from linode /usr/src/linux-6.6.52-gentoo/ directory to linode /boot as vmlinuz-6.6.52-gentoo-x86_64; grub-mkconfig recognized it, but reboot ended up in kernel panic as before, probably because of missing initramfs. Rescued again, OK.

As far as not seeing a grub screen maybe explained by the linode doc here,
https://techdocs.akamai.com/cloud-computing/docs/manage-the-kernel-on-a-compute-instance
section Asynchronous SCSI scans. I tried those but so far no success.
I use the "Upstream kernel" which I interpret that the kernel they used to build my linode in 2023, and this is why it is 6.1.32 and not 6.6.52 (my latest eix-syn) with GRUB-2.

Maybe the linked linode document could shed some light on the situation for you all who have a lot more linux experience than me.

Again, thank you for your continued interest in this topic.
jankom (Janos)
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 649

PostPosted: Tue Nov 05, 2024 11:35 pm    Post subject: Reply with quote

pietinger wrote:
you can boot a kernel directly.
Not on a ext4 filesystem though? That'd be some very special UEFI firmware. Being able to boot the 6.10 kernel that isn't in the filesystem, grub(?) booting to a kernel panic after a "traditional" update, and there being nowhere visible from grub's binary to exist - to me this all smells like something between the bios and the OS that we aren't 100% aware of.

jankom wrote:
grub-mkconfig recognized it, but reboot ended up in kernel panic as before
When you enacted your "recovery" did you just restore a backup of grub.cfg, or delete the (new) kernel and issue a grub-mkconfig command? I'd be interested to see what happens if you "just install the kernel" and don't update your grub.cfg, it might help answer some questions.

jankom wrote:
Again, thank you for your continued interest in this topic.
Unused knowledge is wasted knowledge, when you know as much about kernel config as pietinger here, well I imaging it's bounced off the walls of his brain trying to get out and be useful again.

Last edited by Ralphred on Tue Nov 05, 2024 11:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 355
Location: USA

PostPosted: Tue Nov 05, 2024 11:36 pm    Post subject: efiboot.gr Reply with quote

I just ran efibootmgr on my home pc and on linode:
Code:
janos@andraslinux ~ $ efibootmgr
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* gentoo        HD(1,GPT,76fd2a35-1d32-484c-9bea-15e23548d7bf,0x800,0x80000)/\EFI\gentoo\grubx64.efi
janos@andraslinux ~ $

and the linode:
Code:
gellert@jgklinux ~ $ efibootmgr
EFI variables are not supported on this system.
gellert@jgklinux ~ $
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5071
Location: Bavaria

PostPosted: Wed Nov 06, 2024 12:12 am    Post subject: Reply with quote

Okay, boot your old 6.1-kernel and do a "lsmod". Give it us (if it is too long then please use wgetpaste also).
Then give us the kernel .config of your new 6.6 kernel.
(I will check if everything you need is static in there)

In the meantime do number 4 and number 5 of this chapter (if you have done it already do nothing):
https://techdocs.akamai.com/cloud-computing/docs/manage-the-kernel-on-a-compute-instance#installing-the-upstream-kernel-and-configuring-grub

In number 4 dont use the example; instead use this:
Code:
GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0"

(we do number 6 == updating grub.cfg as soon as I am sure we have a correct kernel)

Also give us a "ls -l boot" and "ls -l /usr/src".
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1225
Location: Richmond Hill, Canada

PostPosted: Wed Nov 06, 2024 1:24 am    Post subject: Reply with quote

I found this thread very interesting, Especially the root is whole disk without partition and still able to use grub.

So further research lead me to grub-mkstandalone which I think explain how linode(Akamai) setup. Since grub-mkstandaline create a image kind like initramfs (but grub specific), it created a bootable image that grub load in to memory with embedded grup.conf in the memory disk which possibly scripted to load (root)/boot/grub.conf to finish boot.

So according to first document Run a Distribution-Supplied Kernel with PV-GRUB lead to second document Manage the kernel on a Compute Instance and the description in
View and modify the kernel in Cloud Manager GRUB 2 You should be able to use you manually created custom kernel to boot your linode compute instance. In the second document at bottom there is short section on how to create grub.conf can be use by GRUB 2 method.

In the first document it is said current linode use KVM for compute instance. I guess QEMU was involve, it is most likely the QEMU is setup to boot from the grub-mkstandalone created image file that is why first part of grub was invisible to Linux because it is in memory and got replaced by the time kernel start. However it is hard to guess if QEMU was setup with BIOS mode or UEFI mode to boot, I think grub-mkstandalone can generate both format.

I am not sure about your kernel configuration if it is sufficient for use with linode compute instance. But I notice that the kernel command line options for your old kernel
Quote:
Command line: BOOT_IMAGE=/boot/vmlinuz-6.1.31-gentoo-x86_64 root=UUID=8e44ff7e-7406-138f-d16c-f7925ba1f9a5 ro
So in your newly generated grub.conf have same setting it will require you have matching initramfs for your new kernel. if you change the root=UUID=8e44ff7e-7406... to root=/dev/sda it might just work.

root=UUID=... is not recognized by kernel, it require initramfs to assist.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 355
Location: USA

PostPosted: Wed Nov 06, 2024 3:34 am    Post subject: Reply with quote

@plattinger:
Code:
gellert@jgklinux ~ $ ls -l /boot
total 44552
-rw-r--r-- 1 root root  4045234 Nov  5 23:22 System.map-6.1.31-gentoo-x86_64
-rw-r--r-- 1 root root  7304168 Nov  5 23:22 System.old
drwxr-xr-x 6 root root     4096 Nov  5 23:22 grub
-rw-r--r-- 1 root root 11171760 Nov  5 23:22 initramfs-6.1.31-gentoo-x86_64.img
-rw-r--r-- 1 root root 10246464 Nov  5 23:22 vmlinuz-6.1.31-gentoo-x86_64
-rw-r--r-- 1 root root 12837888 Nov  5 23:22 vmlinuz.old
gellert@jgklinux ~ $ ls -l /usr/src
total 4
drwxr-xr-x 27 root root 4096 Nov  2 23:48 linux-6.6.52-gentoo
gellert@jgklinux ~ $

http://0x0.st/XDH7.txt
http://0x0.st/XDXz.txt
Quote:
In the meantime do number 4 and number 5 of this chapter
Did that without success. Will try it with GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0"

@piongtoo:
Will try root=/dev/sda
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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