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

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 351
Location: USA

PostPosted: Sun Nov 03, 2024 11:41 pm    Post subject: kernel, boot, grub Reply with quote

I just have a simple question:
How important, or is it necessary, to have a line in my /etc/portage/make.conf file
Code:
GRUB_PLATFORMS="efi-64"
My system works fine, and I'm getting comfortable with Gentoo since my initial installation in 2021. Previously I had some linux experience with RedHat Fc-3 and CentOS. So the GRUB_PLATFORM definition is from the 2021 installation when I was trying to make my gentoo system work.

The reason I ask this question is because now I have an Akamai linode computing instance, also with Gentoo linux, but I'm unable to update the kernel there. I have done kernel compile and updates many times on my FC-3 linux and also on my current home Gentoo desktop machine.

The linode computing instance has kernel panic after kernel update (I can recover from it with rescue subsystem, chroot, etc), but the only difference I noted is that my home pc has the GRUB_PLATFOR definition, and a /boot/efi/ directory.

Jankom
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 646

PostPosted: Mon Nov 04, 2024 1:11 am    Post subject: Reply with quote

The GRUB_PLATFORM setting is really only used by the user when "installing the bootloader", as a function of grub-install. Grub still supports installing it's bootloader binary(s) directly to MBR*, or as an EFI compatible binary in a suitable place/partition**. If the machine is booting to the point grub is being loaded, and in turn is trying load the kernel, until you need to update the grub binaries by running grub-install then GRUB_PLATFORM won't cause you an issue. If you are unsure you can build grub with GRUB_PLATFORMS="efi-64 pc" and specify which to use at the time of running grub-install.

*Requires grub to be built with GRUB_PLATFORMS="pc"
**Requires grub to be built with GRUB_PLATFORMS="efi-64"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

PostPosted: Mon Nov 04, 2024 1:31 am    Post subject: Reply with quote

jankom,

the most common cause for a kernel panic at system startup is that the kernel receives (in this case FROM grub) incorrect information about its root partition (this is the kernel command line parameter “root=...”). But if root= is correct for you, then it would be helpful to get all the exact information of the kernel panic (if necessary by photo). The second most common cause is that the kernel is missing the modules it needs to access the root partition; see more here: https://forums.gentoo.org/viewtopic-p-8688524.html#8688524
_________________
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: 351
Location: USA

PostPosted: Mon Nov 04, 2024 6:00 pm    Post subject: Solved Reply with quote

Thank you - my simple question is answered. Apparently when I installed the gentoo system on my home pc I followed the gentoo instructions and added the GRUB_PLATFORMS definition.

As far as the linode gentoo boot kernel panic is concerned I think it is a linode issue. Originally I purchased the linnode computing instance in 2018 with xubuntu OS. Later on I decided to make it gentoo and similar to my home gentoo pc. However, I built my home gentoo pc with downloaded gentoo image for gui desktop
[5] default/linux/amd64/17.1/desktop (stable) *
and later updated to
[46] default/linux/amd64/23.0/split-usr/desktop (stable) *
based on eix-sync update notes at the time.
The linode computing instance was built automatically by Akamai linode selecting a gentoo OS. Initially the gentoo profile was
[1] default/linux/amd64/17.1 (stable) *
and later updated to
[45] default/linux/amd64/23.0/split-usr (stable) *
based on eix-sync update notes just like home pc.

However, I noticed that uname -r on linode was different than /usr/src/linux from ex-syn operations. I've contacted the linode Customer Support, and while they were eager to help could not really explain and solve the dilemma; they often referred me to gentoo.

After your answers I tried all sorts of things with gub, but ended up with boot failures and rescue disk; linode has a rescue boot option on their web console where I can access my linode disk, make change an do chroot.

I ended up with using the current linode kernel, i.e. booting from somewhere else, not using /boot and grub files.

Thanks for the quick reaction and answer to my "simple question". I'll mark this topic as SOLVED.

jankom (janos)

P.S.
Here is the kernel panic:
Code:
Unable to mount root fs on unknown-block(0,0)
Hardware name: Linode Compute Instance, BIOS Not Specified
[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]


