View previous topic :: View next topic |
Author |
Message |
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Tue Nov 05, 2024 9:45 pm Post subject: |
|
|
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 |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Tue Nov 05, 2024 11:29 pm Post subject: Update - to you all |
|
|
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 |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 655
|
Posted: Tue Nov 05, 2024 11:35 pm Post subject: |
|
|
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 |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Tue Nov 05, 2024 11:36 pm Post subject: efiboot.gr |
|
|
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Wed Nov 06, 2024 1:24 am Post subject: |
|
|
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 |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Wed Nov 06, 2024 3:34 am Post subject: |
|
|
@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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Wed Nov 06, 2024 1:25 pm Post subject: |
|
|
pingtoo wrote: | [...] 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. |
YESSS ... pingtoo, great catch ! ... you see I am old ... I even wrote a wiki article about it and still completely overlooked it:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Confusion_with_root%3DPARTUUID%3D_and_root%3DUUID%3D
... but that alone is not enough ... see next post. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Wed Nov 06, 2024 1:26 pm Post subject: |
|
|
jankom,
I guess you took the kernel .config from 6.1 and made a "make oldconfig" ... Okay, first step is correct.
Now you must go into "make menuconfig" and search with / for every module in this list and change it to static <*> (DONT try to edit the .config; do it in "make menuconfig")
Code: | CONFIG_BLK_DEV_SD=m
CONFIG_CHR_DEV_SG=m
CONFIG_SATA_AHCI=m
CONFIG_SCSI_VIRTIO=m
CONFIG_SERIO_RAW=m
CONFIG_VIRTIO=m
CONFIG_VIRTIO_PCI_LIB=m
CONFIG_VIRTIO_PCI_LIB_LEGACY=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_INPUT=m
CONFIG_EXT4_FS=m
CONFIG_JBD2=m
CONFIG_FS_MBCACHE=m
CONFIG_CRYPTO_AES_NI_INTEL=m
CONFIG_CRYPTO_SHA512_SSSE3=m
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m |
Here I am unsure if it is really necessary to change it to static ... but ... hey ... to be on a safe side
Code: | CONFIG_DRM_VIRTIO_GPU=m
CONFIG_DRM_BOCHS=m |
After this is done, compile your kernel again, copy it to /boot and do a grub-mkconfig. THEN give us the grub.cfg (again) before you try to reboot. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Wed Nov 06, 2024 1:42 pm Post subject: |
|
|
Let me first recompile kernel, then try /dev/sda and finally the grub screen tuning. - jankom |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Wed Nov 06, 2024 1:45 pm Post subject: |
|
|
jankom wrote: | Let me first recompile kernel, then try /dev/sda and finally the grub screen tuning. - jankom |
yes ... do both (recompile+/dev/sda) together (root=UUID=... will never work if you dont have an initramfs). _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Wed Nov 06, 2024 11:37 pm Post subject: |
|
|
Kernel recompiled, bzImage copied to /boot as vmlinuz... - see Code: | gellert@jgklinux ~ $ ls -l /boot
total 57008
-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 6 23:12 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 12751360 Nov 6 17:21 vmlinuz-6.6.52-gentoo-x86_64
-rw-r--r-- 1 root root 12837888 Nov 5 23:22 vmlinuz.old
gellert@jgklinux
| and grub.cfg is wgetpasted
http://0x0.st/XDAZ.txt
I noticed that for 6.6.52 "root=/dev/sda ro single " is created as opposed to 6.1.32 with UUID.
I did not reboot, waiting for comments to go ahead.
jankom (Janos - retired engineer in2012) |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Thu Nov 07, 2024 12:58 am Post subject: |
|
|
jankom,
I think you can go ahead try to boot. if you follow pietinger suggested compile modules into static then you should be able go further into rootfs.
If you boot have problem in start services then you can try the recovery mode for your new kernel.
The "single' is to tell "init" only start enough for console. I think the 'lish' should allow you connect console. although I am not sure how that work. you may need to try set up kernel command line to let kernel know which tty is console. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1709 Location: South America
|
Posted: Thu Nov 07, 2024 1:45 am Post subject: |
|
|
Doesn't the documentation from Akamai ask that certain variables in /etc/grub/default be set in a certain way? And a console= and other kernel parameters? I don't see that reflected in the latest grub.cfg... _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Thu Nov 07, 2024 2:33 am Post subject: |
|
|
Reboot into kernel 6.6.52 OK. grub screen is not there, although I have not mage the changes for lish.
But!
it does not seem to be connected to outside world, ping IP or domain name packets is lost.
Will rescue to previous kernel (I have no grub screen so I cannot select which kernel to boot)..
jankom |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Thu Nov 07, 2024 3:08 am Post subject: My mistake |
|
|
Rush to glory - I did not do make install-modules.
Stupid mistake.
It's OK now, Internet and 6.6.52 kernel.
The only thing left is the lish console so that I can have a grub screen for booting - not very important.
Thanks again, all of you. Great learning experience!
jankom (Janos) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Thu Nov 07, 2024 9:14 am Post subject: Re: My mistake |
|
|
jankom wrote: | Rush to glory [...] |
Happy to hear that.
jankom wrote: | [...] Thanks again, all of you. Great learning experience! |
You already know that you are very Welcome! _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Thu Nov 07, 2024 10:58 pm Post subject: |
|
|
Just a final, curiosity question: how important it is to hav a /usr/src/linux symlinc pointing to the directory of the current running kernel? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Thu Nov 07, 2024 11:16 pm Post subject: |
|
|
jankom wrote: | Just a final, curiosity question: how important it is to hav a /usr/src/linux symlinc pointing to the directory of the current running kernel? |
Somewhat
For running system, it is unrelated so having it or not have it both are OK.
For building packages, it is somewhat important to have it either point to correct source version OR not have it at all. Not have it usually ebuild will try to find running kernel configures. Have it but point to wrong version might cause the result build binary behave incorrectly which sometime how to debug. |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Thu Nov 07, 2024 11:45 pm Post subject: |
|
|
Thanks - jankom |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Fri Nov 15, 2024 2:20 pm Post subject: additional info regarding linode boot process |
|
|
I'm copying here explanation from linode Customer Service regarding lack of grub screen: Quote: | Hello Janos,
Please find the answer to your question :
Is it correct to state that the linode computing instance lish console is only available after the grub and boot process is complete, i.e. at the stage of presenting a console login screen?
That is correct but the boot process skips the BIOS and boot information is passed directly to the instance using qemu options, negating the need for an MBR, although you can still use one.
If you've selected GRUB2 as your kernel, qemu loads a GRUB image as the "kernel" and GRUB uses the info on your instance's grub.cfg file to start the rest of the boot process. Again, this process skips the MBR but still uses GRUB allowing you to boot with a custom or distribution-supplied kernel.
If that is true than why in your referenced doc point 4 and 5 are instructions for modifying grub configuration?
Point 4 and 5 actually are instruction for changing the kernel interfaces with the system's hardware and it controls the operating system's core functionality. The guide covers the types of kernels that can be assigned to a Compute Instance and how to view, update, or change the kernel.
So my question was; is there a way to see all BIOS, grub screens and messages on lish (or glish)?
This is a feature that is not yet made available in our platform but I can share this request feedback to our team in a hopes that this might be made available in the future but I am unable to determine when and if.
If you have any more questions, please feel free to contact the Support team. We are here 24/7 for your convenience.
|
jankom |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Fri Nov 15, 2024 3:11 pm Post subject: |
|
|
This thread could certainly help other users who use a Linode instance ... if they find this thread ... so may I ask you to add “Linode” (or Linode instance) to the title? (edit the headline in your first post) _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 364 Location: USA
|
Posted: Fri Nov 15, 2024 7:44 pm Post subject: |
|
|
Yes |
|
Back to top |
|
|
|