The boot should be on /dev/sda - this is how I can access my system from a web console in my linode account. I mount media/sda and then chroot there to get back to my working set up (6.1.32 kernel and recreate grub).

One other information: after compiling kernel make install is complaining about not finding Lilo. The make install in /usr/src/linux does copy vmlinuz and System.map to /boot but without -6.6.52-gentoo... suffixes, and without an initramf file. The grub-mkconfig command does not recognize the new files in /boot unless I rename this with -6.6.52-gentoo suffixes. But then rebooting is with kernel panic.

So I just give up and use the linode kernel for booting.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

PostPosted: Mon Nov 04, 2024 6:40 pm    Post subject: Re: Solved Reply with quote

jankom wrote:
Here is the kernel panic:
Code:
Unable to mount root fs on unknown-block(0,0)
Hardware name: Linode Compute Instance, BIOS Not Specified
[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]

First of all: Your kernel panic has nothing to do with your Gentoo profile.

I think the reason is: You are/want booting a kernel which needs (and has) an initramfs ... BUT ... grub does not load the initramfs - so kernel has none !

You must know: You will get this kernel panic only because the kernel tries itself to mount the root partition (when there is an initramfs active, it is the job of the initramfs to mount the root partition) and it says:
Code:
...  unknown-block(0,0)

0,0 means no access to disc at all == not able to mount the root partition because NOT ABLE to reach the disc (If kernel would be able to reach the disc but has wrong information about the root partitionthen you would have numbers in parenthesis)

This is only possible if some modules for reaching the harddisc are not already in kernel (because they are compiled as <M>odule and not static <*> because ususally the initramfs loads all necessary modules).

So: Check the /boot/grub/grub.cfg ... there is surely an entry to boot this kernel ... but with missing information about the initramfs-FILE (or pointing to a wrong position).

jankom wrote:
One other information: after compiling kernel make install is complaining about not finding Lilo. The make install in /usr/src/linux does copy vmlinuz and System.map to /boot but without -6.6.52-gentoo... suffixes, and without an initramf file. The grub-mkconfig command does not recognize the new files in /boot unless I rename this with -6.6.52-gentoo suffixes. But then rebooting is with kernel panic.

I guess you dont have installed "installkernel" ?

You must know: "grub-mkconfig" search/finds only kernels (and its initramfs') with a specific name schema. If you dont use "installkernel" you will get wrong names after a "make install" ... and these names are not found by grub-mkconfig.

I guess your renaming of the kernel is wrong => You have got an entry in grub.cfg for the kernel itself BUT without initramfs.

If you need further help we would need:

* grub.cfg
* ls -l /boot

Maybe read: https://wiki.gentoo.org/wiki/Installkernel
_________________
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: 351
Location: USA

PostPosted: Mon Nov 04, 2024 7:59 pm    Post subject: Reply with quote

Great information, THX.
Now I understand the boot process a little better, the role of initramf. What generates the initramfs? On my home pc it is always there after I compile an updated kernel, and I don't issue installkernel command. Everything works at home whenever I update the kernel (make, make install, make install-modules, etc.)

My home pc has installkernel, but my linode computing instance does not.

The currently working linode is:
Code:
gellert@jgklinux ~ $ uname -r
6.10.2-x86_64-linode165
gellert@jgklinux ~ $ ls /usr/src/
linux-6.6.52-gentoo
gellert@jgklinux ~ $ ls -l /boot
total 44552
-rw-r--r-- 1 root root  4045234 Nov  4 16:58 System.map-6.1.31-gentoo-x86_64
-rw-r--r-- 1 root root  7304168 Nov  4 16:58 System.old
drwxr-xr-x 6 root root     4096 Nov  4 16:58 grub
-rw-r--r-- 1 root root 11171760 Nov  4 16:58 initramfs-6.1.31-gentoo-x86_64.img
-rw-r--r-- 1 root root 10246464 Nov  4 16:58 vmlinuz-6.1.31-gentoo-x86_64
-rw-r--r-- 1 root root 12837888 Nov  4 16:58 vmlinuz.old
gellert@jgklinux ~ $ su -c "cat /boot/grub/grub.cfg"
Password:
#
# 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 ###
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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod ext2
set root='hd0'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  8e44ff7e-7406-138f-d16c-f7925ba1f9a5
else
  search --no-floppy --fs-uuid --set=root 8e44ff7e-7406-138f-d16c-f7925ba1f9a5
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8e44ff7e-7406-138f-d16c-f7925ba1f9a5' {
        load_video
        if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
        fi
        insmod gzio
        insmod ext2
        set root='hd0'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  8e44ff7e-7406-138f-d16c-f7925ba1f9a5
        else
          search --no-floppy --fs-uuid --set=root 8e44ff7e-7406-138f-d16c-f7925ba1f9a5
        fi
        echo    'Loading Linux 6.1.31-gentoo-x86_64 ...'
        linux   /boot/vmlinuz-6.1.31-gentoo-x86_64 root=UUID=8e44ff7e-7406-138f-d16c-f7925ba1f9a5 ro 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-6.1.31-gentoo-x86_64.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-8e44ff7e-7406-138f-d16c-f7925ba1f9a5' {
        menuentry 'Gentoo GNU/Linux, with Linux 6.1.31-gentoo-x86_64' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.31-gentoo-x86_64-advanced-8e44ff7e-7406-138f-d16c-f7925ba1f9a5' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  8e44ff7e-7406-138f-d16c-f7925ba1f9a5
                else
                  search --no-floppy --fs-uuid --set=root 8e44ff7e-7406-138f-d16c-f7925ba1f9a5
                fi
                echo    'Loading Linux 6.1.31-gentoo-x86_64 ...'
                linux   /boot/vmlinuz-6.1.31-gentoo-x86_64 root=UUID=8e44ff7e-7406-138f-d16c-f7925ba1f9a5 ro 
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-6.1.31-gentoo-x86_64.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.1.31-gentoo-x86_64 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.31-gentoo-x86_64-recovery-8e44ff7e-7406-138f-d16c-f7925ba1f9a5' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  8e44ff7e-7406-138f-d16c-f7925ba1f9a5
                else
                  search --no-floppy --fs-uuid --set=root 8e44ff7e-7406-138f-d16c-f7925ba1f9a5
                fi
                echo    'Loading Linux 6.1.31-gentoo-x86_64 ...'
                linux   /boot/vmlinuz-6.1.31-gentoo-x86_64 root=UUID=8e44ff7e-7406-138f-d16c-f7925ba1f9a5 ro single
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-6.1.31-gentoo-x86_64.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/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
        menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                fwsetup
        }
fi
### 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 ###
gellert@jgklinux ~ $

jankom
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 646

PostPosted: Mon Nov 04, 2024 8:16 pm    Post subject: Re: Solved Reply with quote

pietinger wrote:
I think the reason is: You are/want booting a kernel which needs (and has) an initramfs ... BUT ... grub does not load the initramfs - so kernel has none !

This needs to be checked before jankom goes down the initramfs path. Yes, grub is installed without efi-64, and the kernel panic suggests that an initramfs is required for the kernel to boot from /dev/sda. BUT switching /dev/sda to gpt (if necessary) and making a >=150k efi partition is a preferable solution (IMHO) to using an initramfs. But that's only if the problem extends that far,
Code:
...  unknown-block(0,0)
suggests to me a storage/interface driver that should be "=y" is "=m", not error that would force an initramfs to be instantiated for the kernel to understand/decrypt/etc the rootfs.

jankom has complete control over his/her kernel config, and I'd stake half my crypto on: jankom uses "make localmodconfig" and "emerge installkernel" (plus make install, grub stuff etc.) and the kernel panic gets fixed.
I'd stake the other half on "gpt conversion" and an EFI friendly boot binary fixing any other issue (UEFI capability of a linode instance withstanding OFC)

Yes, "Akamai linode" may supply a patched kernel, and include an initramfs because anyone not familiar with "configuring a machine specific kernel" thinks that that is what is normal/needed, or even it may be needed for legitimate reasons, but the info I have from this thread leads me to doubt such.

Edit: Once again I get distracted half way through a reply; this time OP added more (very VERY fscking confusing) information:
Code:
gellert@jgklinux ~ $ uname -r
6.10.2-x86_64-linode165
gellert@jgklinux ~ $ ls /usr/src/
linux-6.6.52-gentoo
gellert@jgklinux ~ $ ls -l /boot
~~~ no hint of a 6.10.2 kernel ~~~
gellert@jgklinux ~ $ su -c "cat /boot/grub/grub.cfg"
~~~ again, no hint of a 6.10.2 kernel ~~~

Please post the output of cat /etc/fstab, lslbk and blkid, thanks.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 351
Location: USA

PostPosted: Mon Nov 04, 2024 9:14 pm    Post subject: Reply with quote

Quote:
OP added more (very VERY fscking confusing) information:
Sorry, I forgot to mention that on ny linode access web site there is a Configuration tab where I can define "Boot Settings" such as 'GRUB 2 or the currently selected 'latest 64 bit', and uname -r shows the 6.10...
Up until recently 'GRUB 2' was active with the 6.1.32 gentoo kernel as shown in the grub.cfg. The 6.1.32 was probably from linode's build disk when I changed my linode OS from xubuntu. My current, compiled kernel is the 6.6.52, and this is what I was unable to set correctly fro booting, this is where initramfs is missing, and this is what make install command installs as vmlinuz, Sustem.map without suffixes.

The requested info follows:
Code:
gellert@jgklinux ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
...,most <commented lines removed to save space>
#       the blkid(8) command.

/dev/sda                /               ext4            noatime         0 1
/dev/sdb                none            swap            sw              0 0
/swapfile               none            swap            default         0 0
gellert@jgklinux ~ $
gellert@jgklinux ~ $ lsblk   
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda     8:0    0 49.5G  0 disk /
sdb     8:16   0  512M  0 disk [SWAP]
nbd0   43:0    0    0B  0 disk
...<all the way up to nbd15, again to save space>
gellert@jgklinux ~ $ blkid
/dev/sdb: LABEL="linode-swap" UUID="f1408ea6-59a0-11ed-bc9d-525400000001" TYPE="swap"
/dev/sda: LABEL="linode-root" UUID="8e44ff7e-7406-138f-d16c-f7925ba1f9a5" BLOCK_SIZE="4096" TYPE="ext4"
gellert@jgklinux ~ $
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 646

PostPosted: Mon Nov 04, 2024 9:59 pm    Post subject: Reply with quote

jankom wrote:
I can define "Boot Settings" such as 'GRUB 2 or the currently selected 'latest 64 bit', and uname -r shows the 6.10...
Up until recently 'GRUB 2' was active with the 6.1.32 gentoo kernel as shown in the grub.cfg.

When selecting 'latest 64 bit' gives you an "invisible to the the traditional file system layout" kernel, that obviously works, creating and supporting/maintaining your own feels like reinventing the wheel...
Code:
/dev/sda                /               ext4            noatime         0 1
So other than no partition table, nothing funky at all - I stand by my, albeit redundant, "make localmodconfig" advice. If you feel the need, I'd try it from the 6.10 environment first though, less interaction required, probably.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

PostPosted: Mon Nov 04, 2024 10:11 pm    Post subject: Reply with quote

jankom,

we need more informations ... because your linode is a bit unusual ... and gives us some questions ->

a) you said you want boot 6.6.53 ... but there is no 6.6.53 in your /boot ?!
b) /boot/vmlinuz-6.1.31-gentoo-x86_64 (and all other files) have a date from today ?! Why?
c) I see only sda and sdb (being root-partition and swap) ... but where is grub installed ? I mean the 1st part of grub (not the 2nd part of grub residing in /boot/grub)
d) What can you boot ? Gentoo ? Which version? (uname -a) or XubuntuOS? Did you ever run Gentoo here?
e) How have you installed Gentoo on Linode? Booting with our GentooLiveCD? and then installing with AMD64 Handbook? Or other methods?
f) Do you use gentoo-sources at your home or our (binary) distribution kernel? (or genkernel?) You said: You do at home "make && make install && make modules_install" (this smells for gentoo-sources or genkernel) ... do you use at home "dracut" (or "ugrd") -> Do you want to do the same here ? ->
g) How you have installed the kernel here on Linode? Was it 6.1.32? A Gentoo-kernel? Or was it pre-installed?

So, I would like to ask you:

1. Tell us everything what has worked in the past until day X.
2. What happend on day X / what have you tried to do (detailed steps)
3. What have you renamed (from/to)?

To see more clear we would need more then lslbk and blkid ... best would be the "dmesg" of that thing/OS you can boot here; this tells us also something about the used hardware. Also a "lspci -nnk" and a "lsmod" (Please use wgetpaste for dmesg). Does "efibootmgr" gives you some results or is this not an UEFI system? Does "zcat /proc/config.gz" gives you the configuration of the current running kernel? If yes, put it in a file and give it also to us ...

... and many answers from above questions. ;-)

Before trying anything else ... we should know the current situation and understand it ... not to make more damage (as we already have :lol: ).
_________________
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: 351
Location: USA

PostPosted: Mon Nov 04, 2024 11:52 pm    Post subject: Reply with quote

Quote:
we need more informations ... because your linode is a bit unusual ... and gives us some questions ->

a) 6.6.52 is in my /usr/src/ from eix-sync. I copiled it using configuration of 6.1.32 by copying configuration of 6.1.32 (from /proc/config.gz, then make oldconfig and accepting defaults).
b) same date is probably due to various rescue recovery and file copy ooperations. I rebooted again, no problem using the GRU 2 setting, so my uname -r now is 6.1.32-gentoo-x86_64. This has been like that since 2023, and everything worked fine. Just recently I wanted to make sure my kernel is the same as my home pc, same as in my /usr/src. Therefore I compiled it as in a) above, but the bad story started (initramfs, kernel panic), all that is in this thread. But things are back to normal before I attempted to update the kernel.
c) I don't know where the 1st part is. I have an /etc/default/grub that is identical in both home pc and linode.
d) the only thing I boot is 6.1.32-gentoo-x86_64 - but there is no grub screen. "Power off", "Power on" or "Reboot" are buttons in my linode web access screen. The web access screen has a "lish" console, where I can log in as user or root. Kernel panic is shown on that screen.
e) linode gave me various distributions for installation when I purchased the computing instance. in 2018 I chose xubuntu, but later I rebuilt it to gentoo, by deleting the xubuntu computing instance and replacing it with the gentoo build. Everything was automatic, all I had to do is to give root pw. Once it was built I could add user(s), emerge my favorite software, and copy back my peronal files or settings from backed up files.
f) sources, and compile almost everything, including the kernel. Same on linode. This is why I added large swap file because qtwebkit would not compile, is a memopry hog.
g) I have not installed 6.1.32, I guess it was part of the original build. When I tried to install 6.6.52 I ran into the kernel panic.

Sorry, how do I use the wgetpaste for sending dmesg? - B.t.w dmsg is be the most recent reboot to 6.1.32-gentoo, the way things were B4 I tried kernel update.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

PostPosted: Tue Nov 05, 2024 12:43 am    Post subject: Reply with quote

jankom wrote:
Sorry, how do I use the wgetpaste for sending dmesg?

Do as root:
Code:
# dmesg > dmesg.txt
# wgetpaste -s 0x0 dmesg.txt

So, if I understand correctly, this Gentoo system with kernel 6.1.32 was installed by Linode and you just selected/installed it in a "Linode selection menu"? Or was it a Gentoo-boot (like our GentooLiveCD) and you had to do the whole installation?

In every case I would like to see the kernel config of your current running kernel (zcat /proc/config.gz > kernel.txt; wgetpaste -s 0x0 kernel.txt) and the "lspci -nnk" ... Important: Try "efibootmgr" and tell us the result; maybe this system does not use a grub (because you dont see a grub menu when starting) but instead it boots a stub-kernel ... then we need this output.

Also give us:
Code:
ls -l /usr/src/

_________________
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: 351
Location: USA

PostPosted: Tue Nov 05, 2024 4:06 am    Post subject: Reply with quote

wgetpaste done for 3 .txt files. I did the file generation commands in an ssh terminal from my home pc, then sshfs mounted my linode home directory to my home gentoo pc and issued the wgetpaste command from my home pc.
Quote:
and you just selected/installed it in a "Linode selection menu"
Yes, as far as I remember. It was part of creating a new computing instance. I can create another one now, but every instance is $12/month, so I just have one in Atlanta, GA.
Contents of the /usr/src linux directory now has compiled stuff in it, but I can reset it to pre-compiled state with make distclean command.
Code:
gellert@jgklinux ~ $ ls /usr/src/
linux-6.6.52-gentoo
gellert@jgklinux ~ $

As far as the efibootmgr is concerned I'll have to study it.

Jankom
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 421
Location: Nijmegen

PostPosted: Tue Nov 05, 2024 6:45 am    Post subject: Reply with quote

jankom wrote:
What generates the initramfs? On my home pc it is always there after I compile an updated kernel, and I don't issue installkernel command. Everything works at home whenever I update the kernel (make, make install, make install-modules, etc.)


Installkernel generates it, installkernel is called by 'make install' if it is found.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 646

PostPosted: Tue Nov 05, 2024 10:45 am    Post subject: Reply with quote

Nowa wrote:
Installkernel generates it, installkernel is called by 'make install' if it is found.
For clarity, what was the procedure before the recent switch to installkernel.
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 421
Location: Nijmegen

PostPosted: Tue Nov 05, 2024 11:50 am    Post subject: Reply with quote

Ralphred wrote:
Nowa wrote:
Installkernel generates it, installkernel is called by 'make install' if it is found.
For clarity, what was the procedure before the recent switch to installkernel.


The same, this is the way it has worked for tens of years, it's just that installkernel is better documented now which makes people think it's new.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

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

jankom wrote:
wgetpaste done for 3 .txt files. [...]

Great ... but if you dont give us the links then we cannot inspect it .. :lol:

jankom wrote:
Contents of the /usr/src linux directory now has compiled stuff in it,

What does this mean? Have you reconfigured your kernel .config of 6.6.52? Do you need help anymore? I don't know what your current status is.

I have the following suspicions:

1. You know how to configure a kernel (and update it with make oldconfig), install it (you have installed the installkernel package at home) and configure grub (with grub-mkconfig). At home you have a kernel WITHOUT initramfs in use (because you have configured all necessary drivers in your kernel statically <*> and therefore do not need an initramfs).

2. With Linode you extracted the kernel configuration, copied it to 6.6.52 and did a make oldconfig - but did NOT create an initramfs (with dracut). But since this kernel (probably even created with genkernel) - just like a kernel that is on bootCDs - has an initramfs, because in this kernel some/many modules are configured as <M>modules, you got a (quite normal) kernel panic (because the modules for accessing the hard disk were not in the kernel).

If this is correct so far, then you have two (or three) possibilities to get a new kernel for Linode:

a) create a new initramfs with dracut, or
b) create a completely new kernel configuration for 6.6.52 with everything necessary statically configured, or
c) it MAY even be possible to use the existing initramfs from 6.1 by simply copying it (with the version number changed).
_________________
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: 351
Location: USA

PostPosted: Tue Nov 05, 2024 1:37 pm    Post subject: Sorry about wgetpaste Reply with quote

Quote:
but if you dont give us the links

http://0x0.st/XG5B.txt
http://0x0.st/XG5Q.txt
http://0x0.st/XG51.txt
Sorry about that, I could not figure out how wgetpaste works, now it is obvious - I'm embarrased.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 351
Location: USA

PostPosted: Tue Nov 05, 2024 1:50 pm    Post subject: Reply with quote

Quote:
current status

My linode is functional as before I embarked on this kernel update jurney. I don't reboot it very often, but if I do it boots with GRUB 2 into the original gentoo built kernel whih is 6.1.32-gentoo. So basically I could leave things as they are.

But

I would like to be able to make it similar to my home pc, i.e. same kernel, same update status for easier management (I also have a laptop at home with linux Mint, smartphones), but my gentoo home pc and linode computing instance is my hobby.

So presently /usr/src/ has 6.6.52 gentoo on both home and linode, but only my home pc is using it as kernel. linode still uses 6.1.32 - no big deal.

I did compile the 6.6.52 kernel source in linode, and this is what I meant that it has now the compile stuff, ready for make install.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 351
Location: USA

PostPosted: Tue Nov 05, 2024 2:07 pm    Post subject: Reply with quote

Quote:
suspicions

1) Both home and inode I did
* copy current .config into /usr/src/<kernel source directory>
* make oldconfig
* make menuconfig (just to check, but not making changes)
* make -j$(nproc) 2>&1 | tee log.txt # log.txt is a file of the compile console output saved in the new kernel directory
* make modules_install -j$(nproc)
* make install # see also https://www.gentoo.org/support/news-items/2024-03-12-debianutils-installkernel.html
The last step is where linode is complaining about Lilo
After that I symlink current kernel as /usr/src/linux , do grub-mkconfgi -o /boot/grub/grub.cfg, reboot, and home pc good. linode -as in this thread, kernel panic, rescue, restore status to B4.
2) I'll check the details of my configuration of 6.6.52 on linode. Your suspicion is probably the explanation of all this story. I need some time to review it.

I have never used dracut. My kernel compile steps are based on my Fc-3 linux learning started more than 10 years ago.

Thanks again for the help. This is a great community!

jankom
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5065
Location: Bavaria

PostPosted: Tue Nov 05, 2024 3:07 pm    Post subject: Reply with quote

jankom,

I looked at all three files (and all three were necessary). This kernel configuration is a bit “weird”. It is mostly the same as our dist-kernel has, but some things have been changed. I see this for example when turning off AMD (# CONFIG_X86_AMD_PSTATE is not set; and some other options). On the other hand, they have left in thousand modules that you will never need (e.g. USB :lol: ).

The query with lspci was very important; here you can see which modules the VM requires from Linode. Surely you know that you are only running in a VM and do not have your own dedicated box? ->
Code:
[    0.107391] smpboot: CPU0: AMD EPYC 7713 64-Core Processor (family: 0x19, model: 0x1, stepping: 0x1)
[    0.117830] smp: Brought up 1 node, 1 CPU

Back to lspci: You see you need a special graphic module and virtio module (and AHCI for your harddisc):
Code:
00:01.0 VGA compatible controller [0300]: Device [1234:1111] (rev 02)
   Subsystem: Red Hat, Inc. Device [1af4:1100]
   Kernel driver in use: bochs-drm
   Kernel modules: bochs
00:02.0 SCSI storage controller [0100]: Red Hat, Inc. Virtio SCSI [1af4:1004]
   Subsystem: Red Hat, Inc. Device [1af4:0008]
   Kernel driver in use: virtio-pci
   Kernel modules: virtio_pci
...
00:1f.2 SATA controller [0106]: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] [8086:2922] (rev 02)
   Subsystem: Red Hat, Inc. QEMU Virtual Machine [1af4:1100]
   Kernel driver in use: ahci
   Kernel modules: ahci

Now look at the kernel options for the harddisc:
Code:
CONFIG_BLK_DEV_SD=m
CONFIG_BLK_DEV_SG=m
CONFIG_SATA_AHCI=m

and also some others:
Code:
CONFIG_DRM_BOCHS=m
CONFIG_DRM_VBOXVIDEO=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_INPUT=m

These are the options that you would have to (at least) statically include in the kernel (if you don't want to use initramfs). Maybe even more/others.

You should also take the opportunity to change this to “Performance”:
Code:
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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
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